added (un)checkall links to the "Global privileges" edition form
This commit is contained in:
@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-03-23 Olivier Mueller <om@omnis.ch>
|
||||
* server_privileges.php, libraries/server_privileges.js: added
|
||||
(un)checkall links to the "Global privileges" edition form.
|
||||
Todo: make it work even if JS is disabled + local links
|
||||
for the "Data" and "Structure" checkboxes groups.
|
||||
|
||||
2004-04-02 Alexander M. Turek <me@derrabus.de>
|
||||
* lang/german-*.inc.php: Fixed a typo.
|
||||
|
||||
|
@@ -69,7 +69,9 @@ function checkAddUser(the_form)
|
||||
*/
|
||||
function setCheckboxes(the_form, the_checkboxes, do_check)
|
||||
{
|
||||
var elts = document.forms[the_form].elements[the_checkboxes + '[]'];
|
||||
var elts = (the_checkboxes != '')
|
||||
? document.forms[the_form].elements[the_checkboxes + '[]']
|
||||
: document.forms[the_form].elements;
|
||||
var elts_cnt = (typeof(elts.length) != 'undefined')
|
||||
? elts.length
|
||||
: 0;
|
||||
@@ -83,4 +85,4 @@ function setCheckboxes(the_form, the_checkboxes, do_check)
|
||||
} // end if... else
|
||||
|
||||
return true;
|
||||
} // end of the 'setCheckboxes()' function
|
||||
} // end of the 'setCheckboxes()' function
|
||||
|
@@ -371,7 +371,10 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent =
|
||||
. $spaces . ' <th colspan="6"> ' . ($db == '*' ? $GLOBALS['strGlobalPrivileges'] : ($table == '*' ? $GLOBALS['strDbPrivileges'] : $GLOBALS['strTblPrivileges'])) . ' </th>' . "\n"
|
||||
. $spaces . ' </tr>' . "\n"
|
||||
. $spaces . ' <tr>' . "\n"
|
||||
. $spaces . ' <td bgcolor="' . $cfg['BgcolorTwo'] . '" colspan="6"><small><i>' . $GLOBALS['strEnglishPrivileges'] . '</i></small></td>' . "\n"
|
||||
. $spaces . ' <td bgcolor="' . $cfg['BgcolorTwo'] . '" align="center" colspan="6"><small><i>' . $GLOBALS['strEnglishPrivileges'] . '</i></small><br />' . "\n"
|
||||
. $spaces . ' <a href="./server_privileges.php?' . $url_query . '&checkall=1" onclick="setCheckboxes(\'usersForm\', \'\', true); return false;">' . $GLOBALS['strCheckAll'] . '</a>' . "\n"
|
||||
. $spaces . '  ' . "\n"
|
||||
. $spaces . ' <a href="./server_privileges.php?' . $url_query . '" onclick="setCheckboxes(\'usersForm\', \'\', false); return false;">' . $GLOBALS['strUncheckAll'] . '</a></td>' . "\n"
|
||||
. $spaces . ' </tr>' . "\n"
|
||||
. $spaces . ' <tr>' . "\n"
|
||||
. $spaces . ' <td bgcolor="' . $cfg['BgcolorOne'] . '" colspan="2"> <b><i>' . $GLOBALS['strData'] . '</i></b> </td>' . "\n"
|
||||
@@ -1030,7 +1033,7 @@ if (empty($adduser) && empty($checkprivs)) {
|
||||
unset($res);
|
||||
echo '<ul>' . "\n"
|
||||
. ' <li>' . "\n"
|
||||
. ' <form action="server_privileges.php" method="post">' . "\n"
|
||||
. ' <form name="usersForm" action="server_privileges.php" method="post">' . "\n"
|
||||
. PMA_generate_common_hidden_inputs('', '', 3)
|
||||
. ' <input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"
|
||||
. ' <input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
|
||||
@@ -1273,7 +1276,7 @@ if (empty($adduser) && empty($checkprivs)) {
|
||||
echo '<h2>' . "\n"
|
||||
. ' ' . $strAddUser . "\n"
|
||||
. '</h2>' . "\n"
|
||||
. '<form action="server_privileges.php" method="post" onsubmit="return checkAddUser(this);">' . "\n"
|
||||
. '<form name="usersForm" action="server_privileges.php" method="post" onsubmit="return checkAddUser(this);">' . "\n"
|
||||
. PMA_generate_common_hidden_inputs('', '', 1)
|
||||
. ' <table border="0">' . "\n"
|
||||
. ' <tr>' . "\n"
|
||||
|
Reference in New Issue
Block a user