From: <var...@us...> - 2021-07-27 15:40:33
|
Revision: 10371 http://sourceforge.net/p/phpwiki/code/10371 Author: vargenau Date: 2021-07-27 15:40:26 +0000 (Tue, 27 Jul 2021) Log Message: ----------- lib/plugin/WikiAdminRename.php: "to" field is readonly when confirming Modified Paths: -------------- trunk/lib/plugin/WikiAdminRename.php Modified: trunk/lib/plugin/WikiAdminRename.php =================================================================== --- trunk/lib/plugin/WikiAdminRename.php 2021-07-27 14:34:44 UTC (rev 10370) +++ trunk/lib/plugin/WikiAdminRename.php 2021-07-27 15:40:26 UTC (rev 10371) @@ -150,7 +150,7 @@ $header->pushContent( HTML::p(HTML::strong( _("Are you sure you want to rename the selected pages?")))); - $header = $this->renameForm($header, $post_args, $singlepage); + $header = $this->renameForm($header, $post_args, $singlepage, true); } else { if ($singlepage === true) { $button_label = _("Rename Page"); @@ -293,7 +293,7 @@ } } - private function renameForm(&$header, $post_args, $singlepage) + private function renameForm(&$header, $post_args, $singlepage, $confirm=false) { $table = HTML::table(); if ($singlepage) { @@ -310,11 +310,20 @@ 'maxlength' => MAX_PAGENAME_LENGTH, 'value' => $post_args['from']))); } - $this->tablePush($table, _("to") . _(": "), - HTML::input(array('name' => 'admin_rename[to]', - 'size' => MAX_PAGENAME_LENGTH, - 'maxlength' => MAX_PAGENAME_LENGTH, - 'value' => $post_args['to']))); + if ($confirm) { + $this->tablePush($table, _("to") . _(": "), + HTML::input(array('name' => 'admin_rename[to]', + 'size' => MAX_PAGENAME_LENGTH, + 'maxlength' => MAX_PAGENAME_LENGTH, + 'readonly' => 'readonly', + 'value' => $post_args['to']))); + } else { + $this->tablePush($table, _("to") . _(": "), + HTML::input(array('name' => 'admin_rename[to]', + 'size' => MAX_PAGENAME_LENGTH, + 'maxlength' => MAX_PAGENAME_LENGTH, + 'value' => $post_args['to']))); + } if ($singlepage === false) { $this->tablePush($table, '', $this->checkBox($post_args, 'regex', _("Regex?"))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |