{{$actions := load_actions "new"}}
{{if $actions}}
  <div class="qor-page__header">
    {{$actions}}
  </div>
{{end}}

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

  <div class="qor-form-container">
    <form class="qor-form" action="{{url_for .Resource}}" method="POST" enctype="multipart/form-data">
      {{render_form .Result new_sections }}

      {{if has_create_permission .Resource}}
        <div class="qor-form__actions">
          <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.add" "Add" }}</button>
          </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>
      {{end}}
    </form>
  </div>
</div>
