<div class="form-group promo-type-wrapper-ntf show promo-type-congrats buyxgetfreeshipping freeshippingwhenoverx buyxgetx buyxgety buyxgetamountoffy amountoffy xoffitemsinybrands buyxgetysamebrands percentoffitemsincat buyxgetysamecategory buyxfromygetoffonz xoffitemsinycategoriestiered xamountoffwhenxormore ordersofatleastxgety ordersofatleastxgetyoffleastormostexpensiveproduct xoffforrepeatcustomers xpercentoffforrepeatcustomers">
  <label class="col-sm-3 control-label">{{ text_ntf_congrats }}</label>
  <div class="col-sm-9">

    <ul class="nav nav-tabs langTabsNtf">
      {% for lang in languages %}
        <li><a href="#message_congrats_{{ lang['language_id'] }}" data-toggle="tab"><img src="{{ lang['flag_url'] }}"> {{ lang['name'] }}</a></li>
      {% endfor %}
    </ul>

    <div class="tab-content">
      {% for lang in languages %}
        <div id="message_congrats_{{ lang['language_id'] }}" class="tab-pane fade">
          <textarea name="{{ module_setting }}[message_congrats][{{ lang['language_id'] }}]" placeholder="" class="form-control" data-isl-summernote-ntf='100'>
{% if setting['item']['message_congrats_temp'][lang['language_id']] is not empty and promo_reset is not empty %}
{{ setting['item']['message_congrats'][lang['language_id']] }}
{% elseif setting['ntf_template'][promo_type ~ '_congrats'] is not empty %}
{{ setting['ntf_template'][promo_type ~ '_congrats'] }}
{% else %}
{{ setting['ntf_template']['congrats'] }}
{% endif %}
          </textarea>
        </div>
      {% endfor %}
    </div>

  </div>
</div>

<div class="form-group promo-type-wrapper-ntf show promo-type-eligible buyxgetx buyxgety buyxgetamountoffy buyxgetysamebrands buyxgetysamecategory buyxfromygetoffonz ordersofatleastxgety">
  <label class="col-sm-3 control-label">{{ text_ntf_eligible }}</label>
  <div class="col-sm-9">

    <ul class="nav nav-tabs langTabsNtf">
      {% for lang in languages %}
        <li><a href="#message_eligible_{{ lang['language_id'] }}" data-toggle="tab"><img src="{{ lang['flag_url'] }}"> {{ lang['name'] }}</a></li>
      {% endfor %}
    </ul>

    <div class="tab-content">
      {% for lang in languages %}
        <div id="message_eligible_{{ lang['language_id'] }}" class="tab-pane fade">
          <textarea name="{{ module_setting }}[message_eligible][{{ lang['language_id'] }}]" placeholder="" class="form-control" data-isl-summernote-ntf='100'>
{% if setting['item']['message_eligible'][lang['language_id']] is not empty and promo_reset is not empty %}
{{ setting['item']['message_eligible'][lang['language_id']] }}
{% elseif setting['ntf_template'][promo_type ~ '_eligible'] is not empty %}
{{ setting['ntf_template'][promo_type ~ '_eligible'] }}
{% else %}
{{ setting['ntf_template']['eligible'] }}
{% endif %}
          </textarea>
        </div>
      {% endfor %}
    </div>

  </div>
</div>

<div class="form-group promo-type-wrapper-ntf show promo-type-upsell freeshippingwhenoverx buyxgetx buyxgety buyxgetamountoffy amountoffy buyxgetysamebrands buyxgetysamecategory buyxfromygetoffonz xoffitemsinycategoriestiered xamountoffwhenxormore ordersofatleastxgety ordersofatleastxgetyoffleastormostexpensiveproduct xoffforrepeatcustomers xpercentoffforrepeatcustomers">
  <label class="col-sm-3 control-label">{{ text_ntf_upsell }}</label>
  <div class="col-sm-9">

    <ul class="nav nav-tabs langTabsNtf">
      {% for lang in languages %}
        <li><a href="#message_upsell_{{ lang['language_id'] }}" data-toggle="tab"><img src="{{ lang['flag_url'] }}"> {{ lang['name'] }}</a></li>
      {% endfor %}
    </ul>

    <div class="tab-content">
      {% for lang in languages %}
        <div id="message_upsell_{{ lang['language_id'] }}" class="tab-pane fade">
          <textarea name="{{ module_setting }}[message_upsell][{{ lang['language_id'] }}]" placeholder="" class="form-control" data-isl-summernote-ntf='100'>
{% if setting['item']['message_upsell'][lang['language_id']] is not empty and promo_reset is not empty %}
{{ setting['item']['message_upsell'][lang['language_id']] }}
{% elseif setting['ntf_template'][promo_type ~ '_upsell'] is not empty %}
{{ setting['ntf_template'][promo_type ~ '_upsell'] }}
{% else %}
{{ setting['ntf_template']['upsell'] }}
{% endif %}
          </textarea>
        </div>
      {% endfor %}
    </div>

  </div>
</div>

<script>
$(document).trigger('isl.summernote');

$('.promo-type-wrapper-ntf').removeClass('show');
setTimeout(function() {
  $('.promo-type-wrapper-ntf.{{ promo_type }}').addClass('show');
}, 200);

$('.langTabsNtf').each(function() {
  $(this).find('a:first').tab('show');
});
</script>
