Newer
Older
dmpopidor / app / views / orgs / admin_edit.html.erb
@briley briley on 22 Jun 2017 2 KB css rewrite
<% javascript 'admin.js' %>

<h1>
  <%= _('Organisation details') %>
</h1>

<div class="content">
  <%= form_for(@org, url: admin_update_org_path(@org), html: { class: "roadmap-form bordered", multipart: true, id: "edit_org_details",  method: :put}) do |f| %>

    <fieldset class="side-by-side">
      <div class="form-input">
        <%= f.label :name %>*
        <%= f.text_field :name, class: "left-indent required input-large" %>
      </div>
      <div class="form-input">
        <%= f.label :abbreviation %>*
        <%= f.text_field :abbreviation, class: "left-indent required input-small" %>
      </div>
      
      <div class="form-input">
        <%= f.label :logo %>
        <%= f.file_field :logo, class: 'left-indent' %>
               
        <% if @org.logo.present? %>
          <div class="org-logo">
            <%= image_tag @org.logo.url %>
            <%= f.check_box :remove_logo %>&nbsp;&nbsp;&nbsp;<%= _('If you decide to use the default DMPRoadmap logo, please check this box to remove your current logo.') %>
          </div>
        <% end %>
      </div>
      
      <div class="form-input">
        <label><%= _('Top banner text') %></label>
        <%= text_area_tag("org_banner_text", @org.banner_text, class: "tinymce left-indent top-indent") %>
      </div>
      
      <div class="form-input">
        <%= f.label :target_url %>
        <%= f.text_field :target_url, class: "left-indent required input-large top-indent" %>
      </div>
      <div class="form-input">
        <%= f.label :contact_email %>
        <%= f.text_field :contact_email, class: "left-indent required input-medium" %>
      </div>
    </fieldset>
    <div class="div_clear"></div>

    <div class="form-input">
      <label></label>
      <%= render partial: 'shared/accessible_submit_button',
                 locals: {id: 'save_org_submit', 
                          val: 'Save', 
                          disabled_initially: true,
                          tooltip: _('Name and abbreviation are required'),
                          classes: 'left-indent'} %>
    </div>
  <% end %>
</div>

<%= tinymce %>