diff options
author | rub <rub@piwigo.org> | 2006-03-16 22:58:16 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2006-03-16 22:58:16 +0000 |
commit | 9b521760af7639310742d7817c4fb91b88471c5c (patch) | |
tree | 9260a834a927131ba184de330d4f8ecdfaafdcef | |
parent | 5980db248ab4cc05e8596e07d7efc31048bcb8e8 (diff) |
Step 7 improvement issue 0000301:
o can attribute status <= current user
o define mode adviser
=> buttons disabled (gray on IE, not on FF)
=> truncated actions
=> display info mode adviser
git-svn-id: http://piwigo.org/svn/trunk@1085 68402e56-0260-453c-a942-63ccdbb3a9ee
34 files changed, 225 insertions, 88 deletions
diff --git a/admin/maintenance.php b/admin/maintenance.php index 0a5c3cd22..c7caf8e50 100644 --- a/admin/maintenance.php +++ b/admin/maintenance.php @@ -98,16 +98,32 @@ $template->set_filenames(array('maintenance'=>'admin/maintenance.tpl')); $start_url = PHPWG_ROOT_PATH.'admin.php?page=maintenance&action='; -$template->assign_vars( - array( - 'U_MAINT_CATEGORIES' => $start_url.'categories', - 'U_MAINT_IMAGES' => $start_url.'images', - 'U_MAINT_HISTORY' => $start_url.'history', - 'U_MAINT_SESSIONS' => $start_url.'sessions', - 'U_MAINT_FEEDS' => $start_url.'feeds', - 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance', - ) - ); +if (!is_adviser()) +{ + $template->assign_vars( + array( + 'U_MAINT_CATEGORIES' => $start_url.'categories', + 'U_MAINT_IMAGES' => $start_url.'images', + 'U_MAINT_HISTORY' => $start_url.'history', + 'U_MAINT_SESSIONS' => $start_url.'sessions', + 'U_MAINT_FEEDS' => $start_url.'feeds', + 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance', + ) + ); +} +else +{ + $template->assign_vars( + array( + 'U_MAINT_CATEGORIES' => $start_url, + 'U_MAINT_IMAGES' => $start_url, + 'U_MAINT_HISTORY' => $start_url, + 'U_MAINT_SESSIONS' => $start_url, + 'U_MAINT_FEEDS' => $start_url, + 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance', + ) + ); +} // +-----------------------------------------------------------------------+ // | sending html code | diff --git a/admin/picture_modify.php b/admin/picture_modify.php index 0e20f9290..05412492c 100644 --- a/admin/picture_modify.php +++ b/admin/picture_modify.php @@ -41,7 +41,7 @@ check_status(ACCESS_ADMINISTRATOR); // | synchronize metadata | // +-----------------------------------------------------------------------+ -if (isset($_GET['sync_metadata'])) +if (isset($_GET['sync_metadata']) and !is_adviser()) { $query = ' SELECT path diff --git a/admin/user_list.php b/admin/user_list.php index 6f1b11938..ed2fc77d2 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -97,6 +97,7 @@ SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, u.'.$conf['user_fields']['username'].' AS username, u.'.$conf['user_fields']['email'].' AS email, ui.status, + ui.adviser, ui.enabled_high FROM '.USERS_TABLE.' AS u INNER JOIN '.USER_INFOS_TABLE.' AS ui @@ -337,9 +338,9 @@ DELETE FROM '.USER_GROUP_TABLE.' $formfields = array('nb_image_line', 'nb_line_page', 'template', 'language', 'recent_period', 'maxwidth', 'expand', 'show_nb_comments', - 'maxheight', 'status', 'enabled_high'); + 'maxheight', 'status', 'adviser', 'enabled_high'); - $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high'); + $true_false_fields = array('expand', 'show_nb_comments', 'adviser', 'enabled_high'); foreach ($formfields as $formfield) { @@ -380,20 +381,22 @@ DELETE FROM '.USER_GROUP_TABLE.' $data[$dbfield] = $_POST[$dbfield]; } } - + // Webmaster status must not be changed if ($conf['webmaster_id'] == $user_id and isset($data['status'])) { $data['status'] = 'webmaster'; } - + + // Webmaster and guest adviser must not be changed + if ((($conf['webmaster_id'] == $user_id) or ($conf['guest_id'] == $user_id)) and isset($data['adviser'])) + { + $data['adviser'] = 'false'; + } + array_push($datas, $data); } -// echo '<pre>'; -// print_r($datas); -// echo '</pre>'; - mass_updates(USER_INFOS_TABLE, $dbfields, $datas); } @@ -572,6 +575,8 @@ if (isset($_POST['pref_submit'])) // echo '<pre>'; print_r($_POST); echo '</pre>'; $template->assign_vars( array( + 'ADVISER_YES' => 'true' == $_POST['adviser'] ? 'checked="checked"' : '', + 'ADVISER_NO' => 'false' == $_POST['adviser'] ? 'checked="checked"' : '', 'NB_IMAGE_LINE' => $_POST['nb_image_line'], 'NB_LINE_PAGE' => $_POST['nb_line_page'], 'MAXWIDTH' => $_POST['maxwidth'], @@ -582,7 +587,9 @@ if (isset($_POST['pref_submit'])) 'SHOW_NB_COMMENTS_YES' => 'true' == $_POST['show_nb_comments'] ? 'checked="checked"' : '', 'SHOW_NB_COMMENTS_NO' => - 'false' == $_POST['show_nb_comments'] ? 'checked="checked"' : '' + 'false' == $_POST['show_nb_comments'] ? 'checked="checked"' : '', + 'ENABLED_HIGH_YES' => 'true' == $_POST['enabled_high'] ? 'checked="checked"' : '', + 'ENABLED_HIGH_NO' => 'false' == $_POST['enabled_high'] ? 'checked="checked"' : '', )); } else @@ -665,14 +672,18 @@ foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) { $selected = ''; } - - $template->assign_block_vars( - $blockname, - array( - 'VALUE' => $status, - 'CONTENT' => $lang['user_status_'.$status], - 'SELECTED' => $selected - )); + + // Only status <= can be assign + if (is_autorize_status(get_access_type_status($status))) + { + $template->assign_block_vars( + $blockname, + array( + 'VALUE' => $status, + 'CONTENT' => $lang['user_status_'.$status], + 'SELECTED' => $selected + )); + } } // associate @@ -800,7 +811,7 @@ foreach ($page['filtered_users'] as $num => $local_user) 'U_MOD' => $profile_url.$local_user['id'], 'U_PERM' => $perm_url.$local_user['id'], 'USERNAME' => $local_user['username'], - 'STATUS' => $lang['user_status_'.$local_user['status']], + 'STATUS' => $lang['user_status_'.$local_user['status']].(($local_user['adviser'] == 'true') ? ' ['.$lang['adviser'].']' : ''), 'EMAIL' => isset($local_user['email']) ? $local_user['email'] : '', 'GROUPS' => $groups_string, 'PROPERTIES' => (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? $lang['is_high_enabled'] : $lang['is_high_disabled'] diff --git a/include/common.inc.php b/include/common.inc.php index 86c5c7a70..27949fd17 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -232,6 +232,18 @@ include( .'/themeconf.inc.php' ); +if (is_adviser()) +{ + echo ' + <div class="titrePage"> + <h2> + <div style="text-align:center;">'.$lang['adviser_mode_enabled'].' + </div> + </h2> + </div> + '; +} + // template instance $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']); ?> diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 44f1a1cf7..7af517980 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -548,11 +548,11 @@ function log_user($user_id, $remember_me) } /* - * Return if current user have access to access_type definition + * Return access_type definition of uuser * Test does with user status * @return bool */ -function is_autorize_status($access_type, $user_status = '') +function get_access_type_status($user_status = '') { global $user; @@ -587,11 +587,21 @@ function is_autorize_status($access_type, $user_status = '') } } - return ($access_type_status >= $access_type); + return $access_type_status; +} + +/* + * Return if user have access to access_type definition + * Test does with user status + * @return bool +*/ +function is_autorize_status($access_type, $user_status = '') +{ + return (get_access_type_status($user_status) >= $access_type); } /* - * Check if current user have access to access_type definition + * Check if user have access to access_type definition * Stop action if there are not access * Test does with user status * @return none @@ -609,7 +619,7 @@ function check_status($access_type, $user_status = '') } /* - * Return if current user is an administrator + * Return if user is an administrator * @return bool */ function is_admin($user_status = '') @@ -617,4 +627,15 @@ function is_admin($user_status = '') return is_autorize_status(ACCESS_ADMINISTRATOR, $user_status); } +/* + * Return if current user is an adviser + * @return bool +*/ +function is_adviser() +{ + global $user; + + return ($user['adviser'] == 'true'); +} + ?>
\ No newline at end of file diff --git a/include/page_header.php b/include/page_header.php index d4c3b9e3d..778d5661c 100644 --- a/include/page_header.php +++ b/include/page_header.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) // | file : $RCSfile$ @@ -52,7 +52,8 @@ $template->assign_vars( 'LANG'=>$lang_info['code'], 'DIR'=>$lang_info['direction'], - 'T_STYLE' => $css + 'T_STYLE' => $css, + 'TAG_INPUT_ENABLED' => ((is_adviser()) ? 'disabled' : '') )); // refresh diff --git a/install/db/16-database.php b/install/db/16-database.php new file mode 100644 index 000000000..4187b2cc4 --- /dev/null +++ b/install/db/16-database.php @@ -0,0 +1,54 @@ +<?php +// +-----------------------------------------------------------------------+ +// | PhpWebGallery - a PHP based picture gallery | +// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | +// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net | +// +-----------------------------------------------------------------------+ +// | branch : BSF (Best So Far) +// | file : $RCSfile$ +// | last update : $Date: 2005-09-21 00:04:57 +0200 (mer, 21 sep 2005) $ +// | last modifier : $Author: plg $ +// | revision : $Revision: 870 $ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ + +if (!defined('PHPWG_ROOT_PATH')) +{ + die('Hacking attempt!'); +} + +$upgrade_description = 'Update database from adviser functionnality'; + +include_once(PHPWG_ROOT_PATH.'include/constants.php'); + +// +-----------------------------------------------------------------------+ +// | Upgrade content | +// +-----------------------------------------------------------------------+ + +echo "Alter table ".USER_INFOS_TABLE. ' add field adviser'; +$query = " +alter table ".USER_INFOS_TABLE." + add column `adviser` enum('true','false') NOT NULL default 'false' after `status` +;"; +pwg_query($query); + +echo +"\n" +.'"'.$upgrade_description.'"'.' ended' +."\n" +; + +?> diff --git a/install/phpwebgallery_structure.sql b/install/phpwebgallery_structure.sql index 9e5c4a49f..cf3068775 100644 --- a/install/phpwebgallery_structure.sql +++ b/install/phpwebgallery_structure.sql @@ -297,6 +297,7 @@ CREATE TABLE `phpwebgallery_user_infos` ( `nb_image_line` tinyint(1) unsigned NOT NULL default '5', `nb_line_page` tinyint(3) unsigned NOT NULL default '3', `status` enum('webmaster', 'admin', 'normal', 'generic', 'guest') NOT NULL default 'guest', + `adviser` enum('true','false') NOT NULL default 'false', `language` varchar(50) NOT NULL default 'english', `maxwidth` smallint(6) default NULL, `maxheight` smallint(6) default NULL, diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php index 2597b7a3a..ab32c46f4 100644 --- a/language/en_UK.iso-8859-1/admin.lang.php +++ b/language/en_UK.iso-8859-1/admin.lang.php @@ -166,6 +166,7 @@ $lang['properties'] = 'Properties'; $lang['is_high_enabled'] = 'High definition'; $lang['is_high_disabled'] = ''; $lang['enabled_high'] = 'High definition enabled'; +$lang['adviser'] = 'Adviser'; $lang['add keywords'] = 'add keywords'; $lang['associate to category'] = 'associate to category'; $lang['associate to group'] = 'associate to group'; diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php index 71a28413e..4f583b5c6 100644 --- a/language/en_UK.iso-8859-1/common.lang.php +++ b/language/en_UK.iso-8859-1/common.lang.php @@ -331,4 +331,5 @@ $lang['upload_username'] = 'Username'; $lang['useful when password forgotten'] = 'useful when password forgotten'; $lang['w_month'] = 'Month'; $lang['yes'] = 'Yes'; +$lang['adviser_mode_enabled'] = 'Adviser mode enabled'; ?> diff --git a/language/en_UK.iso-8859-1/help/user_list.html b/language/en_UK.iso-8859-1/help/user_list.html index fb1874546..d9312b084 100644 --- a/language/en_UK.iso-8859-1/help/user_list.html +++ b/language/en_UK.iso-8859-1/help/user_list.html @@ -21,7 +21,9 @@ or descending order.</p> <li>delete users (require a confirmation checkbox)</li> <li>change status</li> - + + <li>set user like an adviser</li> + <li>associate or dissociate from groups</li> <li>modify display properties</li> diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php index 013f5829d..19185232c 100644 --- a/language/fr_FR.iso-8859-1/admin.lang.php +++ b/language/fr_FR.iso-8859-1/admin.lang.php @@ -166,6 +166,7 @@ $lang['properties'] = 'Propriétés'; $lang['is_high_enabled'] = 'Haute définition'; $lang['is_high_disabled'] = ''; $lang['enabled_high'] = 'Haute définition actif'; +$lang['adviser'] = 'Conseiller'; $lang['add keywords'] = 'ajouter des mots-clef'; $lang['associate to category'] = 'associer à la catégorie'; $lang['associate to group'] = 'associer au groupe'; diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php index 49adaee76..c9af1c218 100644 --- a/language/fr_FR.iso-8859-1/common.lang.php +++ b/language/fr_FR.iso-8859-1/common.lang.php @@ -331,4 +331,5 @@ $lang['upload_username'] = 'Nom d\'utilisateur'; $lang['useful when password forgotten'] = 'utile en cas d\'oubli de mot de passe'; $lang['w_month'] = 'Mois'; $lang['yes'] = 'Oui'; +$lang['adviser_mode_enabled'] = 'Mode conseiller actif'; ?> diff --git a/language/fr_FR.iso-8859-1/help/user_list.html b/language/fr_FR.iso-8859-1/help/user_list.html index 1ce294ca2..17321cda6 100644 --- a/language/fr_FR.iso-8859-1/help/user_list.html +++ b/language/fr_FR.iso-8859-1/help/user_list.html @@ -23,6 +23,8 @@ simultanément:</p> <li>changer le status</li> + <li>définir l'utilisateur comme un conseiller</li> + <li>associer ou dissocier des groupes</li> <li>modifier les propriétés d'affichage</li> diff --git a/picture.php b/picture.php index 432870611..c506d9d7e 100644 --- a/picture.php +++ b/picture.php @@ -169,7 +169,7 @@ DELETE FROM '.FAVORITES_TABLE.' } case 'set_as_representative' : { - if (is_admin() and isset($page['category'])) + if (is_admin() and isset($page['category']) and !is_adviser()) { $query = ' UPDATE '.CATEGORIES_TABLE.' @@ -189,7 +189,10 @@ UPDATE '.CATEGORIES_TABLE.' } case 'add_to_caddie' : { - fill_caddie(array($page['image_id'])); + if (!is_adviser()) + { + fill_caddie(array($page['image_id'])); + } redirect($url_self); break; } diff --git a/template/yoga/admin/cat_list.tpl b/template/yoga/admin/cat_list.tpl index 1124b1157..599270b6c 100644 --- a/template/yoga/admin/cat_list.tpl +++ b/template/yoga/admin/cat_list.tpl @@ -39,8 +39,8 @@ </ul> <p> - <input name="submitOrder" type="submit" value="{lang:Save order}" /> - <input name="submitOrderAlphaNum" type="submit" value="{lang:Order alphanumerically}" /> + <input name="submitOrder" type="submit" value="{lang:Save order}" {TAG_INPUT_ENABLED} /> + <input name="submitOrderAlphaNum" type="submit" value="{lang:Order alphanumerically}" {TAG_INPUT_ENABLED} /> </p> </form> @@ -48,6 +48,6 @@ <form id="addVirtual" action="{F_ACTION}" method="post"> <p> {L_ADD_VIRTUAL} : <input type="text" name="virtual_name" /> - <input type="submit" value="{L_SUBMIT}" name="submitAdd" /> + <input type="submit" value="{L_SUBMIT}" name="submitAdd" {TAG_INPUT_ENABLED} /> </p> </form> diff --git a/template/yoga/admin/cat_modify.tpl b/template/yoga/admin/cat_modify.tpl index 8e08baafd..8101e7ffa 100644 --- a/template/yoga/admin/cat_modify.tpl +++ b/template/yoga/admin/cat_modify.tpl @@ -103,7 +103,7 @@ </fieldset> <p style="text-align:center;"> - <input type="submit" value="{L_SUBMIT}" name="submit" /> + <input type="submit" value="{L_SUBMIT}" name="submit" {TAG_INPUT_ENABLED}/> <input type="reset" value="{lang:Reset}" name="reset" /> </p> @@ -123,7 +123,7 @@ </td> <td> <!-- BEGIN set_random --> - <p><input type="submit" name="set_random_representant" value="{L_SET_RANDOM_REPRESENTANT}" /></p> + <p><input type="submit" name="set_random_representant" value="{L_SET_RANDOM_REPRESENTANT}" {TAG_INPUT_ENABLED}/></p> <!-- END set_random --> <!-- BEGIN delete_representant --> @@ -161,7 +161,7 @@ </table> <p style="text-align:center;"> - <input type="submit" value="{lang:Submit}" name="submitAdd" /> + <input type="submit" value="{lang:Submit}" name="submitAdd" {TAG_INPUT_ENABLED}/> <input type="reset" value="{lang:Reset}" name="reset" /> </p> @@ -179,7 +179,7 @@ <option {destination_option_true.SELECTED} value="{destination_option_true.VALUE}">{destination_option_true.OPTION}</option> <!-- END destination_option_true --> </select> - <p><input type="submit" value="»" name="destination_falsify" style="font-size:15px;"/></p> + <p><input type="submit" value="»" name="destination_falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> <td> @@ -189,7 +189,7 @@ <option {destination_option_false.SELECTED} value="{destination_option_false.VALUE}">{destination_option_false.OPTION}</option> <!-- END destination_option_false --> </select> - <p><input type="submit" value="«" name="destination_trueify" style="font-size:15px;" /></p> + <p><input type="submit" value="«" name="destination_trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> </tr> </table> @@ -203,7 +203,7 @@ <option {source_option_true.SELECTED} value="{source_option_true.VALUE}">{source_option_true.OPTION}</option> <!-- END source_option_true --> </select> - <p><input type="submit" value="»" name="source_falsify" style="font-size:15px;"/></p> + <p><input type="submit" value="»" name="source_falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> <td> @@ -213,7 +213,7 @@ <option {source_option_false.SELECTED} value="{source_option_false.VALUE}">{source_option_false.OPTION}</option> <!-- END source_option_false --> </select> - <p><input type="submit" value="«" name="source_trueify" style="font-size:15px;" /></p> + <p><input type="submit" value="«" name="source_trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> </tr> </table> diff --git a/template/yoga/admin/cat_move.tpl b/template/yoga/admin/cat_move.tpl index c0c3fa215..5d5247f2f 100644 --- a/template/yoga/admin/cat_move.tpl +++ b/template/yoga/admin/cat_move.tpl @@ -33,7 +33,7 @@ </fieldset> <p> - <input type="submit" name="submit" value="{lang:Submit}"> + <input type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}> <input type="reset" name="reset" value="{lang:Reset}"> </p> diff --git a/template/yoga/admin/cat_perm.tpl b/template/yoga/admin/cat_perm.tpl index 1676ef57a..9c8fafa69 100644 --- a/template/yoga/admin/cat_perm.tpl +++ b/template/yoga/admin/cat_perm.tpl @@ -18,7 +18,7 @@ <li><label><input type="checkbox" name="deny_groups[]" value="{group_granted.ID}" /> {group_granted.NAME}</label></li> <!-- END group_granted --> </ul> - <input type="submit" name="deny_groups_submit" value="{lang:Deny selected groups}" /> + <input type="submit" name="deny_groups_submit" value="{lang:Deny selected groups}" {TAG_INPUT_ENABLED}/> </fieldset> <fieldset> @@ -28,7 +28,7 @@ <li><label><input type="checkbox" name="grant_groups[]" value="{group_denied.ID}"> {group_denied.NAME}</label></li> <!-- END group_denied --> </ul> - <input type="submit" name="grant_groups_submit" value="{lang:Grant selected groups}" /> + <input type="submit" name="grant_groups_submit" value="{lang:Grant selected groups}" {TAG_INPUT_ENABLED}/> </fieldset> <h4>{lang:Users}</h4> @@ -40,7 +40,7 @@ <li><label><input type="checkbox" name="deny_users[]" value="{user_granted.ID}" /> {user_granted.NAME}</label></li> <!-- END user_granted --> </ul> - <input type="submit" name="deny_users_submit" value="{lang:Deny selected users}" /> + <input type="submit" name="deny_users_submit" value="{lang:Deny selected users}" {TAG_INPUT_ENABLED}/> </fieldset> <fieldset> @@ -59,7 +59,7 @@ <li><label><input type="checkbox" name="grant_users[]" value="{user_denied.ID}"> {user_denied.NAME}</label></li> <!-- END user_denied --> </ul> - <input type="submit" name="grant_users_submit" value="{lang:Grant selected users}" /> + <input type="submit" name="grant_users_submit" value="{lang:Grant selected users}" {TAG_INPUT_ENABLED}/> </fieldset> </form> diff --git a/template/yoga/admin/comments.tpl b/template/yoga/admin/comments.tpl index d903c332a..d7053200d 100644 --- a/template/yoga/admin/comments.tpl +++ b/template/yoga/admin/comments.tpl @@ -17,7 +17,7 @@ <!-- END comment --> <p class="bottomButtons"> - <input type="submit" name="submit" value="{lang:Submit}" /> + <input type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}/> <input type="submit" name="validate-all" value="{lang:Validate All}" /> <input type="submit" name="reject-all" value="{lang:Reject All}" /> <input type="reset" value="{lang:Reset}" /> diff --git a/template/yoga/admin/configuration.tpl b/template/yoga/admin/configuration.tpl index 0c7c1817d..fb9b0f590 100644 --- a/template/yoga/admin/configuration.tpl +++ b/template/yoga/admin/configuration.tpl @@ -141,7 +141,7 @@ </fieldset> <p> - <input type="submit" name="submit" value="{lang:Submit}"> + <input type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}> <input type="reset" name="reset" value="{lang:Reset}"> </p> </form> diff --git a/template/yoga/admin/double_select.tpl b/template/yoga/admin/double_select.tpl index 1745c52d3..2bfa28072 100644 --- a/template/yoga/admin/double_select.tpl +++ b/template/yoga/admin/double_select.tpl @@ -7,7 +7,7 @@ <option {category_option_true.SELECTED} value="{category_option_true.VALUE}">{category_option_true.OPTION}</option> <!-- END category_option_true --> </select> - <p><input type="submit" value="»" name="falsify" style="font-size:15px;"/></p> + <p><input type="submit" value="»" name="falsify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> <td> @@ -17,7 +17,7 @@ <option {category_option_false.SELECTED} value="{category_option_false.VALUE}">{category_option_false.OPTION}</option> <!-- END category_option_false --> </select> - <p><input type="submit" value="«" name="trueify" style="font-size:15px;" /></p> + <p><input type="submit" value="«" name="trueify" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> </tr> </table> diff --git a/template/yoga/admin/element_set_global.tpl b/template/yoga/admin/element_set_global.tpl index de15c637b..53c956d40 100644 --- a/template/yoga/admin/element_set_global.tpl +++ b/template/yoga/admin/element_set_global.tpl @@ -27,7 +27,7 @@ </ul> - <p style="text-align:center;"><input type="submit" value="{L_SUBMIT}" name="submit_caddie" /></p> + <p style="text-align:center;"><input type="submit" value="{L_SUBMIT}" name="submit_caddie" {TAG_INPUT_ENABLED}/></p> </fieldset> @@ -152,7 +152,7 @@ </p> - <p style="text-align:center;"><input type="submit" value="{L_SUBMIT}" name="submit" /></p> + <p style="text-align:center;"><input type="submit" value="{L_SUBMIT}" name="submit" {TAG_INPUT_ENABLED}/></p> </fieldset> diff --git a/template/yoga/admin/element_set_unit.tpl b/template/yoga/admin/element_set_unit.tpl index 7dba4a2bf..a5e718012 100644 --- a/template/yoga/admin/element_set_unit.tpl +++ b/template/yoga/admin/element_set_unit.tpl @@ -84,7 +84,7 @@ <!-- END element --> <p> - <input type="submit" value="{L_SUBMIT}" name="submit" /> + <input type="submit" value="{L_SUBMIT}" name="submit" {TAG_INPUT_ENABLED}/> <input type="reset" value="{lang:Reset}" /> </p> diff --git a/template/yoga/admin/group_list.tpl b/template/yoga/admin/group_list.tpl index bafa87a71..389bc1071 100644 --- a/template/yoga/admin/group_list.tpl +++ b/template/yoga/admin/group_list.tpl @@ -5,7 +5,7 @@ <fieldset> <legend>{lang:Add group}</legend> <label>{lang:Group name}</label><input type="text" name="groupname" maxlength="50" size="20" /> - <p><input type="submit" name="submit_add" value="{lang:Add}" /></p> + <p><input type="submit" name="submit_add" value="{lang:Add}" {TAG_INPUT_ENABLED}/></p> </fieldset> </form> @@ -21,7 +21,7 @@ <td><a href="{group.U_MEMBERS}">{group.MEMBERS}</a></td> <td style="text-align:center;"> <a href="{group.U_PERM}"><img src="{themeconf:icon_dir}/permissions.png" class="button" style="border:none" alt="permissions" title="{lang:permissions}" /></a> - <a href="{group.U_DELETE}" onclick="return confirm('{lang:Are you sure?}');"><img src="{themeconf:icon_dir}/delete.png" class="button" style="border:none" alt="delete" title="{lang:delete}" /></a> + <a href="{group.U_DELETE}" onclick="return confirm('{lang:Are you sure?}');"><img src="{themeconf:icon_dir}/delete.png" class="button" style="border:none" alt="delete" title="{lang:delete}" {TAG_INPUT_ENABLED}/></a> </td> </tr> <!-- END group --> diff --git a/template/yoga/admin/maintenance.tpl b/template/yoga/admin/maintenance.tpl index 0728d3ba3..63ba549c9 100644 --- a/template/yoga/admin/maintenance.tpl +++ b/template/yoga/admin/maintenance.tpl @@ -7,9 +7,9 @@ </div> <ul> - <li><a href="{U_MAINT_CATEGORIES}">{lang:update categories informations}</a></li> - <li><a href="{U_MAINT_IMAGES}">{lang:update images informations}</a></li> - <li><a href="{U_MAINT_HISTORY}">{lang:purge history}</a></li> - <li><a href="{U_MAINT_SESSIONS}">{lang:purge sessions}</a></li> - <li><a href="{U_MAINT_FEEDS}">{lang:purge never used notification feeds}</a></li> + <li><a href="{U_MAINT_CATEGORIES}" {TAG_INPUT_ENABLED}>{lang:update categories informations}</a></li> + <li><a href="{U_MAINT_IMAGES}" {TAG_INPUT_ENABLED}>{lang:update images informations}</a></li> + <li><a href="{U_MAINT_HISTORY}" {TAG_INPUT_ENABLED}>{lang:purge history}</a></li> + <li><a href="{U_MAINT_SESSIONS}" {TAG_INPUT_ENABLED}>{lang:purge sessions}</a></li> + <li><a href="{U_MAINT_FEEDS}" {TAG_INPUT_ENABLED}>{lang:purge never used notification feeds}</a></li> </ul> diff --git a/template/yoga/admin/picture_modify.tpl b/template/yoga/admin/picture_modify.tpl index 54cab455d..2be4547dd 100644 --- a/template/yoga/admin/picture_modify.tpl +++ b/template/yoga/admin/picture_modify.tpl @@ -7,7 +7,7 @@ <!-- BEGIN jumpto --> <li><a href="{jumpto.URL}" title="{lang:jump to image}"><img src="{themeconf:icon_dir}/category_jump-to.png" class="button" alt="{lang:jump to}" /></a></li> <!-- END jumpto --> - <li><a href="{U_SYNC}" title="{lang:synchronize metadata}"><img src="{themeconf:icon_dir}/sync_metadata.png" class="button" alt="{lang:synchronize}" /></a></li> + <li><a href="{U_SYNC}" title="{lang:synchronize metadata}" {TAG_INPUT_ENABLED}><img src="{themeconf:icon_dir}/sync_metadata.png" class="button" alt="{lang:synchronize}" /></a></li> </ul> <form action="{F_ACTION}" method="post" id="properties"> @@ -111,7 +111,7 @@ </table> <p style="text-align:center;"> - <input type="submit" value="{lang:Submit}" name="submit" /> + <input type="submit" value="{lang:Submit}" name="submit" {TAG_INPUT_ENABLED}/> <input type="reset" value="{lang:Reset}" name="reset" /> </p> @@ -132,7 +132,7 @@ <option {associated_option.SELECTED} value="{associated_option.VALUE}">{associated_option.OPTION}</option> <!-- END associated_option --> </select> - <p><input type="submit" value="»" name="dissociate" style="font-size:15px;"/></p> + <p><input type="submit" value="»" name="dissociate" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> <td> @@ -142,7 +142,7 @@ <option {dissociated_option.SELECTED} value="{dissociated_option.VALUE}">{dissociated_option.OPTION}</option> <!-- END dissociated_option --> </select> - <p><input type="submit" value="«" name="associate" style="font-size:15px;" /></p> + <p><input type="submit" value="«" name="associate" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> </tr> </table> @@ -163,7 +163,7 @@ <option {elected_option.SELECTED} value="{elected_option.VALUE}">{elected_option.OPTION}</option> <!-- END elected_option --> </select> - <p><input type="submit" value="»" name="dismiss" style="font-size:15px;"/></p> + <p><input type="submit" value="»" name="dismiss" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> <td> @@ -173,7 +173,7 @@ <option {dismissed_option.SELECTED} value="{dismissed_option.VALUE}">{dismissed_option.OPTION}</option> <!-- END dismissed_option --> </select> - <p><input type="submit" value="«" name="elect" style="font-size:15px;" /></p> + <p><input type="submit" value="«" name="elect" style="font-size:15px;" {TAG_INPUT_ENABLED}/></p> </td> </tr> </table> diff --git a/template/yoga/admin/rating.tpl b/template/yoga/admin/rating.tpl index 37cf6e1c4..139723b4d 100644 --- a/template/yoga/admin/rating.tpl +++ b/template/yoga/admin/rating.tpl @@ -36,7 +36,7 @@ </fieldset> <p class="bottomButtons"> -<input type="submit" value="{lang:Submit}" /> +<input type="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}/> </p> </form> <div class="navigationBar">{NAVBAR}</div> diff --git a/template/yoga/admin/site_manager.tpl b/template/yoga/admin/site_manager.tpl index 9ceb369aa..924a910aa 100644 --- a/template/yoga/admin/site_manager.tpl +++ b/template/yoga/admin/site_manager.tpl @@ -44,6 +44,6 @@ <input type="text" name="galleries_url" id="galleries_url" /> </p> <p> - <input type="submit" name="submit" value="{lang:submit}" /> + <input type="submit" name="submit" value="{lang:submit}" {TAG_INPUT_ENABLED} /> </p> </form> diff --git a/template/yoga/admin/site_update.tpl b/template/yoga/admin/site_update.tpl index 518975360..7aa60212b 100644 --- a/template/yoga/admin/site_update.tpl +++ b/template/yoga/admin/site_update.tpl @@ -80,7 +80,7 @@ <fieldset> <legend></legend> - <ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked" /> {lang:update_simulate}</label></li></ul> + <ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked" {TAG_INPUT_ENABLED} /> {lang:update_simulate}</label></li></ul> </fieldset> <fieldset> diff --git a/template/yoga/admin/thumbnail.tpl b/template/yoga/admin/thumbnail.tpl index 9fae9f9fd..25bb76b9d 100644 --- a/template/yoga/admin/thumbnail.tpl +++ b/template/yoga/admin/thumbnail.tpl @@ -90,7 +90,7 @@ </ul> </fieldset> - <p><input type="submit" name="submit" value="{L_SUBMIT}"/></p> + <p><input type="submit" name="submit" value="{L_SUBMIT}" {TAG_INPUT_ENABLED}/></p> </form> <!-- END params --> diff --git a/template/yoga/admin/user_list.tpl b/template/yoga/admin/user_list.tpl index d4a45aa63..81365b63b 100644 --- a/template/yoga/admin/user_list.tpl +++ b/template/yoga/admin/user_list.tpl @@ -10,7 +10,7 @@ <legend>{lang:Add a user}</legend> <label>{lang:Username} <input type="text" name="login" maxlength="50" size="20" /></label> <label>{L_PASSWORD} <input type="text" name="password" /></label> - <input type="submit" name="submit_add" value="{L_SUBMIT}" /> + <input type="submit" name="submit_add" value="{L_SUBMIT}" {TAG_INPUT_ENABLED} /> </fieldset> </form> @@ -65,7 +65,7 @@ </select> </label> - <input type="submit" name="submit_filter" value="{L_SUBMIT}" /> + <input type="submit" name="submit_filter" value="{L_SUBMIT}" {TAG_INPUT_ENABLED}/> </fieldset> @@ -104,7 +104,7 @@ <fieldset> <legend>{lang:Deletions}</legend> <label><input type="checkbox" name="confirm_deletion" value="1" /> {lang:confirm}</label> - <input type="submit" value="{lang:Delete selected users}" name="delete" /> + <input type="submit" value="{lang:Delete selected users}" name="delete" {TAG_INPUT_ENABLED}/> </fieldset> <fieldset> @@ -123,6 +123,16 @@ </select> </td> </tr> + + <tr> + <td>{lang:adviser}</td> + <td> + <label><input type="radio" name="adviser" value="leave" checked="checked" /> {lang:leave}</label> + / {lang:set to} + <label><input type="radio" name="adviser" value="true" {ADVISER_YES} />{L_YES}</label> + <label><input type="radio" name="adviser" value="false" {ADVISER_NO} />{L_NO}</label> + </td> + </tr> </table> </fieldset> @@ -296,7 +306,7 @@ </p> <p> - <input type="submit" value="{L_SUBMIT}" name="pref_submit" /> + <input type="submit" value="{L_SUBMIT}" name="pref_submit" {TAG_INPUT_ENABLED} /> <input type="reset" value="{L_RESET}" name="pref_reset" /> </p> diff --git a/template/yoga/admin/waiting.tpl b/template/yoga/admin/waiting.tpl index d011e9984..10e8e3ff7 100644 --- a/template/yoga/admin/waiting.tpl +++ b/template/yoga/admin/waiting.tpl @@ -38,9 +38,9 @@ </table> <p class="bottomButtons"> - <input type="submit" name="submit" value="{lang:Submit}" /> - <input type="submit" name="validate-all" value="{lang:Validate All}" /> - <input type="submit" name="reject-all" value="{lang:Reject All}" /> + <input type="submit" name="submit" value="{lang:Submit}" {TAG_INPUT_ENABLED}/> + <input type="submit" name="validate-all" value="{lang:Validate All}" {TAG_INPUT_ENABLED}/> + <input type="submit" name="reject-all" value="{lang:Reject All}" {TAG_INPUT_ENABLED}/> <input type="reset" value="{lang:Reset}" /> </p> diff --git a/template/yoga/picture.tpl b/template/yoga/picture.tpl index d49f1d052..f89eadf64 100644 --- a/template/yoga/picture.tpl +++ b/template/yoga/picture.tpl @@ -17,7 +17,7 @@ <a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}" rel="nofollow"><img src="{themeconf:icon_dir}/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a> <a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="{themeconf:icon_dir}/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a> <!-- BEGIN representative --> - <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}" /></a> + <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}"/></a> <!-- END representative --> <!-- BEGIN favorite --> <a href="{favorite.U_FAVORITE}" title="{favorite.FAVORITE_HINT}"><img src="{favorite.FAVORITE_IMG}" class="button" alt="{favorite.FAVORITE_ALT}"></a> @@ -152,7 +152,7 @@ <p> {rate.SENTENCE} : <!-- BEGIN rate_option --> -{rate.rate_option.SEPARATOR} <a href="{rate.rate_option.URL}" rel="nofollow">{rate.rate_option.OPTION}</a> +{rate.rate_option.SEPARATOR} <a href="{rate.rate_option.URL}" rel="nofollow" {TAG_INPUT_ENABLED}>{rate.rate_option.OPTION}</a> <!-- END rate_option --> </p> <!-- END rate --> @@ -194,7 +194,7 @@ <label>{L_COMMENT}<textarea name="content" rows="10" cols="80"></textarea></label> - <input type="submit" value="{L_SUBMIT}"> + <input type="submit" value="{L_SUBMIT}" {TAG_INPUT_ENABLED}> </fieldset> </form> <!-- END add_comment --> |