Newer
Older
dmpopidor / app / views / branded / org_admin / departments / new.html.erb
<% departments_url = admin_edit_org_path(@org_id) + '#departments' %>
<div class="row">
  <div class="col-md-12">
    <h1><%= d_('dmpopidor', 'Create a Structure') %></h1>
    <%= link_to d_('dmpopidor', 'View all structures'), departments_url, class: 'btn btn-default pull-right' %>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <%= form_for :department, url: org_departments_path(@org_id), html: { method: :post, id: 'create_department_form' } do |f| %>
        <%= f.hidden_field :org_id, value: @org_id %>
        <div class="form-group col-xs-8">
          <%= f.label _('Name'), for: :name, class: "control-label" %>
          <%= f.text_field :name, as: :string, class: "form-control", spellcheck: true, 'aria-required': true, 'data-toggle': 'tooltip', title: _('Add the name of a structure.') %>
        </div>
        <div class="form-group col-xs-8">
          <%= f.label _('Abbreviated name or Code'), for: :code, class: "control-label" %>
          <%= f.text_field :code, as: :string, class: "form-control", 'aria-required': false, 'data-toggle': 'tooltip', title: d_('dmpopidor', 'Add the abbreviated name or code for the structure.') %>
        </div>
        <!-- submit buttons -->
        <div class="form-group col-xs-8">
          <%= f.submit _('Save'), name: "draft", class: "btn btn-primary" %>
          <%= link_to _('Cancel'), departments_url, class: "btn btn-primary", role: 'button' %>
        </div>
    <% end %>
  </div>
</div>