diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-07 17:07:36 -0800 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-07 17:07:36 -0800 |
| commit | d02a22ba21f91d2aa4f9cf716dc3aefcf7e7495e (patch) | |
| tree | e2c08769992618a72e83c7c7584613ba1e00fc3c /app/views/devise/shared | |
| parent | 757df0142f521380b92d28a721a7fd2bd8aa382f (diff) | |
| download | gitlab-ce-d02a22ba21f91d2aa4f9cf716dc3aefcf7e7495e.tar.gz | |
Redesign signin/singup pages
Diffstat (limited to 'app/views/devise/shared')
| -rw-r--r-- | app/views/devise/shared/_oauth_box.html.haml | 10 | ||||
| -rw-r--r-- | app/views/devise/shared/_signin_box.html.haml | 25 | ||||
| -rw-r--r-- | app/views/devise/shared/_signup_box.html.haml | 17 |
3 files changed, 52 insertions, 0 deletions
diff --git a/app/views/devise/shared/_oauth_box.html.haml b/app/views/devise/shared/_oauth_box.html.haml new file mode 100644 index 00000000000..c2e1373de30 --- /dev/null +++ b/app/views/devise/shared/_oauth_box.html.haml @@ -0,0 +1,10 @@ +- providers = additional_providers +- if providers.present? + .login-box{:'data-no-turbolink' => 'data-no-turbolink'} + %span Sign in with + - providers.each do |provider| + %span + - if default_providers.include?(provider) + = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) + - else + = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn" diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml new file mode 100644 index 00000000000..3f2161ff6a4 --- /dev/null +++ b/app/views/devise/shared/_signin_box.html.haml @@ -0,0 +1,25 @@ +.login-box + .login-heading + %h3 Sign in + .login-body + - if ldap_enabled? + %ul.nav.nav-tabs + - @ldap_servers.each_with_index do |server, i| + %li{class: (:active if i.zero?)} + = link_to server['label'], "#tab-#{server['provider_name']}", 'data-toggle' => 'tab' + - if gitlab_config.signin_enabled + %li + = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab' + .tab-content + - @ldap_servers.each_with_index do |server, i| + %div.tab-pane{id: "tab-#{server['provider_name']}", class: (:active if i.zero?)} + = render 'devise/sessions/new_ldap', provider: server['provider_name'] + - if gitlab_config.signin_enabled + %div#tab-signin.tab-pane + = render 'devise/sessions/new_base' + + - elsif gitlab_config.signin_enabled + = render 'devise/sessions/new_base' + - else + %div + No authentication methods configured. diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml new file mode 100644 index 00000000000..5709c661288 --- /dev/null +++ b/app/views/devise/shared/_signup_box.html.haml @@ -0,0 +1,17 @@ +.login-box + .login-heading + %h3 Sign up + .login-body + = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| + .devise-errors + = devise_error_messages! + %div + = f.text_field :name, class: "form-control top", placeholder: "Name", required: true + %div + = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true + %div + = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true + .form-group#password-strength + = f.password_field :password, class: "form-control bottom", id: "user_password_sign_up", placeholder: "Password", required: true + %div + = f.submit "Sign up", class: "btn-create btn" |
