Deconflicting a name of an input for two forms on the same page
This commit is contained in:
parent
4e6d2cbdf6
commit
8ab380d6dd
3 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ class WikiController < ApplicationController
|
|||
end
|
||||
|
||||
def remove_orphaned_pages
|
||||
if wiki.authenticate(@params['system_password'])
|
||||
if wiki.authenticate(@params['system_password_orphaned'])
|
||||
wiki.remove_orphaned_pages(@web_name)
|
||||
flash[:info] = 'Orphaned pages removed'
|
||||
redirect_to :action => 'list'
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<p align="right">
|
||||
<small>
|
||||
Clean up by entering system password
|
||||
<input type="password" id="system_password_orphaned" name="system_password" />
|
||||
<input type="password" id="system_password_orphaned" name="system_password_orphaned" />
|
||||
and
|
||||
<input type="submit" value="Delete Orphan Pages" />
|
||||
</small>
|
||||
|
|
|
@ -333,7 +333,7 @@ class WikiControllerTest < Test::Unit::TestCase
|
|||
"category: trees",
|
||||
Time.now, Author.new('TreeHugger', '127.0.0.2'))
|
||||
|
||||
r = process('remove_orphaned_pages', 'web' => 'wiki1', 'system_password' => 'pswd')
|
||||
r = process('remove_orphaned_pages', 'web' => 'wiki1', 'system_password_orphaned' => 'pswd')
|
||||
|
||||
assert_redirected_to :action => 'list'
|
||||
assert_equal [@home, @oak], @web.select.sort,
|
||||
|
|
Loading…
Reference in a new issue