diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-26 12:06:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-26 12:06:00 +0000 |
commit | 5707f305f4b961e24369fcdaecf0b8ce1c34bad8 (patch) | |
tree | 3b291653b83b3e6c2bffc77c54527fbe6f6373be /app/views/admin/sessions | |
parent | 759cd6c2985088d187ed519f2a881c2c690b34ec (diff) | |
download | gitlab-ce-5707f305f4b961e24369fcdaecf0b8ce1c34bad8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/admin/sessions')
-rw-r--r-- | app/views/admin/sessions/_new_base.html.haml | 7 | ||||
-rw-r--r-- | app/views/admin/sessions/_signin_box.html.haml | 11 | ||||
-rw-r--r-- | app/views/admin/sessions/_tabs_normal.html.haml | 3 | ||||
-rw-r--r-- | app/views/admin/sessions/new.html.haml | 15 |
4 files changed, 36 insertions, 0 deletions
diff --git a/app/views/admin/sessions/_new_base.html.haml b/app/views/admin/sessions/_new_base.html.haml new file mode 100644 index 00000000000..55aea0296e7 --- /dev/null +++ b/app/views/admin/sessions/_new_base.html.haml @@ -0,0 +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' } + + .submit-container.move-submit-down + = submit_tag _('Enter admin mode'), class: 'btn btn-success', data: { qa_selector: 'sign_in_button' } diff --git a/app/views/admin/sessions/_signin_box.html.haml b/app/views/admin/sessions/_signin_box.html.haml new file mode 100644 index 00000000000..69baa76060e --- /dev/null +++ b/app/views/admin/sessions/_signin_box.html.haml @@ -0,0 +1,11 @@ +- if form_based_providers.any? + + - if password_authentication_enabled_for_web? + .login-box.tab-pane{ id: 'login-pane', role: 'tabpanel' } + .login-body + = render 'admin/sessions/new_base' + +- elsif password_authentication_enabled_for_web? + .login-box.tab-pane.active{ id: 'login-pane', role: 'tabpanel' } + .login-body + = render 'admin/sessions/new_base' diff --git a/app/views/admin/sessions/_tabs_normal.html.haml b/app/views/admin/sessions/_tabs_normal.html.haml new file mode 100644 index 00000000000..f5dedb5ad76 --- /dev/null +++ b/app/views/admin/sessions/_tabs_normal.html.haml @@ -0,0 +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') diff --git a/app/views/admin/sessions/new.html.haml b/app/views/admin/sessions/new.html.haml new file mode 100644 index 00000000000..ee06b4a1741 --- /dev/null +++ b/app/views/admin/sessions/new.html.haml @@ -0,0 +1,15 @@ +- @hide_breadcrumbs = true +- page_title _('Enter admin mode') + +.row.justify-content-center + .col-6.new-session-forms-container + .login-page + #signin-container + = render 'admin/sessions/tabs_normal' + .tab-content + - if password_authentication_enabled_for_web? + = render 'admin/sessions/signin_box' + - else + -# Show a message if none of the mechanisms above are enabled + .prepend-top-default.center + = _('No authentication methods configured.') |