<?php echo $header; ?>
<?php echo $column_left; ?>

<div id="content" class="isl-module-content">
  <script>var jsData = <?php echo json_encode($jsData); ?>;</script>
  <div class="page-header">
    <div class="container-fluid">
      <h1><?php echo $heading_title; ?></h1>

      <ul class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
          <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
        <?php } ?>
      </ul>

      <div class="pull-right">
        <button onclick="$('#form-isl-<?php echo $module['name']; ?>-promo').submit();" type="submit" class="save-changes btn btn-primary" data-toggle="tooltip" title="<?php echo $button_save; ?>"><i class="fa fa-save"></i></button>
        <a href="<?php echo $link_cancel; ?>" class="btn btn-default" data-toggle="tooltip" title="<?php echo $button_cancel; ?>"><i class="fa fa-reply"></i></a>
      </div>
    </div>
  </div>

  <div class="container-fluid">
    <?php if ($error_warning) { ?>
      <div class="alert alert-danger">
        <i class="fa fa-exclamation-circle" style="margin-right:10px"></i><?php echo $error_warning; ?>
      </div>
    <?php } ?>
    <?php if ($success) { ?>
      <div class="alert alert-success autoSlideUp">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <i class="fa fa-check-circle" style="margin-right:10px"></i><?php echo $success; ?>
      </div>
      <script>$('.autoSlideUp').delay(4000).fadeOut(600, function(){ $(this).show().css({'visibility':'hidden'}); }).slideUp(600);</script>
    <?php } ?>

    <div class="page-content">
      <div class="panel panel-default">
        <form action="<?php echo $link_form; ?>" method="post" enctype="multipart/form-data" id="form-isl-<?php echo $module['name']; ?>-promo" class="form-horizontal">

          <div class="panel-heading">
            <h3 id="_top" class="panel-title"><i class="fa fa-pencil"></i> <?php echo $sub_title; ?></h3>
          </div>

          <div class="panel-body" style="padding-top:25px">
            <div class="row">
              <div class="col-md-9">

                <div class="form-group required">
                  <label class="col-sm-3 control-label" for="entry-promo-title"><?php echo $entry_title; ?></label>
                  <div class="col-sm-9">
                    <div data-toggle="tooltip" title="Choose promotion title which will be visible in cart Total.">
                      <?php foreach ($languages as $lang) { ?>
                        <div class="input-group" style="margin-bottom:5px;">
                          <div class="input-group-addon"><img src="<?php echo $lang['flag_url']; ?>" title="<?php echo $lang['name']; ?>"></div>
                          <input type="text" id="entry-promo-title" name="<?php echo $module_setting; ?>[title][<?php echo $lang['language_id']; ?>]" value="<?php echo !empty($setting['item']['title'][$lang['language_id']]) ? $setting['item']['title'][$lang['language_id']] : ''; ?>" placeholder="Promotion title" class="form-control">
                        </div>
                      <?php } ?>
                    </div>
                    <div class="isl-notes">
                      <div class="pull-right isl-mb-5">
                        <a class="small pointer" onclick="$('#js-promo-notes').toggle();" data-toggle="tooltip" title="Note is not published anywhere. You can use it as internal information.">[ note ]</a>
                      </div>
                      <textarea name="<?php echo $module_setting; ?>[meta][notes]" id="js-promo-notes" cols="30" rows="10" class="form-control small" style="height:100px;padding:8px 10px;background:#f8f8f8;margin-bottom:25px; <?php echo empty($setting['item']['meta']['notes']) ? 'display:none;' : ''; ?>"><?php echo !empty($setting['item']['meta']['notes']) ? $setting['item']['meta']['notes'] : ''; ?></textarea>
                    </div>
                  </div>
                </div>

                <div class="form-group required" style="margin-top:5px;">
                  <label class="col-sm-3 control-label" for="entry-promo-group"><?php echo $entry_promo_rule; ?></label>
                  <div class="col-sm-9">
                    <select id="entry-promo-group" name="<?php echo $module_setting; ?>[rule_group]" class="form-control" style="width:250px">
                      <option value="shipping" <?php echo $setting['item']['rule_group'] == 'shipping' ? 'selected' : ''; ?>><?php echo $text_discount_shipping; ?></option>
                      <option value="product" <?php echo $setting['item']['rule_group'] == 'product' ? 'selected' : ''; ?>><?php echo $text_discount_product; ?></option>
                      <option value="manufacturer" <?php echo $setting['item']['rule_group'] == 'manufacturer' ? 'selected' : ''; ?>><?php echo $text_discount_manufacturer; ?></option>
                      <option value="category" <?php echo $setting['item']['rule_group'] == 'category' ? 'selected' : ''; ?>><?php echo $text_discount_category; ?></option>
                      <option value="order" <?php echo $setting['item']['rule_group'] == 'order' ? 'selected' : ''; ?>><?php echo $text_discount_order; ?></option>
                      <option value="customer" <?php echo $setting['item']['rule_group'] == 'customer' ? 'selected' : ''; ?>><?php echo $text_discount_customer; ?></option>
                    </select>

                    <div class="isl-promo-rule">
                      <!-- Group Shipping -->
                      <div class="promo-group-wrapper promo-group-shipping">
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxgetfreeshipping" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxgetfreeshipping; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxgetfreeshipping"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="freeshippingwhenoverx" class="js-promo-rule-type">
                            <?php echo $text_promo_freeshippingwhenoverx; ?>
                          </label>
                          <div class="promo-rule-wrapper freeshippingwhenoverx"></div>
                        </div>
                      </div><!-- end:: promo-group-shipping -->

                      <!-- Group Product -->
                      <div class="promo-group-wrapper promo-group-product">
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxgetx" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxgetx; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxgetx"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxgety" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxgety; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxgety"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxgetamountoffy" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxgetamountoffy; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxgetamountoffy"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="amountoffy" class="js-promo-rule-type">
                            <?php echo $text_promo_amountoffy; ?>
                          </label>
                          <div class="promo-rule-wrapper amountoffy"></div>
                        </div>
                      </div><!-- end:: promo-group-product -->

                      <!-- Group Manufacturer -->
                      <div class="promo-group-wrapper promo-group-manufacturer">
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="xoffitemsinybrands" class="js-promo-rule-type">
                            <?php echo $text_promo_xoffitemsinybrands; ?>
                          </label>
                          <div class="promo-rule-wrapper xoffitemsinybrands"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxgetysamebrands" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxgetysamebrands; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxgetysamebrands"></div>
                        </div>
                      </div><!-- end:: promo-group-manufacturer -->

                      <!-- Group Category -->
                      <div class="promo-group-wrapper promo-group-category">
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="percentoffitemsincat" class="js-promo-rule-type">
                            <?php echo $text_promo_percentoffitemsincat; ?>
                          </label>
                          <div class="promo-rule-wrapper percentoffitemsincat"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxgetysamecategory" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxgetysamecategory; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxgetysamecategory"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="buyxfromygetoffonz" class="js-promo-rule-type">
                            <?php echo $text_promo_buyxfromygetoffonz; ?>
                          </label>
                          <div class="promo-rule-wrapper buyxfromygetoffonz"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="xoffitemsinycategoriestiered" class="js-promo-rule-type">
                            <?php echo $text_promo_xoffitemsinycategoriestiered; ?>
                          </label>
                          <div class="promo-rule-wrapper xoffitemsinycategoriestiered"></div>
                        </div>
                      </div><!-- end:: promo-group-category -->

                      <!-- Group Order -->
                      <div class="promo-group-wrapper promo-group-order">
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="xamountoffwhenxormore" class="js-promo-rule-type">
                            <?php echo $text_promo_xamountoffwhenxormore; ?>
                          </label>
                          <div class="promo-rule-wrapper xamountoffwhenxormore"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="ordersofatleastxgety" class="js-promo-rule-type">
                            <?php echo $text_promo_ordersofatleastxgety; ?>
                          </label>
                          <div class="promo-rule-wrapper ordersofatleastxgety"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="ordersofatleastxgetyoffleastormostexpensiveproduct" class="js-promo-rule-type">
                            <?php echo $text_promo_ordersofatleastxgetyoffproduct; ?>
                          </label>
                          <div class="promo-rule-wrapper ordersofatleastxgetyoffleastormostexpensiveproduct"></div>
                        </div>
                      </div><!-- end:: promo-group-order -->

                      <!-- Group Customer -->
                      <div class="promo-group-wrapper promo-group-customer">
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="xoffforrepeatcustomers" class="js-promo-rule-type">
                            <?php echo $text_promo_xoffforrepeatcustomers; ?>
                          </label>
                          <div class="promo-rule-wrapper xoffforrepeatcustomers"></div>
                        </div>
                        <div class="radio">
                          <label>
                            <input type="radio" name="<?php echo $module_setting; ?>[rule_type]" value="xpercentoffforrepeatcustomers" class="js-promo-rule-type">
                            <?php echo $text_promo_xpercentoffforrepeatcustomers; ?>
                          </label>
                          <div class="promo-rule-wrapper xpercentoffforrepeatcustomers"></div>
                        </div>
                      </div><!-- end:: promo-group-customer -->

                    </div>

                  </div>
                </div> <!-- /.form-group (Promo group) -->

              </div>
              <div class="col-md-3">

                <div class="panel panel-default promo-group-wrapper promo-group-shipping promo-group-product promo-group-manufacturer promo-group-category promo-group-order promo-group-customer">
                  <div class="panel-heading"><?php echo $text_information; ?></div>

                  <div class="panel-body">
                    <ul class="isl-list">
                      <li class="promo-group-wrapper promo-group-shipping"><?php echo $text_info_promo_rule_shipping; ?></li>
                      <li class="promo-group-wrapper promo-group-product"><?php echo $text_info_promo_rule_product; ?></li>
                      <li class="promo-group-wrapper promo-group-manufacturer"><?php echo $text_info_promo_rule_manufacturer; ?></li>
                      <li class="promo-group-wrapper promo-group-category"><?php echo $text_info_promo_rule_category; ?></li>
                      <li class="promo-group-wrapper promo-group-order"><?php echo $text_info_promo_rule_order; ?></li>
                      <li class="promo-group-wrapper promo-group-customer"><?php echo $text_info_promo_rule_customer; ?></li>
                      <?php foreach ($text_info_promo_rule as $info) { ?>
                        <li class="promo-group-wrapper promo-group-product promo-group-manufacturer promo-group-category"><?php echo $info ?></li>
                      <?php } ?>
                    </ul>
                  </div>

                </div>

              </div> <!-- /.col-md-3 (information) -->
            </div> <!-- /.row (promo rule) -->

            <h3 id="_settings" class="isl-legend"><?php echo $text_settings; ?></h3>
            <hr class="isl-hr">

            <div class="row">
              <div class="col-md-9">

                <!-- Promo Options -->
                <div class="form-group">
                  <label class="col-sm-3 control-label"><?php echo $entry_promo_options; ?></label>
                  <div class="col-sm-9">

                    <div class="checkbox">
                      <label>
                        <input type="checkbox" name="<?php echo $module_setting; ?>[limit_usage]" value="1" <?php echo $setting['item']['limit_usage'] ? 'checked' : ''; ?>>
                        <?php echo str_replace('{x}', '<input type="number" name="' . $module_setting . '[limit_max_usage]" value="' . $setting['item']['limit_max_usage'] . '" min="0" class="form-control input-sm isl-inline-block isl-w-xs isl-mh-5">', $text_used_promotion); ?>
                        <i class="fa fa-question-circle text-primary isl-ml-5" data-toggle="tooltip" title="<?php echo $text_used_promotion_help; ?>"></i>
                      </label>
                    </div>
                    <div class="checkbox">
                      <label>
                        <input type="checkbox" name="<?php echo $module_setting; ?>[apply_special]"  value="1" <?php echo $setting['item']['apply_special'] ? 'checked' : ''; ?>> <?php echo $text_apply_special_price; ?>
                        <i class="fa fa-question-circle text-primary isl-ml-5" data-toggle="tooltip" title="<?php echo $text_apply_special_price_help; ?>"></i>
                      </label>
                    </div>
                    <div class="checkbox">
                      <label>
                        <input type="checkbox" name="<?php echo $module_setting; ?>[apply_coupon]"  value="1" <?php echo $setting['item']['apply_coupon'] ? 'checked' : ''; ?>>
                        <?php echo str_replace('{x}', '<input type="text" name="' . $module_setting . '[coupon_code]" value="' . $setting['item']['coupon_code'] . '" min="0" class="form-control input-sm isl-inline-block isl-w-s isl-mh-5" style="width:100px">', $text_apply_coupon); ?>
                        <i class="fa fa-question-circle text-primary isl-ml-5" data-toggle="tooltip" title="<?php echo $text_apply_coupon_price_help; ?>"></i>
                      </label>
                    </div>
                    <div class="checkbox">
                      <label>
                        <input type="checkbox" name="<?php echo $module_setting; ?>[stop]"  value="1" <?php echo $setting['item']['stop'] ? 'checked' : ''; ?>> <?php echo $text_stop_promotion; ?>
                        <i class="fa fa-question-circle text-primary isl-ml-5" data-toggle="tooltip" title="<?php echo $text_stop_promotion_help; ?>"></i>
                      </label>
                    </div>

                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label"><?php echo $entry_customer_group; ?></label>
                  <div class="col-sm-9 isl-js-toggle">

                    <div class="radio">
                      <label>
                        <input type="radio" name="<?php echo $module_setting; ?>[limit_customer_groups]" value="0" <?php echo !$setting['item']['limit_customer_groups'] ? 'checked' : ''; ?>>
                        <?php echo $text_all_customer; ?>
                      </label>
                    </div>

                    <div class="radio">
                      <label>
                        <input type="radio" name="<?php echo $module_setting; ?>[limit_customer_groups]" value="1" <?php echo $setting['item']['limit_customer_groups'] ? 'checked' : ''; ?>>
                        <?php echo $text_selected_customer; ?>
                      </label>
                      <div class="well well-sm isl-well isl-w-l isl-toggle-target" <?php echo !$setting['item']['limit_customer_groups'] ? 'style="display:none"' : ''; ?>>
                        <label data-toggle="tooltip" data-placement="left" title="Represent non-registered visitor">
                          <input type="checkbox" name="<?php echo $module_setting; ?>[customer_group_ids][]" value="0" <?php echo in_array(0, $setting['item']['customer_group_ids']) ? 'checked' : ''; ?>> Guest
                        </label>

                        <?php foreach ($customer_groups as $group) { ?>
                          <label>
                            <input type="checkbox" name="<?php echo $module_setting; ?>[customer_group_ids][]" value="<?php echo $group['customer_group_id']; ?>" <?php echo in_array($group['customer_group_id'], $setting['item']['customer_group_ids']) ? 'checked' : ''; ?>>
                            <?php echo $group['name']; ?>
                            <?php echo $group['customer_group_id'] == $default_cust_group ? '<b>(' . $text_default . ')</b>' : ''; ?>
                          </label>
                        <?php } ?>
                      </div>
                    </div>

                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label"><?php echo $entry_customer_profile; ?></label>
                  <div class="col-sm-9 isl-js-toggle">

                    <div class="radio">
                      <label>
                        <input type="radio" name="<?php echo $module_setting; ?>[limit_customer_profile]" value="0" <?php echo !$setting['item']['limit_customer_profile'] ? 'checked' : ''; ?>>
                        <?php echo $text_all_customer; ?>
                      </label>
                    </div>

                    <div class="radio">
                      <label>
                        <input type="radio" name="<?php echo $module_setting; ?>[limit_customer_profile]" value="1" <?php echo $setting['item']['limit_customer_profile'] ? 'checked' : ''; ?>>
                        <?php echo $text_selected_customer_profile; ?>
                      </label>
                      <div class="isl-margin isl-w-l isl-mt-10 isl-toggle-target" <?php echo !$setting['item']['limit_customer_profile'] ? 'style="display:none"' : ''; ?>>
                        <input type="text" placeholder="Type customer name" data-isl-autocomplete='{"type":"customer", "target":"isl-autocomplete-customer", "name":"<?php echo $module_setting; ?>[customer_ids][]"}' class="form-control input-sm">
                        <div class="well well-sm isl-well isl-autocomplete-customer">
                          <?php foreach ($customer_ids as $customer) { ?>
                            <div class="isl-autocomplete-customer<?php echo $customer['customer_id']; ?>"><i class="fa fa-minus-circle pointer"></i> <?php echo $customer['name']; ?><input type="hidden" name="<?php echo $module_setting; ?>[customer_ids][]" value="<?php echo $customer['customer_id']; ?>"></div>
                          <?php } ?>
                        </div>
                      </div>
                    </div>

                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label"><?php echo $entry_stores; ?></label>
                  <div class="col-sm-9">

                    <div class="well well-sm isl-well isl-w-l">
                      <?php foreach ($stores as $store) { ?>
                        <label>
                          <input type="checkbox" name="<?php echo $module_setting; ?>[stores][]" value="<?php echo $store['store_id']; ?>" <?php echo in_array($store['store_id'], $setting['item']['stores']) ? 'checked' : ''; ?>>
                          <?php echo $store['name']; ?>
                        </label>
                      <?php } ?>
                    </div>

                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label"><?php echo $entry_date_duration; ?></label>
                  <div class="col-sm-9">

                    <div class="col-sm-4" style="padding-left:0">
                      <div class="input-group date">
                        <input type="text" name="<?php echo $module_setting; ?>[date_start]" value="<?php echo date('Y-m-d', strtotime($setting['item']['date_start'])); ?>" data-date-format="YYYY-MM-DD" class="form-control" data-toggle="tooltip" title="Start date">
                        <span class="input-group-btn">
                          <button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button>
                        </span>
                      </div>
                    </div>

                    <div class="col-sm-4">
                      <div class="input-group date">
                        <input type="text" id="date-end" name="<?php echo $module_setting; ?>[date_end]" value="<?php echo $setting['item']['date_end'] ? date('Y-m-d', strtotime($setting['item']['date_end'])) : ''; ?>" data-date-format="YYYY-MM-DD" class="form-control"  data-toggle="tooltip" title="End date">
                        <a onclick="$('#date-end').val('')" class="pointer text-muted" data-toggle="tooltip" title="Clear date end" style="position:absolute;right:-15px;top:.5em;"><i class="fa fa-close"></i></a>
                        <span class="input-group-btn">
                          <button class="btn btn-default" type="button"><i class="fa fa-calendar"></i></button>
                        </span>
                      </div>
                    </div>

                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label" for="entry-promo-priority"><?php echo $entry_priority_order; ?></label>
                  <div class="col-sm-6 col-md-3">
                    <input type="number" name="<?php echo $module_setting; ?>[priority]" value="<?php echo $setting['item']['priority']; ?>" min="0" id="entry-promo-priority" class="form-control isl-w-s isl-inline-block">
                    <i class="fa fa-question-circle text-primary isl-ml-5" data-toggle="tooltip" title="Promotion priority is the order in which they will be executed.<br><br>Info: Order 0 will be executed in last order."></i>
                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label" for="entry-promo-status"><?php echo $entry_status; ?></label>
                  <div class="col-sm-6 col-md-3">
                    <select id="entry-promo-status" name="<?php echo $module_setting; ?>[status]" class="form-control">
                      <option value="1" <?php echo $setting['item']['status'] == '1' ? 'selected="selected"' : ''; ?>><?php echo $text_enabled; ?></option>
                      <option value="0" <?php echo $setting['item']['status'] != '1' ? 'selected="selected"' : ''; ?>><?php echo $text_disabled; ?></option>
                    </select>
                  </div>
                </div>

              </div> <!-- /.col-md-9 (settings form) -->

              <div class="col-md-3">

                <?php if ($text_info_promo_setting) { ?>
                  <div class="panel panel-default">
                    <div class="panel-heading"><?php echo $text_information; ?></div>

                    <div class="panel-body">
                      <ul class="isl-list">
                        <?php foreach ($text_info_promo_setting as $info) { ?>
                          <li><?php echo $info ?></li>
                        <?php } ?>
                      </ul>
                    </div>

                  </div>
                <?php } ?>

              </div> <!-- /.col-md-3 (information) -->
            </div> <!-- /.row (settings) -->


            <h3 id="_design" class="isl-legend"><?php echo $text_design_options; ?></h3>
            <hr class="isl-hr">

            <div class="row">
              <div class="col-md-9">

                <div class="form-group">
                  <label class="col-sm-3 control-label" for="entry-design-status"><?php echo $entry_design_status; ?></label>
                  <div class="col-sm-6 col-md-3">
                    <select id="entry-design-status" name="<?php echo $module_setting; ?>[design_status]" class="form-control">
                      <option value="1" <?php echo $setting['item']['design_status'] == '1' ? 'selected="selected"' : ''; ?>><?php echo $text_enabled; ?></option>
                      <option value="0" <?php echo $setting['item']['design_status'] != '1' ? 'selected="selected"' : ''; ?>><?php echo $text_disabled; ?></option>
                    </select>
                  </div>
                </div>

                <div class="form-group required">
                  <label class="col-sm-3 control-label"><?php echo $entry_module_banner; ?></label>
                  <div class="col-sm-9">
                    <a href="#" id="thumb-module-banner" data-toggle="image" class="img-thumbnail">
                      <img src="<?php echo $setting['item']['design_module_banner_thumb']; ?>" alt="" title="" data-placeholder="<?php echo $no_image; ?>" >
                    </a>
                    <input type="hidden" name="<?php echo $module_setting; ?>[design_module_banner]" value="<?php echo $setting['item']['design_module_banner']; ?>" id="input-module-banner" >
                  </div>
                </div>

                <div class="form-group">
                  <label class="col-sm-3 control-label"><?php echo $entry_page_header_banner; ?></label>
                  <div class="col-sm-9">
                    <a href="#" id="thumb-page-banner" data-toggle="image" class="img-thumbnail">
                      <img src="<?php echo $setting['item']['design_page_banner_thumb']; ?>" alt="" title="" data-placeholder="<?php echo $no_image; ?>" >
                    </a>
                    <input type="hidden" name="<?php echo $module_setting; ?>[design_page_banner]" value="<?php echo $setting['item']['design_page_banner']; ?>" id="input-page-banner" >
                  </div>
                </div>

                <div class="form-group">
                  <div class="col-sm-3">
                    <label class="control-label" style="display:block"><?php echo $entry_page_message; ?></label>
                    <div class="small" style="margin-top: 20px">
                      <?php echo $entry_page_message_help ?>
                    </div>
                  </div>
                  <div class="col-sm-9">
                    <ul class="nav nav-tabs langTabs">
                      <?php foreach ($languages as $lang) { ?>
                        <li><a href="#design_page_message_<?php echo $lang['language_id']; ?>" data-toggle="tab"><img src="<?php echo $lang['flag_url']; ?>"> <?php echo $lang['name']; ?></a></li>
                      <?php } ?>
                    </ul>

                    <div class="tab-content">
                      <?php foreach ($languages as $lang) { ?>
                        <div id="design_page_message_<?php echo $lang['language_id']; ?>" class="tab-pane fade">
                          <textarea name="<?php echo $module_setting; ?>[design_page_message][<?php echo $lang['language_id']; ?>]" placeholder="" class="form-control" data-isl-summernote='250'>
<?php echo !empty($setting['item']['design_page_message'][$lang['language_id']]) ? $setting['item']['design_page_message'][$lang['language_id']] : ''; ?>
                          </textarea>
                        </div>
                      <?php } ?>
                    </div>
                  </div>
                </div>

              </div> <!-- /.col-md-9 (design form) -->

              <div class="col-md-3">

                <div class="panel panel-default">
                  <div class="panel-heading"><?php echo $text_information; ?></div>

                  <div class="panel-body">
                    <ul class="isl-list">
                      <?php foreach ($text_info_promo_design_options as $info) { ?>
                        <li><?php echo $info ?></li>
                      <?php } ?>
                    </ul>
                  </div>

                </div>

              </div> <!-- /.col-md-3 (information) -->
            </div> <!-- /.row (design) -->

            <h3 id="_notification" class="isl-legend"><?php echo $text_notifications; ?></h3>
            <hr class="isl-hr">


            <div class="row">
              <div class="col-md-9">

                <div class="promo-notification-wrapper"><?php echo $text_select_promo_rule; ?></div>

              </div> <!-- /.col-md-9 (notification form) -->

              <div class="col-md-3">

                <div class="panel panel-default">
                  <div class="panel-heading"><?php echo $text_information; ?></div>

                  <div class="panel-body">
                    <ul class="isl-list">
                      <?php foreach ($text_info_promo_notifications as $info) { ?>
                        <li><?php echo $info ?></li>
                      <?php } ?>
                    </ul>
                  </div>

                </div>

              </div> <!-- /.col-md-3 (information) -->
            </div> <!-- /.row (notification) -->

          </div> <!-- /.panel-body -->

        </form>
      </div>
    </div> <!-- /.page-content -->

  </div>

<script type="text/javascript" src="view/javascript/summernote/summernote.js"></script>
<link href="view/javascript/summernote/summernote.css" rel="stylesheet" />

<?php if ($setting['item']['rule_type']) { ?>
<script>
  $("input:radio[value=<?php echo $setting['item']['rule_type']; ?>]").prop('checked', true);
  loadNotification("<?php echo $setting['item']['rule_type']; ?>");
  loadRuleType("<?php echo $setting['item']['rule_type']; ?>", "<?php echo $setting['item']['rule_group'] . '_' . $setting['item']['rule_type']; ?>");
</script>
<?php } ?>
</div> <!-- /.isl-module-content -->

<?php echo $footer; ?>
