{{$action := .Result}}

<div class="qor-page__body qor-page__edit">
  {{render "shared/flashes"}}
  {{render "shared/errors"}}

  <div class="qor-form-container" data-toggle="qor-action-slideout">
    <form action="{{.Context.Request.URL}}" method="POST" enctype="multipart/form-data">
      <input name="_method" value="PUT" type="hidden">

      {{if $action.Resource}}
        {{render_form $action.Resource.NewStruct (edit_sections $action.Resource)}}
      {{end}}

      <div class="qor-form__actions" style="margin-top: 0;margin-bottom:10px;">
        <button class="mdl-button mdl-button--colored mdl-button--raised mdl-js-button mdl-js-ripple-effect qor-button--save" type="submit">{{t "qor_admin.form.submit" "Submit"}}</button>
        <a class="mdl-button mdl-button--primary mdl-js-button mdl-js-ripple-effect qor-button--cancel" href="javascript:history.back();">{{t "qor_admin.form.cancel" "Cancel"}}</a>
      </div>
    </form>
  </div>
</div>
