Browse Source

Move org field above role

pull/2596/head
Kat 2 years ago
parent
commit
2ba1e9798e
  1. 20
      app/views/users/edit.html.erb

20
app/views/users/edit.html.erb

@ -32,16 +32,6 @@
autocomplete: "tel-extension", autocomplete: "tel-extension",
spellcheck: "false" %> spellcheck: "false" %>
<% if current_user.data_coordinator? || current_user.support? %>
<% roles = current_user.assignable_roles.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<%= f.govuk_collection_radio_buttons :role,
roles,
:id,
:name,
legend: { text: "Role", size: "m" } %>
<% end %>
<% if UserPolicy.new(current_user, @user).edit_organisation? %> <% if UserPolicy.new(current_user, @user).edit_organisation? %>
<% null_option = [OpenStruct.new(id: "", name: "Select an option")] %> <% null_option = [OpenStruct.new(id: "", name: "Select an option")] %>
<% organisations = Organisation.filter_by_active.map { |org| OpenStruct.new(id: org.id, name: org.name) } %> <% organisations = Organisation.filter_by_active.map { |org| OpenStruct.new(id: org.id, name: org.name) } %>
@ -60,6 +50,16 @@
<% end %> <% end %>
<% end %> <% end %>
<% if current_user.data_coordinator? || current_user.support? %>
<% roles = current_user.assignable_roles.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<%= f.govuk_collection_radio_buttons :role,
roles,
:id,
:name,
legend: { text: "Role", size: "m" } %>
<% end %>
<%= f.govuk_submit "Save changes" %> <%= f.govuk_submit "Save changes" %>
</div> </div>
</div> </div>

Loading…
Cancel
Save