<link rel="stylesheet" href="<?php echo base_url();?>assets/js/validationEngine.jquery.css" type="text/css" />
<div class="" id="addPromotion">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" align = "left">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3 class="modal-title">Update Information</h3>
            </div>
            <div class="modal-body">
                <div class="innerAll">
                    <div class="innerLR">
                        <form action="" method="" id="subscribe_magazine_campaign_edit" >
                        <?php $this->load->view('admin/flashdata_admin'); ?>
                            <table class="table table-white table-vertical-center margin-none table-striped footable">
                            <tr>
                                <td>
                                    <label  class="col-sm-4 control-label text-center">Select Magazine: </label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control validate[required] text-input" value="<?php echo $magazine_code;?>" id="sub_magazine_camps" name = "magazine" readonly/>
                                    </div>
                                    <div style="clear: both"></div>
                                </td>
                            </tr>
                                <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">Number Of Years subscription: </label>
                                        <div class="col-sm-7">
                                            <!-- <input class="form-control" type="text" id="camp_number_yearss" name="camp_number_yearss" value="<?php echo $years;?>"/> -->

                                        <select name="camp_number_yearss" id="camp_number_yearss" class="form-control validate[required]">
                                            <option value="">---Select Year---</option>
                                            <?php for($intCounter=1; $intCounter <= 12; $intCounter++) {?>
                                                <option value="<?php echo $intCounter; ?>"
                                                    <?php if ($intCounter == $years) {?>selected="selected" <?php }?>><?php echo $intCounter; ?></option>
                                            <?php } ?>
                                        </select>
                                        </div>
                                    </td>
                                </tr>

                               <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">Start Issue: </label>
                                        <div class="col-sm-7">
                                            <input class="form-control validate[required,custom[integer],min[1]] text-input" type="text" id="issue1s" name="start_issue" value="<?php echo $start_issue;?>" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">End Issue: </label>
                                        <div class="col-sm-7">
                                            <input class="form-control validate[required,custom[integer],min[1]] text-input" type="text" id="issue2s" name="end_issue" value="<?php echo $end_issue;?>" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">Start Date: </label>
                                        <div class="col-sm-7">
                                            <input class="form-control date validate[required]" type="text" id="camp_start_dates" name="start_date" data-date-format="d-M-yyyy" value="<?php echo date("d-M-Y",strtotime($start_date));?>" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">End Date: </label>
                                        <div class="col-sm-7">
                                            <input class="form-control date validate[required]" type="text" id="camp_end_dates" name="end_date" data-date-format="d-M-yyyy" value="<?php echo date("d-M-Y",strtotime($end_date));?>" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">Amount: </label>
                                        <div class="col-sm-7">
                                            <input class="form-control validate[required,custom[integer],min[1]] text-input" type="text" id="amounts" name="amount" value="<?php echo $amount;?>" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label  class="col-sm-4 control-label text-left">Total Issue: </label>
                                        <div class="col-sm-7">
                                            <input class="form-control validate[required,custom[integer],min[1]] text-input" type="text" id="edit_no_issues" name="no_issues" value="<?php echo $total_issue;?>"/>
                                        </div>
                                    </td>
                                </tr>
                                </table>
                            <div id="ajax_content">

                            </div>
                            <div id="edit_promo_issue_error" class="formErrorContent" align="center"></div><br>
                            <div id="edit_year_error" class="formErrorContent" align="center"></div>
                            <input type="hidden" value="<?php echo $row_id;?>" id="row_id_edits" readonly/>
                            <div class="form-group">
                                <div class="col-sm-offset-4 col-sm-8">
                                    <input type="hidden" id="system_base_url" value="<?php echo base_url();?>">
                                    <input type="hidden" id="UsedMagazineCodes" value="<?php echo $magazine_Id;?>">
                                    <input type="hidden" id="strCampId" value="<?php echo $intCampaignId;?>">
                                    <input type="hidden" id="intNumberOfYear" value="<?php echo $intNumberOfYear;?>">
                                    <input type="hidden" id="previous_id" value="">
                                    <button type="submit" class="btn btn-primary" id="btn_edit_campaing">Submit</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <!-- // Modal body END -->
        </div>
    </div>
</div>
<script src="<?php echo base_url();?>assets/js/main.js" type="text/javascript"></script>
<script src="<?php echo base_url();?>assets/js/subscriber.js" type="text/javascript"></script>
<script src="<?php echo base_url();?>assets/js/custom.js" type="text/javascript"></script>
<script src="<?php echo base_url();?>assets/plugins/forms_elements_multiselect/js/jquery.multi-select.js?v=v2.0.0-rc1&sv=v0.0.1.2"></script>
<script src="<?php echo base_url();?>assets/plugins/forms_elements_bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="<?php echo base_url();?>assets/js/jquery.validationEngine-en.js" type="text/javascript"></script>
<script src="<?php echo base_url();?>assets/js/jquery.validationEngine.js" type="text/javascript"></script>
<script>
    $(document).ready(function() {
        $('.date').datepicker();
        $("#subscribe_magazine_campaign_edit").validationEngine();
    });
</script>