Newer
Older
dmpopidor / app / views / orgs / admin_edit.html.erb
<% javascript 'views/orgs/admin_edit.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 %>
            <span>
              <%= f.check_box :remove_logo, title: _("This will remove your organisation's logo") %>
              <%= f.label _('Use the %{application_name} logo instead') % {application_name: Rails.configuration.branding[:application][:name]}, for: :remove_logo %>
            </span>
          </div>
        <% end %>
      </div>
      
      <div class="form-input">
        <%= f.label _('Top banner text'), for: @org.banner_text %>
        <%= 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>
      
      <div class="form-input">
        <div class="button-spacer">&nbsp;</div>
        <%= 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>
    </fieldset>
  <% end %>
</div>

<%= tinymce :content_css => asset_path('application.css') %>