<% url = @schema.new_record? ? super_admin_madmp_schemas_path : super_admin_madmp_schema_path(@schema) %>

 <%= form_for @schema, url: url, html: { class: 'schema' } do |f| %>
   <div class="form-group">
     <%= f.label(:label, _('Label'), class: 'control-label') %>
     <%= f.text_field(:label, class: "form-control", spellcheck: true, "aria-required": true) %>
   </div>
   <div class="form-group">
     <%= f.label(:name, _('Name'), class: 'control-label') %>
     <%= f.text_field(:name, class: "form-control", spellcheck: true, "aria-required": true) %>
   </div>
   <div class="form-group">
     <%= f.label(:name, _('Classname'), class: 'control-label') %>
     <%= f.text_field(:classname, class: "form-control", spellcheck: true, "aria-required": true) %>
   </div>
   <div class="form-group">
     <%= f.label(:version, _('Version'), class: 'control-label') %>
     <%= f.number_field(:version, class: "form-control", spellcheck: true, "aria-required": true) %>
   </div>
   <div class="form-group">
     <%= f.label(:schema, _('Schema')) %>
     <%= f.text_area(:schema, class: "form-control", rows: 10, value: @schema.schema.to_json) %>
   </div>
   <div class="pull-right">
     <%= f.button(_('Save'), class: "btn btn-default", type: "submit") %>
     <% unless @schema.new_record? %>
       <%= link_to(_('Delete'), super_admin_madmp_schema_path(@schema), class: 'btn btn-default',
         rel: 'nofollow', 'data-method': 'delete',
         'data-confirm': _("Are you sure you want to delete the schema \"%{title}\"?") % { title: @schema.name }) %>
     <% end %>
     <%= link_to(_('Cancel'), super_admin_madmp_schemas_path, class: 'btn btn-default', role: 'button') %>
   </div>
 <% end %>