Newer
Older
dmpopidor / app / views / shared / _my_org.html.erb
<%= f.label :org_name, _('Organisation'), class: 'control-label' %>
<%= render partial: "shared/accessible_combobox",
             locals: {name: "#{f.object_name}[org_name]",
                      id: "#{f.object_name}_org_name",
                      default_selection: default_org,
                      models: orgs,
                      attribute: 'name'} %>

<% if allow_other_orgs %>
  <div class="clearfix"></div>
  <a href="#" id="other-org-link"><%= _('My organisation isn\'t listed.') %></a>

  <div class="clearfix"></div>
  <%= f.text_field :other_organisation, autocomplete: "off", class: "form-control hide", 
                   placeholder: _('Please enter the name of your organisation') %>
  <div class="form-group has-error">
    <span id="help-org" class="help-block" style="display:none"><%= _('Please select an organisation from the list, or enter your organisation\'s name.') %></span>
  </div>
<% end %>