portal-template/app/views/admin/portal_template/_role_setting.html.erb

26 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%= form_for(@portal_setting, :html =>{:class=>"form-horizontal", :style=>"margin: 0;"}, :remote => true, :url => "/admin/portal_template_setting" ) do |f| %>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel"><%= t("_roles") %></h3>
</div>
<div class="modal-body">
<div class="control-group">
<label class="control-label">Role for <%= @role_type %></label>
<div class="controls">
<select name="portal_setting[<%= @role_type %>_role]">
<option value="">Select Role</option>
<% @authorizations.each do |auth| %>
<% if auth.role.id != @portal_setting.offerer_role && auth.role.id != @portal_setting.applicant_role %>
<option value="<%= auth.role.id %>"><%= auth.role.title %></option>
<% end %>
<% end %>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<input type="hidden" name="role_type" value="<%= @role_type %>">
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
<a class="btn" data-dismiss="modal"><%= t('cancel') %></a>
</div>
<% end %>