forked from publify/publify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Certainly broke password protected articles
- Loading branch information
Thomas Lecavelier
committed
Oct 16, 2013
1 parent
2c4d517
commit 84b93ec
Showing
2 changed files
with
9 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix password protection, which is certainly totally broken |
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,15 @@ | ||
<div id='content-<%= article.id %>'> | ||
<p>This post is password protected. Please fill in your password or login to view the content</p> | ||
<%= remote_form_for(:articles, article, | ||
<%= form_for(article, { | ||
:remote => true, | ||
:url => { :controller => 'articles', :action => 'check_password'}, | ||
:update => "content-#{article.id}") do |f| %> | ||
:update => "content-#{article.id}"}) do |f| %> | ||
<%= password_field(:article, :password) %> | ||
<input type='hidden' name='article[id]' value='<%= article.id %>' /> | ||
<%= submit_to_remote('check_password', _('Submit') + '!', | ||
:update => "content-#{article.id}", | ||
:url => {:controller => 'articles', :action => 'check_password'}) %> | ||
<%= submit_tag(_('Submit') + '!', name: 'check_password') | ||
# :remote => true, | ||
# :update => "content-#{article.id}", | ||
# :url => {:controller => 'articles', :action => 'check_password'}) | ||
%> | ||
<% end %> | ||
</div> |