<div metal:use-macro="request.sdiapi.main_template" i18n:domain="substanced">

  <div metal:fill-slot="main">
    <form action="@@${request.view_name}" method="POST">
      <fieldset>
        <input type="hidden"
               name="csrf_token" 
               value="${request.session.get_csrf_token()}"/>

        <div class="panel panel-default">
          <div class="panel-heading" i18n:translate="">Rename Items</div>
          <div class="panel-body">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th i18n:translate="">Old Name</th>
                  <th i18n:translate="">New Name</th>
                </tr>
              </thead>
              <tbody>
                <tr tal:repeat="item torename">
                  <td width="30%">${item.__name__}</td>
                  <td width="70%">
                    <input type="hidden"
                           name="item-rename"
                           value="${item.__name__}" />
                    <input type="text"
                           name="${item.__name__}"
                           value="${item.__name__}" />
                  </td>
                </tr>
              </tbody>

            </table>

            <div class="form-actions">
              <button id="rename"
                      name="form.rename_finish"
                      type="submit"
                      class="btn btn-primary"
                      value="rename_finish">
              <tal:block i18n:translate="">Rename all</tal:block>
              </button>
              <button id="duplicate"
                      name="form.rename_finish"
                      type="submit"
                      class="btn"
                      value="cancel">
              <tal:block i18n:translate="">Cancel</tal:block>
              </button>
            </div>
          </div>
        </div>
      </fieldset>
    </form>
  </div>

</div>
