-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turned sign in form into a modal that falls back to a plain form when…
… JS is turned off
- Loading branch information
Showing
7 changed files
with
113 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#Overriding the Devise Sessions controller for fun and profit | ||
class ConcertoDevise::SessionsController < Devise::SessionsController | ||
|
||
# GET /resource/sign_in | ||
def new | ||
resource = build_resource(nil, :unsafe => true) | ||
clean_up_passwords(resource) | ||
|
||
# if :no_content_cell param is set to true, do not render the layout or the content cell container within the view | ||
if params[:no_content_cell] | ||
respond_with(resource) do |format| | ||
format.html { render :layout => false } | ||
end | ||
else | ||
respond_with (resource) | ||
end | ||
|
||
end | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
<section class="C no"> | ||
<header> | ||
<%= back_button :back %> | ||
<h1>Sign In</h1> | ||
</header> | ||
<div class="C-cont"> | ||
<article> | ||
<%= render 'form' %> | ||
</article> | ||
<div class="clear"></div> | ||
</div> | ||
</section> | ||
<% if params[:no_content_cell] %> | ||
<div class="form-stacked"> | ||
<%= render 'form' %> | ||
</div> | ||
<% else %> | ||
<section class="C no"> | ||
<header> | ||
<%= back_button :back %> | ||
<h1>Sign In</h1> | ||
</header> | ||
<div class="C-cont"> | ||
<article> | ||
<%= render 'form' %> | ||
</article> | ||
<div class="clear"></div> | ||
</div> | ||
</section> | ||
<% end %> | ||
|
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