app/views/staff/teammates/_role_controls.html.haml
= teammate.role
- if current_user.organizer_for_event?(current_event)
= link_to '#', class: 'change-role', data: { toggle: 'modal', target: "#teammate-change-role-#{teammate.id}" } do
.fa.fa-pencil
%div{ id: "teammate-change-role-#{teammate.id}", class: 'modal fade' }
.modal-dialog
.modal-content
= form_for teammate, url: event_staff_teammate_path(teammate.event, teammate), html: { role: 'form' } do |f|
.modal-header
%h3 Change #{teammate.name}'s role
.modal-body
= f.label :role
= f.select :role, Teammate::STAFF_ROLES, class: 'form-control'
.modal-footer
%button.btn.btn-default{'data-dismiss' => "modal"} Cancel
%button.pull-right.btn.btn-primary{:type => "submit"} Save