{% load freeadmin %}<div data-dojo-type="dijit.layout.ContentPane" class="objrefresh" doLayout="false">
  <form data-dojo-type="dijit.form.Form" action="." enctype="multipart/form-data" method="post">{% csrf_token %}
    <script type="dojo/method" data-dojo-event="doSubmit" data-dojo-args="e, progressbar">
      var attrs = {
        form: this,
        event: e,
        url: '{{ request.path }}'
      }

      if(progressbar) {
        attrs['progressbar'] = {
          steps: [
          {% if "importing" in form_list %}
            {label: gettext("Importing volume")},
          {% endif %}
          {% if "volume" in form_list %}
            {label: gettext("Setting up volume")},
          {% endif %}
          {% if "shares" in form_list %}
            {label: gettext("Creating shares")},
          {% endif %}
          {% if "ds" in form_list %}
            {label: gettext("Joining directory service")},
          {% endif %}
            {label: gettext("Restarting services")}
          ],
          poolUrl: '{% url "system_initialwizard_progress" %}',
          fileUpload: false
        }
      }
      doSubmit(attrs);
    </script>
    <script type="dojo/event" data-dojo-event="onSubmit" data-dojo-args="e">
      {% block onSubmit %}
      this.doSubmit(e, true);
      {% endblock %}
    </script>
  <table class="form">
    {% block form %}
    {% dojo_render wizard.management_form %}
    <tr>
      <td colspan="2">
      {% trans "You are about to leave the Initial Wizard and perform all pending (saved) actions." %}
      <br />
      <br />
      {% trans "Are you sure?" %}
      </td>
    </tr>
    {% endblock %}
    <tr>
      <td colspan="2">
        <button id="btn_{% cls_name wizard.form %}_Ok" class="submitform" data-dojo-type="dijit.form.Button" type="submit" data-dojo-props="type:'submit'">
          {% block oklabel %}{% trans "Confirm" %}{% endblock %}
          <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
            this.set('label', '{% trans "Please wait..."|escapejs %}');
          </script>
        </button>
        {% if wizard.steps.prev %}
        <button data-dojo-type="dijit.form.Button" type="button">
          {% trans "Return to Wizard" %}
          <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
          var btn = this;
          require(["dijit/form/TextBox"], function(TextBox) {
            new TextBox({
              name: "wizard_goto_step",
              value: "{{ wizard.steps.first|escapejs }}",
              type: "hidden"
            }).placeAt(btn.domNode.parentNode.parentNode);
            var form = getForm(btn);
            form.doSubmit(evt, false);
          });
          </script>
        </button>
        {% endif %}
        <button id="btn_{{ verbose_name}}_Cancel" data-dojo-type="dijit.form.Button" class="cancelform">
            {% trans "Exit without saving" %}
            <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
                cancelDialog(this);
            </script>
        </button>
      </td>
    </tr>
  </table>
  </form>
</div>
