From 84b93ec30a032f62932ff5c7b184d477e36cf9eb Mon Sep 17 00:00:00 2001 From: Thomas Lecavelier Date: Tue, 15 Oct 2013 22:05:03 +0200 Subject: [PATCH] Certainly broke password protected articles --- TODO.txt | 1 + app/views/articles/_password_form.html.erb | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 TODO.txt diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000000..4d875a6d8e --- /dev/null +++ b/TODO.txt @@ -0,0 +1 @@ +Fix password protection, which is certainly totally broken diff --git a/app/views/articles/_password_form.html.erb b/app/views/articles/_password_form.html.erb index cfce572b2f..7b852ec0b0 100644 --- a/app/views/articles/_password_form.html.erb +++ b/app/views/articles/_password_form.html.erb @@ -1,12 +1,15 @@

This post is password protected. Please fill in your password or login to view the content

- <%= 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) %> - <%= 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 %>