-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor SessionController routes, controller, views
Replace Bento views by Bootstrap, make routes resourceful, adapt necessary spec, controllers and views
- Loading branch information
Showing
20 changed files
with
63 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
.form#loginform{ title: "Account login" } | ||
%h1= @pagetitle | ||
%p | ||
%label{ for: "user-login" } Username: | ||
%input#user-login{ name: "username", size: "30", type: "text", value: "" }/ | ||
%br/ | ||
%br/ | ||
%label{ for: "user-password" } Password: | ||
%input#user-password{ name: "password", size: "30", type: "password" }/ | ||
%p | ||
%input.primary#log-in-button{ name: "login", type: "submit", value: "Log In" }/ | ||
%p | ||
- if CONFIG['proxy_auth_mode'] == :on | ||
Or | ||
\#{link_to 'register', CONFIG['proxy_auth_register_page'] + '?%22'} | ||
as a new user. | ||
- else | ||
- unless CONFIG['frontend_ldap_mode'] == :on | ||
Or | ||
= link_to("sign up", controller: :user, action: :register_user) | ||
as a new user. | ||
%h3= pagetitle | ||
|
||
= form_tag(form_url, options) do | ||
- if proxy | ||
= hidden_field_tag(:context, 'default') | ||
= hidden_field_tag(:proxypath, 'reserve') | ||
= hidden_field_tag(:message, 'Please log in') | ||
.form-group | ||
= label_tag(:username, 'Username') | ||
= text_field_tag(:username, nil, placeholder: 'User Name', required: true, id: 'user-login', class: 'form-control') | ||
.form-group | ||
= label_tag(:password, 'Password') | ||
= password_field_tag(:password, nil, placeholder: 'Password', required: true, id: 'user-password', class: 'form-control') | ||
= submit_tag('Log In', name: 'login', class: 'btn btn-primary') | ||
%span | ||
- if proxy | ||
or | ||
= link_to('Register', CONFIG['proxy_auth_register_page'] + '?%22') | ||
- elsif CONFIG['frontend_ldap_mode'] != :on | ||
or | ||
= link_to('Sign Up', user_register_user_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
- @pagetitle = "Please Log In" | ||
- if CONFIG['proxy_auth_mode'] == :on | ||
%form{ action: "#{CONFIG['proxy_auth_login_page']}", enctype: "application/x-www-form-urlencoded", method: "post" } | ||
%div | ||
%input{ name: "context", type: "hidden", value: "default" }/ | ||
%input{ name: "proxypath", type: "hidden", value: "reverse" }/ | ||
%input{ name: "message", type: "hidden", value: "Please log In" }/ | ||
= render partial: 'form' | ||
- elsif CONFIG['kerberos_mode'] | ||
%h2 | ||
Kerberos authentication required | ||
%div | ||
%p | ||
You are seeing this page, because you are not authenticated in the kerberos realm ('#{CONFIG['kerberos_realm']}'). | ||
%p | ||
Please ensure you have a valid ticket and try again. | ||
- else | ||
= form_tag controller: :session, action: :create, method: :post do | ||
= render partial: 'form' | ||
- @pagetitle = 'Please Log In' | ||
|
||
.card | ||
.card-body#loginform | ||
.col-lg-6.pl-0 | ||
- if CONFIG['proxy_auth_mode'] == :on | ||
= render partial: 'form', locals: { form_url: CONFIG['proxy_auth_login_page'], | ||
options: { method: :post, enctype: 'application/x-www-form-urlencoded' }, | ||
proxy: true, | ||
pagetitle: @pagetitle } | ||
- elsif CONFIG['kerberos_mode'] | ||
%h3 Kerberos authentication required | ||
%p You are seeing this page, because you are not authenticated in the kerberos realm ('#{CONFIG['kerberos_realm']}'). | ||
%p Please ensure you have a valid ticket and try again. | ||
- else | ||
= render partial: 'form', locals: { form_url: session_path, | ||
options: { method: :post }, | ||
proxy: false, | ||
pagetitle: @pagetitle } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters