<% # How to use this modal: # 1. Render it in the page (HTML) of your choice # 2. Add an element (e.g. ) with following attributes: # * data-trigger="invite-users", # * data-modal-id="modal-id", # # Modal parameters: # * modal_id: unique id so the JS works if multiple modals are present # on the same page # * type: # * 'invite_to_team' => params: team # * 'invite_to_team_with_role' => params: team # * 'invite', # * 'invite_with_team_selector', # * 'invite_with_team_selector_and_role' => params: role # * team: invite users to the specified team # * role: all users are invited as the specified role # * (optional) text_title: custom title text for modal # * (optional) text_invite_heading: custom invite heading text for modal %> <% text_title ||= nil text_invite_heading ||= nil invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role)) invite_with_team_selector = type.in?(%w(invite_new_members invite_with_team_selector invite_with_team_selector_and_role)) %>