diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 12:09:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 12:09:22 +0000 |
commit | 286fe61013674fe2d245ffc8d2233baf09923e70 (patch) | |
tree | 2037291f5863105e54e75be056b49f7d62007cae /app/views | |
parent | 4cb5e5011abfe8d50ac3a7ebd0018c563c6d7af4 (diff) | |
download | gitlab-ce-286fe61013674fe2d245ffc8d2233baf09923e70.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/sessions/_new_base.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/sessions/_tabs_normal.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/sessions/_two_factor_otp.html.haml | 9 | ||||
-rw-r--r-- | app/views/admin/sessions/_two_factor_u2f.html.haml | 17 | ||||
-rw-r--r-- | app/views/admin/sessions/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/sessions/two_factor.html.haml | 15 | ||||
-rw-r--r-- | app/views/devise/shared/_omniauth_box.html.haml | 11 | ||||
-rw-r--r-- | app/views/projects/import/jira/show.html.haml | 24 | ||||
-rw-r--r-- | app/views/projects/issues/import_csv/_button.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/tags/new.html.haml | 12 | ||||
-rw-r--r-- | app/views/u2f/_authenticate.html.haml | 1 |
11 files changed, 89 insertions, 14 deletions
diff --git a/app/views/admin/sessions/_new_base.html.haml b/app/views/admin/sessions/_new_base.html.haml index 50fa48855c0..a8d678d2b61 100644 --- a/app/views/admin/sessions/_new_base.html.haml +++ b/app/views/admin/sessions/_new_base.html.haml @@ -1,7 +1,7 @@ = form_tag(admin_session_path, method: :post, html: { class: 'new_user gl-show-field-errors', 'aria-live': 'assertive'}) do .form-group - = label_tag :password, _('Password'), class: 'label-bold' - = password_field_tag :password, nil, class: 'form-control', required: true, title: _('This field is required.'), data: { qa_selector: 'password_field' } + = label_tag :user_password, _('Password'), class: 'label-bold' + = password_field_tag 'user[password]', nil, class: 'form-control', required: true, title: _('This field is required.'), data: { qa_selector: 'password_field' } .submit-container.move-submit-down = submit_tag _('Enter Admin Mode'), class: 'btn btn-success', data: { qa_selector: 'enter_admin_mode_button' } diff --git a/app/views/admin/sessions/_tabs_normal.html.haml b/app/views/admin/sessions/_tabs_normal.html.haml index 20830051d31..2e279013720 100644 --- a/app/views/admin/sessions/_tabs_normal.html.haml +++ b/app/views/admin/sessions/_tabs_normal.html.haml @@ -1,3 +1,3 @@ %ul.nav-links.new-session-tabs.nav-tabs.nav{ role: 'tablist' } %li.nav-item{ role: 'presentation' } - %a.nav-link.active{ href: '#login-pane', data: { toggle: 'tab', qa_selector: 'sign_in_tab' }, role: 'tab' }= _('Enter Admin Mode') + %a.nav-link.active{ href: '#login-pane', data: { toggle: 'tab', qa_selector: 'sign_in_tab' }, role: 'tab' }= tab_title diff --git a/app/views/admin/sessions/_two_factor_otp.html.haml b/app/views/admin/sessions/_two_factor_otp.html.haml new file mode 100644 index 00000000000..9d4acbf1b99 --- /dev/null +++ b/app/views/admin/sessions/_two_factor_otp.html.haml @@ -0,0 +1,9 @@ += form_tag(admin_session_path, { method: :post, class: "edit_user gl-show-field-errors js-2fa-form #{'hidden' if current_user.two_factor_u2f_enabled?}" }) do + .form-group + = label_tag :user_otp_attempt, _('Two-Factor Authentication code') + = text_field_tag 'user[otp_attempt]', nil, class: 'form-control', required: true, autofocus: true, autocomplete: 'off', title: _('This field is required.') + %p.form-text.text-muted.hint + = _("Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes.") + + .submit-container.move-submit-down + = submit_tag 'Verify code', class: 'btn btn-success' diff --git a/app/views/admin/sessions/_two_factor_u2f.html.haml b/app/views/admin/sessions/_two_factor_u2f.html.haml new file mode 100644 index 00000000000..09b91d76295 --- /dev/null +++ b/app/views/admin/sessions/_two_factor_u2f.html.haml @@ -0,0 +1,17 @@ +#js-authenticate-u2f +%a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code") + +%script#js-authenticate-u2f-in-progress{ type: "text/template" } + %p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.") + +-# haml-lint:disable NoPlainNodes +%script#js-authenticate-u2f-error{ type: "text/template" } + %div + %p <%= error_message %> (#{_("error code:")} <%= error_code %>) + %a.btn.btn-block.btn-warning#js-u2f-try-again= _("Try again?") + +%script#js-authenticate-u2f-authenticated{ type: "text/template" } + %div + %p= _("We heard back from your U2F device. You have been authenticated.") + = form_tag(admin_session_path, method: :post, id: 'js-login-u2f-form') do |f| + = hidden_field_tag 'user[device_response]', nil, class: 'form-control', required: true, id: "js-device-response" diff --git a/app/views/admin/sessions/new.html.haml b/app/views/admin/sessions/new.html.haml index a1d440f2cfd..0a7f20b861e 100644 --- a/app/views/admin/sessions/new.html.haml +++ b/app/views/admin/sessions/new.html.haml @@ -2,10 +2,10 @@ - page_title _('Enter Admin Mode') .row.justify-content-center - .col-6.new-session-forms-container + .col-md-5.new-session-forms-container .login-page #signin-container - = render 'admin/sessions/tabs_normal' + = render 'admin/sessions/tabs_normal', tab_title: _('Enter Admin Mode') .tab-content - if !current_user.require_password_creation_for_web? .login-box.tab-pane.active{ id: 'login-pane', role: 'tabpanel' } @@ -14,7 +14,7 @@ - if omniauth_enabled? && button_based_providers_enabled? .clearfix - = render 'devise/shared/omniauth_box' + = render 'devise/shared/omniauth_box', hide_remember_me: true -# Show a message if none of the mechanisms above are enabled - if current_user.require_password_creation_for_web? && !omniauth_enabled? diff --git a/app/views/admin/sessions/two_factor.html.haml b/app/views/admin/sessions/two_factor.html.haml new file mode 100644 index 00000000000..3a0cbe3facb --- /dev/null +++ b/app/views/admin/sessions/two_factor.html.haml @@ -0,0 +1,15 @@ +- @hide_breadcrumbs = true +- page_title _('Enter 2FA for Admin Mode') + +.row.justify-content-center + .col-md-5.new-session-forms-container + .login-page + #signin-container + = render 'admin/sessions/tabs_normal', tab_title: _('Enter Admin Mode') + .tab-content + .login-box.tab-pane.active{ id: 'login-pane', role: 'tabpanel' } + .login-body + - if current_user.two_factor_otp_enabled? + = render 'admin/sessions/two_factor_otp' + - if current_user.two_factor_u2f_enabled? + = render 'admin/sessions/two_factor_u2f' diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index 1b583ea85d6..cca0f756e76 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -10,8 +10,9 @@ = provider_image_tag(provider) %span = label_for_provider(provider) - %fieldset.remember-me - %label - = check_box_tag :remember_me, nil, false, class: 'remember-me-checkbox' - %span - Remember me + - unless defined?(hide_remember_me) && hide_remember_me + %fieldset.remember-me + %label + = check_box_tag :remember_me, nil, false, class: 'remember-me-checkbox' + %span + Remember me diff --git a/app/views/projects/import/jira/show.html.haml b/app/views/projects/import/jira/show.html.haml new file mode 100644 index 00000000000..f295a241113 --- /dev/null +++ b/app/views/projects/import/jira/show.html.haml @@ -0,0 +1,24 @@ +- title = _('Jira Issue Import') +- page_title title +- breadcrumb_title title +- header_title _("Projects"), root_path + += render 'import/shared/errors' + +- if @project.import_state&.in_progress? + %h3.page-title.d-flex.align-items-center + = sprite_icon('issues', size: 16, css_class: 'mr-1') + = _('Import in progress') +- else + %h3.page-title.d-flex.align-items-center + = sprite_icon('issues', size: 16, css_class: 'mr-1') + = _('Import issues from Jira') + + = form_tag import_project_import_jira_path(@project), method: :post do + .form-group.row + = label_tag :jira_project_key, _('From project'), class: 'col-form-label col-md-2' + .col-md-4 + = select_tag :jira_project_key, options_for_select(@jira_projects, ''), { class: 'select2' } + .form-actions + = submit_tag _('Import issues'), class: 'btn btn-success' + = link_to _('Cancel'), project_issues_path(@project), class: 'btn btn-cancel' diff --git a/app/views/projects/issues/import_csv/_button.html.haml b/app/views/projects/issues/import_csv/_button.html.haml index fe89d2fb748..78c561e81ef 100644 --- a/app/views/projects/issues/import_csv/_button.html.haml +++ b/app/views/projects/issues/import_csv/_button.html.haml @@ -7,3 +7,5 @@ - else = _('Import CSV') +- if Feature.enabled?(:jira_issue_import, @project) + = link_to _("Import Jira issues"), project_import_jira_path(@project), class: "btn btn-default" diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index a7f739ab13d..1b3b0972744 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -36,11 +36,19 @@ .form-group.row = label_tag :release_description, s_('TagsPage|Release notes'), class: 'col-form-label col-sm-2' .col-sm-10 + .form-text.mb-3 + - link_start = '<a href="%{url}" rel="noopener noreferrer" target="_blank">'.html_safe + - releases_page_path = project_releases_path(@project) + - releases_page_link_start = link_start % { url: releases_page_path } + - docs_url = help_page_path('user/project/releases/index.md', anchor: 'creating-a-release') + - docs_link_start = link_start % { url: docs_url } + - link_end = '</a>'.html_safe + - replacements = { releases_page_link_start: releases_page_link_start, docs_link_start: docs_link_start, link_end: link_end } + = s_('TagsPage|Optionally, create a public Release of your project, based on this tag. Release notes are displayed on the %{releases_page_link_start}Releases%{link_end} page. %{docs_link_start}More information%{link_end}').html_safe % replacements + = render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do = render 'projects/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files hereā¦'), current_text: @release_description = render 'shared/notes/hints' - .form-text.text-muted - = s_('TagsPage|Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.') .form-actions = button_tag s_('TagsPage|Create tag'), class: 'btn btn-success' = link_to s_('TagsPage|Cancel'), project_tags_path(@project), class: 'btn btn-cancel' diff --git a/app/views/u2f/_authenticate.html.haml b/app/views/u2f/_authenticate.html.haml index 979f6862de3..51018428b1b 100644 --- a/app/views/u2f/_authenticate.html.haml +++ b/app/views/u2f/_authenticate.html.haml @@ -1,7 +1,6 @@ #js-authenticate-u2f %a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code") --# haml-lint:disable InlineJavaScript %script#js-authenticate-u2f-in-progress{ type: "text/template" } %p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.") |