<%! from django.utils.translation import ugettext as _ %>
<%! from django.core.urlresolvers import reverse %>
<%page args="section_data"/>
<section id="edit-coupon-modal" class="modal" role="dialog" tabindex="-1" aria-label="${_('Edit Coupon')}">
  <div class="inner-wrapper">
    <button class="close-modal">
      <i class="icon-remove"></i>
      <span class="sr">
        ## Translators: this is a control to allow users to exit out of this modal interface (a menu or piece of UI that takes the full focus of the screen)
        ${_('Close')}
      </span>
    </button>

    <div id="coupon-content">
      <header>
        <h2>${_("Update Coupon")}</h2>
      </header>

      <div class="instructions">
        <p>
          ${_("Update Coupon Information")}</p>
      </div>

      <form id="edit_coupon_form" action="${section_data['ajax_update_coupon']}" method="post" data-remote="true">
        <div id="coupon_form_error" class="modal-form-error"></div>
        <fieldset class="group group-form group-form-requiredinformation">
          <legend class="is-hidden">${_("Required Information")}</legend>

          <ol class="list-input">
            <li class="field required text" id="edit-coupon-modal-field-code">
              <label for="edit_coupon_code" class="required">${_("Code")}</label>
              <input class="field readonly" id="edit_coupon_code" type="text" name="code" maxlength="16" value="" placeholder="example: A123DS"
                    readonly aria-required="true"/>
            </li>
            <li class="field required text" id="edit-coupon-modal-field-discount">
              <label for="edit_coupon_discount" class="required">${_("Percentage Discount")}</label>
              <input class="field readonly" id="edit_coupon_discount" type="text" name="discount" value="" maxlength="3"
                     readonly aria-required="true"/>
            </li>

            <li class="field" id="edit-coupon-modal-field-description">
              <label for="edit_coupon_description">${_("Description")}</label>
              <textarea class="field" id="edit_coupon_description" type="text" name="description" value=""
                    aria-required="true"></textarea>
            </li>

            <li class="field" id="edit-coupon-modal-field-course_id">
              <label for="edit_coupon_course_id">${_("Course ID")}</label>
              <input class="field readonly" id="edit_coupon_course_id" type="text" name="course_id" value=""
                     readonly aria-required="true"/>
            </li>

          </ol>
        </fieldset>

        <div class="submit">
          <input type="hidden" name="coupon_id" id="coupon_id"/>
          <input name="submit" type="submit" id="update_coupon_button" value="${_('Update Coupon')}"/>
        </div>
      </form>
    </div>
  </div>
</section>
