Last active
December 15, 2015 21:59
-
-
Save px-amaac/5329319 to your computer and use it in GitHub Desktop.
Bootstrap stuff from appscomposer--its crap see my replacement code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%-# from users/indes.html.erb -%> | |
<a data-toggle="modal" href="#role-options-<%= user.id %>" class="btn btn-mini" type="button">Change role</a> | |
<%-# from users/_user.html.erb -%> | |
<div id="role-options-<%= user.id %>" class="modal" style="display: none;"> | |
<%= simple_form_for user, :url => user_path(user), :html => {:method => :put, :class => 'form-horizontal' } do |f| %> | |
<div class="modal-header"> | |
<a class="close" data-dismiss="modal">×</a> | |
<h3>Change Role</h3> | |
</div> | |
<div class="modal-body"> | |
<%= f.input :role_ids, :collection => Role.all, :as => :radio_buttons, :label_method => lambda {|t| t.name.titleize}, :label => false, :item_wrapper_class => 'inline', checked: user.role_ids.first %> | |
</div> | |
<div class="modal-footer"> | |
<%= f.submit "Change Role", :class => "btn" %> | |
<a class="btn" data-dismiss="modal" href="#">Close</a> | |
</div> | |
<% end %> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment