2020-03-13 15:44:24 +05:30
- access_levels = local_assigns[:access_levels]
- default_access_level = local_assigns[:default_access_level]
- submit_url = local_assigns[:submit_url]
- can_import_members = local_assigns[:can_import_members?]
- import_path = local_assigns[:import_path]
2017-09-10 17:25:29 +05:30
.row
.col-sm-12
2021-01-29 00:20:46 +05:30
= form_tag submit_url, class: 'invite-users-form', data: { testid: 'invite-users-form' }, method: :post do
2017-09-10 17:25:29 +05:30
.form-group
2019-10-12 21:52:04 +05:30
= label_tag :user_ids, _("GitLab member or Email address"), class: "label-bold"
2020-03-13 15:44:24 +05:30
= users_select_tag(:user_ids, multiple: true, class: 'input-clamp qa-member-select-field', scope: :all, email_user: true, placeholder: 'Search for members to update or invite')
2017-09-10 17:25:29 +05:30
.form-group
2021-09-04 01:27:46 +05:30
= label_tag :access_level, _("Select a role"), class: "label-bold"
2017-09-10 17:25:29 +05:30
.select-wrapper
2020-03-13 15:44:24 +05:30
= select_tag :access_level, options_for_select(access_levels, default_access_level), class: "form-control project-access-select select-control"
2021-01-29 00:20:46 +05:30
= sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200")
2020-10-24 23:57:45 +05:30
.form-text.text-muted.gl-mb-3
2019-03-02 22:35:43 +05:30
- permissions_docs_path = help_page_path('user/permissions')
- link_start = %q{<a href="%{url}">}.html_safe % { url: permissions_docs_path }
2021-09-04 01:27:46 +05:30
= _("%{link_start}Learn more%{link_end} about roles.").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
2017-09-10 17:25:29 +05:30
.form-group
2020-11-24 15:15:51 +05:30
= label_tag :expires_at, _('Access expiration date'), class: 'label-bold'
2017-09-10 17:25:29 +05:30
.clearable-input
= text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date'
2020-11-24 15:15:51 +05:30
= sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input gl-text-gray-200')
2021-06-08 01:23:25 +05:30
= submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-2", data: { qa_selector: 'invite_member_button' }
2020-03-13 15:44:24 +05:30
- if can_import_members
2021-03-08 18:12:59 +05:30
= link_to _("Import"), import_path, class: "gl-button btn btn-default", title: _("Import members from another project")