Implements iChain authentication
This commit is contained in:
parent
15c6ed127f
commit
49d565def2
21 changed files with 269 additions and 126 deletions
|
|
@ -16,7 +16,7 @@
|
|||
%ul.nav.navbar-nav.navbar-right
|
||||
%li.dropdown
|
||||
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#", id: "current-user-detail"}
|
||||
- if not current_user.name.empty?
|
||||
- if not current_user.name.blank?
|
||||
#{current_user.name}
|
||||
-else
|
||||
#{current_user.email}
|
||||
|
|
@ -26,13 +26,13 @@
|
|||
= render 'layouts/user_menu'
|
||||
- else
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
- if current_page?(new_registration_path('user'))
|
||||
%li.active
|
||||
= link_to(new_registration_path('user')) do
|
||||
- if CONFIG['authentication']['ichain']['enabled']
|
||||
%li{:class=> "#{active_nav_li(new_ichain_registration_path('user'))}"}
|
||||
= link_to(new_ichain_registration_path('user')) do
|
||||
%span.fa.fa-heart
|
||||
Sign Up
|
||||
- else
|
||||
%li
|
||||
%li{:class=> "#{active_nav_li(new_registration_path('user'))}"}
|
||||
= link_to(new_registration_path('user')) do
|
||||
%span.fa.fa-heart
|
||||
Sign Up
|
||||
|
|
@ -42,23 +42,29 @@
|
|||
Sign In
|
||||
%span.caret
|
||||
.dropdown-menu{:style => "padding: 17px;"}
|
||||
= form_tag user_session_path do
|
||||
= text_field_tag 'user[email]', nil, id: 'user_email_dd'
|
||||
= password_field_tag 'user[password]', nil, id: 'user_password_dd'
|
||||
%p.text-right
|
||||
%small
|
||||
Remember me
|
||||
= check_box_tag 'user[remember_me]'
|
||||
%button.btn.btn-success.btn-block Sign in
|
||||
- unless omniauth_configured.empty?
|
||||
.divider
|
||||
%h6.text-center
|
||||
or
|
||||
= render 'devise/shared/openid'
|
||||
%p.text-right
|
||||
%a.small{"data-toggle" => "collapse", "data-target" => "#navbar-devise-help"}
|
||||
Need Help?
|
||||
#navbar-devise-help.collapse
|
||||
= link_to "Forgot your password?", new_password_path(User.new)
|
||||
%li.hidden-lg
|
||||
= link_to('Sign In', new_user_session_path)
|
||||
- if CONFIG['authentication']['ichain']['enabled']
|
||||
= form_tag new_user_ichain_session_path do
|
||||
= text_field_tag 'username', nil, id: 'user_ichain_email_dd'
|
||||
= password_field_tag 'password', nil, id: 'user_ichain_password_dd'
|
||||
%button.btn.btn-success.btn-block Sign in
|
||||
- else
|
||||
= form_tag new_user_session_path do
|
||||
= text_field_tag 'user[login]', nil, id: 'user_login_dd'
|
||||
= password_field_tag 'user[password]', nil, id: 'user_password_dd'
|
||||
%p.text-right
|
||||
%small
|
||||
Remember me
|
||||
= check_box_tag 'user[remember_me]'
|
||||
%button.btn.btn-success.btn-block Sign in
|
||||
- unless omniauth_configured.empty?
|
||||
.divider
|
||||
%h6.text-center
|
||||
or
|
||||
= render 'devise/shared/openid'
|
||||
%p.text-right
|
||||
%a.small{"data-toggle" => "collapse", "data-target" => "#navbar-devise-help"}
|
||||
Need Help?
|
||||
#navbar-devise-help.collapse
|
||||
= link_to "Forgot your password?", new_password_path(User.new)
|
||||
%li.hidden-lg
|
||||
= link_to('Sign In', new_user_session_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue