Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28250/templates/default/admin Modified Files: badperm.html component-edit.html configure.html database-edit.html databaselist.html group-edit.html grouplist.html os-edit.html oslist.html project-add.html project-edit.html projectlist.html resolution-edit.html resolutionlist.html severity-edit.html severitylist.html site-edit.html sitelist.html status-edit.html statuslist.html user-edit.html userlist.html version-edit.html wrap-popup.html wrap.html Added Files: pagination.html Log Message: Merging in htmltemplates branch to HEAD Index: badperm.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/badperm.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- badperm.html 24 May 2002 15:19:16 -0000 1.2 +++ badperm.html 25 Oct 2004 12:07:03 -0000 1.3 @@ -2,7 +2,7 @@ <tr> <td align="center"> <font color="#ff0000"> - You do not have the permissions required for that function + <?php echo translate("You do not have the permissions required for that function"); ?> </font> </td> </tr> Index: component-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/component-edit.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- component-edit.html 30 Oct 2002 22:34:57 -0000 1.7 +++ component-edit.html 25 Oct 2004 12:07:03 -0000 1.8 @@ -1,8 +1,7 @@ <script language="JavaScript"> - var nameString = '{$STRING.givename}'; - var descString = '{$STRING.givedesc}'; + var nameString = '<?php echo translate("Please enter a name"); ?>'; + var descString = '<?php echo translate("Please enter a description"); ?>'; - {literal} function checkForm(frm) { if (frm.component_name.value == '') { alert(nameString); @@ -16,53 +15,55 @@ } return true; } - {/literal} </script> - <b>{$page_title}</b> - <hr size="1"> - {if $error}<div class="error">{$error}</div>{/if} - <form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> - <table border="0"> - <input type="hidden" name="do" value="component"> - <input type="hidden" name="component_id" value="{$component_id}"> - <input type="hidden" name="project_id" value="{$project_id}"> - <input type="hidden" name="use_js" value="{$smarty.request.use_js}"> - <tr> - <td valign="top"> - Name: - </td> - <td valign="top"> - <input type="text" name="component_name" value="{$component_name|stripslashes|htmlspecialchars}"> - </td> - </tr> - <tr> - <td valign="top"> - Description: - </td> - <td valign="top"> - <textarea name="component_desc" cols="40" rows="10">{$component_desc|stripslashes|htmlspecialchars}</textarea> - </td> - </tr> - <tr> - <td valign="top"> - Owner: - </td> - <td valign="top"> - <select name="owner"><option value="0">None</option>{build_select box=owner selected=$owner}</select> - </td> - </tr> - <tr> - <td valign="top"> - Active: - </td> - <td valign="top"> - <input type="checkbox" name="active" value="1" {if $active or not $component_id}checked{/if}> - </td> - </tr> - <tr> - <td> - <input type="submit" value="Submit"> - </td> - </tr> - </table> - </form> + <b><?php echo $page_title; ?></b> +<hr size="1"> +<?php if ($error) echo '<div class="error">'.$error.'</div>'; ?> +<form method="post" onSubmit="return checkForm(this)"> +<table border="0"> + <tr> + <td valign="top"> + <?php echo translate("Name"); ?>: + </td> + <td valign="top"> + <input type="text" name="component_name" value="<?php echo stripslashes(htmlspecialchars($component_name)); ?>"> + </td> + </tr> + <tr> + <td valign="top"> + <?php echo translate("Description"); ?>: + </td> + <td valign="top"> + <textarea name="component_desc" cols="40" rows="10"><?php echo stripslashes(htmlspecialchars($component_desc)); ?></textarea> + </td> + </tr> + <tr> + <td valign="top"> + <?php echo translate("Owner"); ?>: + </td> + <td valign="top"> + <select name="owner"><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', $owner); ?></select> + </td> + </tr> + <tr> + <td valign="top"> + <?php echo translate("Active"); ?>: + </td> + <td valign="top"> + <input type="checkbox" name="active" value="1" <?php if ($active or !$component_id) echo 'checked'; ?>> + </td> + </tr> + <tr> + <td valign="top"> + + </td> + <td> + <input type="submit" value="<?php echo translate("Submit"); ?>"> + <input type="hidden" name="component_id" value="<?php echo $component_id; ?>"> + <input type="hidden" name="project_id" value="<?php echo $project_id; ?>"> + <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>"> + <input type="hidden" name="op" value="save_component"> + </td> + </tr> +</table> +</form> Index: configure.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/configure.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- configure.html 24 May 2002 15:19:16 -0000 1.6 +++ configure.html 25 Oct 2004 12:07:03 -0000 1.7 @@ -1,38 +1,38 @@ -<form action="{$smarty.server.PHP_SELF}" method="post"> +<form method="post"> <table border="0" width="100%"> <tr> <td valign="top"> - <b> {$page_title}</b> + <b> <?php echo $page_title; ?></b> <hr size="1"> <table border="0"> <tr> - <th>Variable</th> - <th>Value</th> - <th>Information</th> + <th><?php echo translate("Variable"); ?></th> + <th><?php echo translate("Value"); ?></th> + <th><?php echo translate("Information"); ?></th> </tr> - {section name=var loop=$vars} - <tr{if $smarty.section.var.iteration is even} class="alt"{/if}> - <td>{$vars[var].varname}</td> + <?php for ($i = 0, $count = count($vars); $i < $count; $i++) { ?> + <tr<?php if ($i % 2) echo ' class="alt"'; ?>> + <td><?php echo $vars[$i]['varname']; ?></td> <td> - {if $vars[var].vartype eq "multi"} - <select name="{$vars[var].varname}">{build_select box=$vars[var].varname selected=$vars[var].varvalue}</select> - {elseif $vars[var].vartype eq "bool"} - <input type="radio" name="{$vars[var].varname}" value="1"{if $vars[var].varvalue} checked{/if}> Yes - <input type="radio" name="{$vars[var].varname}" value="0"{if not $vars[var].varvalue} checked{/if}> No - {else} - <input type="text" name="{$vars[var].varname}" value="{$vars[var].varvalue}"> - {/if} + <?php if ($vars[$i]['vartype'] == "multi") { ?> + <select name="<?php echo $vars[$i]['varname']; ?>"><?php build_select($vars[$i]['varname'], $vars[$i]['varvalue']); ?></select> + <?php } elseif ($vars[$i]['vartype'] == "bool") { ?> + <input type="radio" name="<?php echo $vars[$i]['varname']; ?>" value="1"<?php if ($vars[$i]['varvalue']) echo ' checked'; ?>> Yes + <input type="radio" name="<?php echo $vars[$i]['varname']; ?>" value="0"<?php if (!$vars[$i]['varvalue']) echo ' checked'; ?>> No + <?php } else { ?> + <input type="text" name="<?php echo $vars[$i]['varname']; ?>" value="<?php echo $vars[$i]['varvalue']; ?>"> + <?php } ?> </td> - <td>{$vars[var].description}</td> + <td><?php echo translate($vars[$i]['description']); ?></td> </tr> - {/section} + <?php } ?> </table> </td> </tr> <tr> <td align="center"> - <input type="reset" value="Reset Form"> - <input type="submit" name="submit" value="Submit Changes"> + <input type="reset"> + <input type="submit" name="submit" value="<?php echo translate("Submit"); ?>"> </td> </tr> </table> Index: database-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/database-edit.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- database-edit.html 5 Nov 2002 20:58:18 -0000 1.4 +++ database-edit.html 25 Oct 2004 12:07:03 -0000 1.5 @@ -1,37 +1,53 @@ -<script language="JavaScript"> - var nameString = '{$STRING.givename}'; - - {literal} - function checkForm(frm) { - if (frm.database_name.value == '') { - alert(nameString); - frm.database_name.focus(); - return false; - } - return true; - } - {/literal} -</script> -<b>{$page_title} </b> -<hr size="1"> -<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="database_id" value="{$database_id}"> -<input type="hidden" name="use_js" value="{$smarty.request.use_js}"> -<table border='0'> -{if $error} - <tr> - <td colspan="2" class="error">{$error}</td> - </tr> -{/if} -<tr> - <td align="right" valign="top">Name:</td> - <td><input type="text" size="20" maxlength="30" name="database_name" value="{$database_name|stripslashes|htmlspecialchars}"></td> -</tr> -<tr> - <td align="right" valign="top">Sort Order:</td> - <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td> -</tr> -</table> -<br> -<input type='submit' name='submit' value='Submit'> -</form> +<script type="text/javascript" language="JavaScript"> + var nameString = '<?php echo translate("Please enter a name"); ?>'; + + function checkForm(frm) { + if (frm.database_name.value == '') { + alert(nameString); + frm.database_name.focus(); + return false; + } + return true; + } +</script> + +<b><?php echo $page_title; ?> </b> +<hr size="1"> +<form method="post" onsubmit="return checkForm(this)"> + <table border='0'> + <?php if ($error) { ?> + <tr> + <td colspan="2" class="error"> + <?php echo $error; ?> + </td> + </tr> + <?php } ?> + <tr> + <td align="right" valign="top"> + <?php echo translate("Name"); ?>: + </td> + <td> + <input type="text" size="20" maxlength="30" name="database_name" value="<?php echo stripslashes(htmlspecialchars($database_name)); ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + <?php echo translate("Sort Order"); ?>: + </td> + <td> + <input type="text" size="3" maxlength="3" name="sort_order" value="<?php echo $sort_order; ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + + </td> + <td> + <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'> + <input type="hidden" name="database_id" value="<?php echo $database_id; ?>"> + <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>"> + <input type="hidden" name="op" value="save"> + </td> + </tr> + </table> +</form> Index: databaselist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/databaselist.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- databaselist.html 30 Sep 2002 18:02:06 -0000 1.4 +++ databaselist.html 25 Oct 2004 12:07:03 -0000 1.5 @@ -1,47 +1,36 @@ <script language="JavaScript"> <!-- - var me = '{$SCRIPT_NAME}'; - {literal} + var me = '<?php echo $_SERVER['SCRIPT_NAME']; ?>'; function popupDatabase(id) { window.open(me + '?op=edit&use_js=1&database_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1'); } - {/literal} // --> </script> <table border="0" width="100%"> <tr> <td valign="top"> - <b> {$STRING.databaselist'}</b> - <a href="{$SCRIPT_NAME}?op=edit&database_id=0" onClick="popupDatabase(0); return false;">{$STRING.addnew} {$STRING.database}</a> + <b> <?php echo translate("Database list"); ?></b> - <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&database_id=0" onClick="popupDatabase(0); return false;"><?php echo translate("Add new database"); ?></a> <hr size="1"> - <table border="0" cellpadding="2" cellspacing="1" width="100%"> + <table class="bordertable" align="center"> <tr> - <th class="{$headers.name.class}"><a href="{$headers.name.url}">{$STRING.name}</a></th> - <th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">{$STRING.sortorder}</a></th> - <th>Delete</th> + <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th> + <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th> + <th> </th> </tr> - {section name=database loop=$databases} - <tr{if $smarty.section.database.iteration is even} class="alt"{/if}> - <td><a href="{$SCRIPT_NAME}?op=edit&database_id={$databases[database].database_id}" onClick="popupDatabase({$databases[database].database_id}); return false;">{$databases[database].database_name|stripslashes}</a></td> - <td align="center">{$databases[database].sort_order}</td> - <td align="center"> - {if not $databases[database].bug_count} - <a href="{$SCRIPT_NAME}?op=del&database_id={$databases[database].database_id}" onClick="return confirm('{$STRING.suredeletedb}')">{$STRING.delete}</a> - {/if} - </td> - </tr> - {/section} + <?php for ($i = 0, $count = count($databases); $i < $count; $i++) { ?> <tr> - <td colspan="3" align="center"> - <br> - {$first} - {$last} of {$total} - <br> - {if $pages ne "1"}[ {$pages} ]{/if} - <br> + <td><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&database_id=<?php echo $databases[$i]['database_id']; ?>" onClick="popupDatabase(<?php echo $databases[$i]['database_id']; ?>); return false;"><?php echo stripslashes($databases[$i]['database_name']); ?></a></td> + <td align="center"><?php echo $databases[$i]['sort_order']; ?></td> + <td align="center"> + <?php if (!$databases[$i]['bug_count']) { ?> + <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=del&database_id=<?php echo $databases[$i]['database_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this item?"); ?>')"><?php echo translate("Delete"); ?></a> + <?php } ?> </td> </tr> + <?php } ?> </table> - <br> + <?php include('pagination.html'); ?> </td> </tr> </table> Index: group-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/group-edit.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- group-edit.html 19 Apr 2003 18:12:41 -0000 1.6 +++ group-edit.html 25 Oct 2004 12:07:03 -0000 1.7 @@ -1,36 +1,53 @@ -<script language="JavaScript"> - var nameString = '{$STRING.givename}'; - - {literal} - function checkForm(frm) { - if (frm.group_name.value == '') { - alert(nameString); - frm.group_name.focus(); - return false; - } - return true; - } - {/literal} -</script> -<b>{$page_title} </b> -<hr size="1"> -<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="group_id" value="{$group_id}"> -<input type="hidden" name="use_js" value="{$smarty.request.use_js}"> -<table border='0'> -{if $error} - <tr> - <td colspan="2" class="error">{$error}</td> - </tr> -{/if} -<tr> - <td align="right" valign="top">Name:</td> - <td><input type="text" size="20" maxlength="40" name="group_name" value="{$group_name|stripslashes|htmlspecialchars}"></td> -</tr> -<tr> - <td align="right" valign="top">Assignable:</td> - <td><input type="checkbox" name="assignable" value="1" {if $assignable > 0}checked="checked"{/if}></td> -</table> -<br> -<input type='submit' name='submit' value='Submit'> -</form> +<script type="text/javascript" language="JavaScript"> + var nameString = '<?php echo translate("Please enter a name"); ?>'; + + function checkForm(frm) { + if (frm.group_name.value == '') { + alert(nameString); + frm.group_name.focus(); + return false; + } + return true; + } +</script> +<b><?php echo $page_title; ?></b> +<hr size="1"> +<form method="post" onsubmit="return checkForm(this)"> + <table border='0'> + <?php if (!empty($error)) { ?> + <tr> + <td colspan="2" class="error"> + <?php echo $error; ?> + </td> + </tr> + <?php } ?> + <tr> + <td align="right" valign="top"> + Name: + </td> + <td> + <input type="text" size="20" maxlength="40" name="group_name" value="<?php echo stripslashes(htmlspecialchars($group_name)); ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + Assignable: + </td> + <td> + <input type="checkbox" name="assignable" value="1" <?php if ($assignable > 0) echo 'checked'; ?>> + </td> + </tr> + <tr> + <td align="right" valign="top"> + + </td> + <td> + <input type='submit' value='<?php echo translate("Submit"); ?>'> + <input type="hidden" name="op" value="save"> + <input type="hidden" name="group_id" value="<?php echo $group_id; ?>"> + <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>"> + </td> + </tr> + </table> +</form> + Index: grouplist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/grouplist.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- grouplist.html 19 Apr 2003 18:12:42 -0000 1.7 +++ grouplist.html 25 Oct 2004 12:07:03 -0000 1.8 @@ -1,52 +1,42 @@ <script language="JavaScript"> <!-- - var me = '{$smarty.server.PHP_SELF}'; - {literal} + var me = '<?php echo $_SERVER['SCRIPT_NAME']; ?>'; function popupGroup(id) { window.open(me + '?op=edit&use_js=1&group_id='+id, 'ewin', 'dependent=yes,width=250,height=150,scrollbars=1'); } - {/literal} // --> </script> <table border="0" width="100%"> <tr> <td valign="top"> - <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&group_id=0" onClick="popupGroup(0); return false;">{$STRING.addnew} Group</a> + <b><?php echo $page_title; ?></b> - <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&group_id=0" onClick="popupGroup(0); return false;"><?php echo translate("Add new group"); ?></a> <hr size="1"> - <table border="0" width="100%"> + <table class="bordertable" align="center"> <tr> - <th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th> - <th class="{$headers.count.class}"><a href="{$headers.count.url}">Users</a></th> + <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th> + <th class="<?php echo $headers['count']['class']; ?>"><a href="<?php echo $headers['count']['url']; ?>"><?php echo translate("Users"); ?></a></th> <th> </th> </tr> - {section name=group loop=$groups} - <tr{if $smarty.section.group.iteration is even} class="alt"{/if}> - <td><a href="{$smarty.server.PHP_SELF}?op=edit&group_id={$groups[group].group_id}" onClick="popupGroup({$groups[group].group_id}); return false;">{$groups[group].group_name|stripslashes}</a></td> - <td align="center">{$groups[group].count}</td> + <?php for ($i = 0, $count = count($groups); $i < $count; $i++) { ?> + <tr> + <td><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&group_id=<?php echo $groups[$i]['group_id']; ?>" onClick="popupGroup(<?php echo $groups[$i]['group_id']; ?>); return false;"><?php echo stripslashes($groups[$i]['group_name']); ?></a></td> + <td align="center"><?php echo $groups[$i]['count']; ?></td> <td align="center"> - {if $groups[group].locked} - Locked - {else} - <a href="{$smarty.server.PHP_SELF}?op=del&group_id={$groups[group].group_id}" onClick="return confirm('This will remove all user assignments to this group and the group itself. Continue?')">Delete</a> | - <a href="{$smarty.server.PHP_SELF}?op=purge&group_id={$groups[group].group_id}" onClick="return confirm('This will remove all user assignments to this group. Continue?')">Purge</a> - {/if} - {if $groups[group].assignable} - | Assignable - {/if} + <?php if($groups[$i]['locked']) { + echo translate("Locked"); + } else { ?> + <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=del&group_id=<?php echo $groups[$i]['group_id']; ?>" onClick="return confirm('<?php echo translate("This will remove all user assignments to this group and the group itself. Continue?"); ?>')"><?php echo translate("Delete"); ?></a> | + <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=purge&group_id=<?php echo $groups[$i]['group_id']; ?>" onClick="return confirm('<?php echo translate("This will remove all user assignments to this group. Continue?"); ?>')"><?php echo translate("Purge"); ?></a> + <?php } ?> + <?php if($groups[$i]['assignable']) { ?> + | <?php echo translate("Assignable"); ?> + <?php } ?> </td> </tr> - {/section} - <tr> - <td colspan="3" align="center"> - <br> - {$first} - {$last} of {$total} - <br> - {if $pages ne "1"}[ {$pages} ]{/if} - <br> - </td> - </tr> - </table> + <?php } ?> + </table> + <?php include('pagination.html'); ?> </td> </tr> </table> Index: os-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/os-edit.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- os-edit.html 5 Nov 2002 20:58:19 -0000 1.5 +++ os-edit.html 25 Oct 2004 12:07:03 -0000 1.6 @@ -1,43 +1,60 @@ -<script language="JavaScript"> - var nameString = '{$STRING.givename}'; - - {literal} - function checkForm(frm) { - if (frm.os_name.value == '') { - alert(nameString); - frm.os_name.focus(); - return false; - } - return true; - } - {/literal} -</script> -<b>{$page_title} </b> -<hr size="1"> -<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="os_id" value="{$os_id}"> -<input type="hidden" name="use_js" value="{$smarty.request.use_js}"> -<table border='0'> -{if $error} - <tr> - <td colspan="2" class="error">{$error}</td> - </tr> -{/if} -<tr> - <td align="right" valign="top">Name:</td> - <td><input type="text" size="20" maxlength="40" name="os_name" value="{$os_name}"></td> -</tr> -<tr> - <td align="right" valign="top">Regex:</td> - <td><input type="text" size="20" maxlength="40" name="regex" value="{$regex}"></td> -</tr> -<tr> - <td align="right" valign="top">Sort Order:</td> - <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td> -</tr> - -</table> -<br> -<input type='submit' name='submit' value='Submit'> -</form> -</td> +<script type="text/javascript" language="JavaScript"> + var nameString = '<?php echo translate("Please enter a name"); ?>'; + + function checkForm(frm) { + if (frm.os_name.value == '') { + alert(nameString); + frm.os_name.focus(); + return false; + } + return true; + } +</script> +<b><?php echo $page_title; ?></b> +<hr size="1"> +<form method="post" onsubmit="return checkForm(this)"> + <table border='0'> + <?php if (!empty($error)) { ?> + <tr> + <td colspan="2" class="error"> + <?php echo $error; ?> + </td> + </tr> + <?php } ?> + <tr> + <td align="right" valign="top"> + <?php echo translate("Name"); ?>: + </td> + <td> + <input type="text" size="20" maxlength="40" name="os_name" value="<?php echo $os_name; ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + <?php echo translate("Regex"); ?>: + </td> + <td> + <input type="text" size="20" maxlength="40" name="regex" value="<?php echo $regex; ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + <?php echo translate("Sort Order"); ?>: + </td> + <td> + <input type="text" size="3" maxlength="3" name="sort_order" value="<?php echo $sort_order; ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + + </td> + <td> + <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'> + <input type="hidden" name="op" value="save"> + <input type="hidden" name="os_id" value="<?php echo $os_id; ?>"> + <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>"> + </td> + </tr> + </table> +</form> Index: oslist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/oslist.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- oslist.html 18 May 2002 03:00:50 -0000 1.9 +++ oslist.html 25 Oct 2004 12:07:03 -0000 1.10 @@ -1,54 +1,44 @@ <script language="JavaScript"> <!-- - var me = '{$smarty.server.PHP_SELF}'; - {literal} + var me = '<?php echo $_SERVER['SCRIPT_NAME']; ?>'; function popupOS(id) { window.open(me + '?op=edit&use_js=1&os_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1'); } - {/literal} // --> </script> <table border="0" width="100%"> <tr> <td valign="top"> - <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&os_id=0" onClick="popupOS(0); return false;">{$STRING.addnew} OS</a> + <b> <?php echo $page_title; ?></b> - <a href="os.php?op=edit&os_id=0" onClick="popupOS(0); return false;"><?php echo translate("Add new operating system"); ?></a> <hr size="1"> - <table border="0" cellpadding="2" cellspacing="1" width="100%"> + <table class="bordertable" align="center"> <tr> - <th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th> - <th class="{$headers.regex.class}"><a href="{$headers.regex.url}">Regex</a></th> - <th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">Sort Order</a></th> - <th>Delete</th> + <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th> + <th class="<?php echo $headers['regex']['class']; ?>"><a href="<?php echo $headers['regex']['url']; ?>"><?php echo translate("Regex"); ?></a></th> + <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th> + <th> </th> </tr> - {section name=os loop=$oses} - <tr{if $smarty.section.os.iteration is even} class="alt"{/if}> - <td><a href="{$smarty.server.PHP_SELF}?op=edit&os_id={$oses[os].os_id}" onClick="popupOS({$oses[os].os_id}); return false;">{$oses[os].os_name|stripslashes}</a></td> - <td> {$oses[os].regex}</td> - <td align="center">{$oses[os].sort_order}</td> + <?php for ($i = 0, $count = count($oses); $i < $count; $i++) { ?> + <tr> + <td><a href="os.php?op=edit&os_id=<?php echo $oses[$i]['os_id']; ?>" onClick="popupOS(<?php echo $oses[$i]['os_id']; ?>); return false;"><?php echo stripslashes($oses[$i]['os_name']); ?></a></td> + <td> <?php echo $oses[$i]['regex']; ?></td> + <td align="center"><?php echo $oses[$i]['sort_order']; ?></td> <td align="center"> - {if not $oses[os].bug_count} - <a href="{$smarty.server.PHP_SELF}?op=del&os_id={$oses[os].os_id}" onClick="return confirm('Are you sure you want to delete this OS?')">Delete</a> - {/if} + <?php if (!$oses[$i]['bug_count']) { ?> + <a href="os.php?op=del&os_id=<?php echo $oses[$i]['os_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this OS"); ?>?')"><?php echo translate("Delete"); ?></a> + <?php } ?> </td> </tr> - {/section} - <tr> - <td colspan="3" align="center"> - <br> - {$first} - {$last} of {$total} - <br> - {if $pages ne "1"}[ {$pages} ]{/if} - <br> - </td> - </tr> + <?php } ?> </table> - <br> - <div class="info"> - OSes with a Sort Order = 0 will not be selectable by users - <br> - Only those OSes that have no bugs referencing them can be deleted - </div> + <?php include('pagination.html'); ?> + <br> + <div class="info"> + <?php echo translate("Items with a Sort Order = 0 will not be selectable by users."); ?> + <br> + <?php echo translate("Only those items that have no bugs referencing them can be deleted."); ?> + </div> </td> </tr> </table> Index: project-add.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-add.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- project-add.html 30 Oct 2002 22:34:57 -0000 1.6 +++ project-add.html 25 Oct 2004 12:07:03 -0000 1.7 @@ -1,10 +1,9 @@ <script language="JavaScript"> <!-- - var nameString = '{$STRING.givename}'; - var descString = '{$STRING.givedesc}'; - var versionString = '{$STRING.giveversion}'; + var nameString = '<?php echo translate("Please enter a name"); ?>'; + var descString = '<?php echo translate("Please enter a description"); ?>'; + var versionString = '<?php echo translate("Please enter a version"); ?>'; - {literal} function checkForm(frm) { if (frm.project_name.value == '') { alert(nameString); @@ -33,42 +32,39 @@ } return true; } - {/literal} // --> </script> <form action="project.php" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="id" value="0"> -<input type="hidden" name="do" value="project"> <table border="0"> <tr> <td valign="top" rowspan="2" width="320"> <table border="0"> <tr> <td> - <b>Project Information</b> + <b><?php echo translate("Project Information"); ?></b> <hr size="1"> - {if $error}<div class="error">{$error}</div>{/if} + <?php if ($error) { ?><div class="error"><?php echo $error; ?></div><?php } ?> </td> </tr> <tr> <td valign="top"> - Name: + <?php echo translate("Name"); ?>: <br> - <input type="text" size="30" maxlength="30" name="project_name" value="{$project_name|stripslashes|htmlspecialchars}"> + <input type="text" size="30" maxlength="30" name="project_name" value="<?php echo htmlspecialchars(stripslashes($project_name)); ?>"> </td> </tr> <tr> <td valign="top"> - Description: + <?php echo translate("Description"); ?>: <br> - <textarea name="project_desc" cols=40 rows=5 wrap=virtual>{$project_desc|stripslashes|htmlspecialchars}</textarea> + <textarea name="project_desc" cols=40 rows=5 wrap=virtual><?php echo stripslashes(htmlspecialchars($project_desc)); ?></textarea> </td> </tr> <tr> <td valign="top"> - Active: + <?php echo translate("Active"); ?>: <br> - <input type="checkbox" name="active" value="1" {if $active}checked{/if}> + <input type="checkbox" name="active" value="1" <?php if ($active) echo 'checked'; ?>> </td> </tr> </table> @@ -77,16 +73,16 @@ <table border="0"> <tr> <td> - <b>Version Information</b> + <b><?php echo translate("Version Information"); ?></b> <hr size="1"> - {if $version_error}<div class="error">{$version_error}</div>{/if} + <?php if ($version_error) { ?><div class="error"><?php echo $version_error; ?></div><?php } ?> </td> </tr> <tr> <td valign="top"> - Initial Version: + <?php echo translate("Initial Version"); ?>: <br> - <input type="text" size="30" maxlength="30" name="version_name" value="{$version_name|stripslashes|htmlspecialchars}"> + <input type="text" size="30" maxlength="30" name="version_name" value="<?php echo stripslashes(htmlspecialchars($version_name)); ?>"> </td> </tr> </table> @@ -97,35 +93,37 @@ <table border="0"> <tr> <td> - <b>Component Information</b> + <b><?php echo translate("Component Information"); ?></b> <hr size="1"> - {if $component_error}<div class="error">{$component_error}</div>{/if} + <?php if ($component_error) { ?><div class="error"><?php echo $component_error; ?></div><?php } ?> </td> </tr> <tr> <td valign="top"> - Initial Component Name: + <?php echo translate("Initial Component Name"); ?>: <br> - <input type="text" size="30" maxlength="30" name="component_name" value="{$component_name|stripslashes|htmlspecialchars}"> + <input type="text" size="30" maxlength="30" name="component_name" value="<?php echo stripslashes(htmlspecialchars($component_name)); ?>"> </td> </tr> <tr> <td valign="top"> - Description: + <?php echo translate("Description"); ?>: <br> - <textarea name="component_desc" cols="30">{$component_desc|stripslashes|htmlspecialchars}</textarea> + <textarea name="component_desc" cols="30"><?php echo stripslashes(htmlspecialchars($component_desc)); ?></textarea> </td> </tr> <tr> <td valign="top"> - Owner: + <?php echo translate("Owner"); ?>: <br> - <select name="owner"><option value="0">None</option>{build_select box=owner selected=$owner}</select> + <select name="owner"><option value="0">None</option><?php build_select('owner', $owner); ?></select> </td> </tr> </table> </td> </tr> </table> -<input type='submit' name='submit' value='Submit'> +<input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'> +<input type="hidden" name="id" value="0"> +<input type="hidden" name="op" value="save_project"> </form> Index: project-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-edit.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- project-edit.html 7 Apr 2003 18:55:40 -0000 1.13 +++ project-edit.html 25 Oct 2004 12:07:03 -0000 1.14 @@ -1,11 +1,9 @@ <script language="JavaScript"> <!-- - var me = '{$smarty.server.PHP_SELF}'; - var projectId = '{$project_id}'; - var nameString = '{$STRING.givename}'; - var descString = '{$STRING.givedesc}'; + var projectId = '<?php echo $project_id; ?>'; + var nameString = '<?php echo translate("Please enter a name"); ?>'; + var descString = '<?php echo translate("Please enter a description"); ?>'; - {literal} function checkForm(frm) { if (frm.project_name.value == '') { alert(nameString); @@ -21,130 +19,129 @@ } function popupComponent(id) { - window.open(me + '?op=edit_component&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=450,height=300,scrollbars=1'); + window.open('project.php?op=edit_component&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=450,height=300,scrollbars=1'); return false; } function popupVersion(id) { - window.open(me + '?op=edit_version&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=250,height=150,scrollbars=1'); + window.open('project.php?op=edit_version&project_id='+projectId+'&use_js=1&id='+id, 'ewin', 'dependent=yes,width=250,height=150,scrollbars=1'); return false; } - {/literal} // --> </script> -<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="id" value="{$project_id}"> -<input type="hidden" name="do" value="project"> +<form method="post" onSubmit="return checkForm(this)"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> - {if $error} + <?php if($error) { ?> <tr> - <td colspan="2" class="error">{$error}</td> + <td colspan="2" class="error"><?php echo $error; ?></td> </tr> - {/if} + <?php } ?> <tr> <td valign="top" width="360"> - Name: + <?php echo translate("Name"); ?>: <br> - <input type="text" size="30" maxlength="30" name="project_name" value="{$project_name|stripslashes|htmlspecialchars}"> + <input type="text" size="30" maxlength="30" name="project_name" value="<?php echo stripslashes(htmlspecialchars($project_name)); ?>"> </td> <td valign="top" rowspan="3"> - Only users in the following groups can see this project: + <?php echo translate("Only users in the following groups can see this project"); ?>: <br> <select name="usergroup[]" size="10" multiple> - {build_select box=group selected=$project_groups project=1} + <?php build_select('group', $project_groups, 1); ?> </select> </td> </tr> <tr> <td valign="top"> - Description: + <?php echo translate("Description"); ?>: <br> - <textarea name="project_desc" cols=40 rows=5 wrap=virtual>{$project_desc|stripslashes|htmlspecialchars}</textarea> + <textarea name="project_desc" cols=40 rows=5 wrap=virtual><?php echo stripslashes(htmlspecialchars($project_desc)); ?></textarea> </td> </tr> <tr> <td valign="top"> - Active: + <?php echo translate("Active"); ?>: <br> - <input type="checkbox" name="active" value="1" {if $active}checked{/if}> + <input type="checkbox" name="active" value="1" <?php if($active) echo 'checked'; ?>> </td> </tr> -{if isset($perm) and $perm->have_perm('Administrator')} +<?php if(isset($perm) and $perm->have_perm('Administrator')) { ?> <tr> <td> - These developers can administer this project: + <?php echo translate("These developers can administer this project"); ?>: <br> <select name="useradmin[]" size="10" multiple> - {build_select box=owner selected=$project_admins} + <?php build_select('owner', $project_admins); ?> </select> </td> </tr> -{else} +<?php } else { ?> <tr> <td> - These developers can administer this project: + <?php echo translate("These developers can administer this project"); ?>: <br> - {section name=admin loop=$project_admins} - {$project_developers[admin]}<br /> - {/section} + <?php for ($i = 0, $count = count($project_admins); $i < $count; $i++) echo $project_developers[$i].'<br />'; ?> </td> </tr> -{/if} +<?php } ?> </table> -<input type='submit' name='submit' value='Submit'> +<input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'> +<input type="hidden" name="id" value="<?php echo $project_id; ?>"> +<input type="hidden" name="op" value="save_project"> </form> <br> <table border="0" width="100%"> <tr> <td width="50%" valign="top"> <br> - <b>Versions</b> - <a href="{$smarty.server.PHP_SELF}?op=edit_version&project_id={$project_id}&id=0" onClick="return popupVersion(0);">{$STRING.addnew} Version</a> + <b><?php echo translate("Versions"); ?></b> - <a href="project.php?op=edit_version&project_id=<?php echo $project_id; ?>&id=0" onClick="return popupVersion(0);"><?php echo translate("Add new version"); ?></a> <hr size="1"> - <table border="0" cellpadding="2" width="100%"> + <table class="bordertable" align="center"> <tr> - <th>Version</th> - <th>Created</th> - <th>Active</th> - <th>Delete</th> + <th><?php echo translate("Version"); ?></th> + <th><?php echo translate("Created"); ?></th> + <th><?php echo translate("Active"); ?></th> + <th><?php echo translate("Delete"); ?></th> </tr> - {section name=version loop=$versions} - <tr{if $smarty.section.version.iteration is even} class="alt"{/if}> - <td><a href="{$smarty.server.PHP_SELF}?op=edit_version&id={$versions[version].version_id}" onClick="popupVersion({$versions[version].version_id}); return false;">{$versions[version].version_name|stripslashes}</a></td> - <td align="center">{$versions[version].created_date|date:DATE_FORMAT}</td> - <td align="center">{if $versions[version].active}Yes{else}No{/if}</td> - <td align="center">{if not $versions[version].bug_count}<a href="{$smarty.server.PHP_SELF}?op=del_version&id={$versions[version].version_id}&project_id={$project_id}">Delete</a>{/if}</td> + <?php for ($i = 0, $count = count($versions); $i < $count; $i++) { ?> + <tr> + <td><a href="project.php?op=edit_version&id=<?php echo $versions[$i]['version_id']; ?>" onClick="popupVersion(<?php echo $versions[$i]['version_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($versions[$i]['version_name'])); ?></a></td> + <td align="center"><?php echo date(DATE_FORMAT, $versions[$i]['created_date']); ?></td> + <td align="center"><?php echo $versions[$i]['active'] ? translate("Yes") : translate("No"); ?></td> + <td align="center"><?php if(!$versions[$i]['bug_count']) { ?><a href="project.php?op=del_version&id=<?php echo $versions[$i]['version_id']; ?>&project_id=<?php echo $project_id; ?>"><?php echo translate("Delete"); ?></a><?php } ?></td> </tr> - {sectionelse} + <?php } ?> + <?php if (!$count) { ?> <tr> - <td colspan="4" align="center">{$STRING.noversions}</td> + <td colspan="4" align="center"><?php echo translate("No versions found"); ?></td> </tr> - {/section} + <?php } ?> </table> </td> <td width="50%" valign="top"> <br> - <b>Components</b> - <a href="{$smarty.server.PHP_SELF}?op=edit_component&project_id={$project_id}&id=0" onClick="return popupComponent(0);">{$STRING.addnew} Component</a> + <b><?php echo translate("Components"); ?></b> - <a href="project.php?op=edit_component&project_id=<?php echo $project_id; ?>&id=0" onClick="return popupComponent(0);"><?php echo translate("Add new component"); ?></a> <hr size="1"> - <table border="0" cellpadding="2" width="100%"> + <table class="bordertable" align="center"> <tr> - <th>Component</th> - <th>Created</th> - <th>Active</th> - <th>Delete</th> + <th><?php echo translate("Component"); ?></th> + <th><?php echo translate("Created"); ?></th> + <th><?php echo translate("Active"); ?></th> + <th><?php echo translate("Delete"); ?></th> </tr> - {section name=component loop=$components} - <tr{if $smarty.section.component.iteration is even} class="alt"{/if}> - <td><a href="{$smarty.server.PHP_SELF}?op=edit_component&id={$components[component].component_id}" onClick="popupComponent({$components[component].component_id}); return false;">{$components[component].component_name|stripslashes}</a></td> - <td align="center">{$components[component].created_date|date:DATE_FORMAT}</td> - <td align="center">{if $components[component].active}Yes{else}No{/if}</td> - <td align="center">{if not $components[component].bug_count}<a href="{$smarty.server.PHP_SELF}?op=del_component&id={$components[component].component_id}&project_id={$project_id}">Delete</a>{/if}</td> + <?php for ($i = 0, $count = count($components); $i < $count; $i++) { ?> + <tr> + <td><a href="project.php?op=edit_component&id=<?php echo $components[$i]['component_id']; ?>" onClick="popupComponent(<?php echo $components[$i]['component_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($components[$i]['component_name'])); ?></a></td> + <td align="center"><?php echo date(DATE_FORMAT, $components[$i]['created_date']); ?></td> + <td align="center"><?php echo $components[$i]['active'] ? translate("Yes") : translate("No"); ?></td> + <td align="center"><?php if(!$components[$i]['bug_count']) { ?><a href="project.php?op=del_component&id=<?php echo $components[$i]['component_id']; ?>&project_id=<?php echo $project_id; ?>"><?php echo translate("Delete"); ?></a><?php } ?></td> </tr> - {sectionelse} + <?php } ?> + <?php if (!$count) { ?> <tr> - <td colspan="4" align="center">{$STRING.nocomponents}</td> + <td colspan="4" align="center"><?php echo translate("No components found"); ?></td> </tr> - {/section} + <?php } ?> </table> </td> </tr> Index: projectlist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/projectlist.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- projectlist.html 7 Apr 2003 18:55:40 -0000 1.8 +++ projectlist.html 25 Oct 2004 12:07:03 -0000 1.9 @@ -1,31 +1,30 @@ <table border="0" width="100%"> <tr> <td valign="top"> - <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=add">{$STRING.addnew} Project</a> + <b> <?php echo $page_title; ?></b> + <?php if (isset($perm) and $perm->have_perm('Administrator')) + echo " - <a href=\"{$_SERVER['SCRIPT_NAME']}?op=add\">".translate("Add new project")."</a>"; + ?> <hr size="1"> - <table border="0" cellpadding="2" cellspacing="1" width="100%"> + <table class="bordertable" align="center"> <tr> - <th class="{$headers.name.class}"><a href="{$headers.name.url}">Project</a></th> - <th class="{$headers.createddate.class}"><a href="{$headers.createddate.url}">Created</a></th> - <th class="{$headers.active.class}"><a href="{$headers.active.url}">Active</a></th> + <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Project"); ?></a></th> + <th class="<?php echo $headers['createddate']['class']; ?>"><a href="<?php echo $headers['createddate']['url']; ?>"><?php echo translate("Created Date"); ?></a></th> + <th class="<?php echo $headers['active']['class']; ?>"><a href="<?php echo $headers['active']['url']; ?>"><?php echo translate("Active"); ?></a></th> </tr> - {section name=project loop=$projects} - <tr{if $smarty.section.project.iteration is even} class="alt"{/if}> - <td>{if $perm->have_perm('Administrator') or $perm->have_perm_proj($projects[project].project_id)}<a href="{$smarty.server.PHP_SELF}?op=edit&id={$projects[project].project_id}">{$projects[project].project_name|stripslashes}</a>{else}{$projects[project].project_name|stripslashes}{/if}</td> - <td align="center">{$projects[project].created_date|date:DATE_FORMAT}</td> - <td align="center">{if $projects[project].active}Yes{else}No{/if}</td> + <?php for ($i = 0, $count = count($projects); $i < $count; $i++) { ?> + <tr> + <td> + <?php if (isset($perm) and ($perm->have_perm('Administrator') or $perm->have_perm_proj($projects[$i]['project_id']))) { ?> + <a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?op=edit&id=<?php echo $projects[$i]['project_id']; ?>"><?php echo stripslashes($projects[$i]['project_name']); ?></a> + <?php } else { echo stripslashes($projects[$i]['project_name']); } ?> + </td> + <td align="center"><?php echo date(DATE_FORMAT, $projects[$i]['created_date']); ?></td> + <td align="center"><?php echo $projects[$i]['active'] ? translate("Yes") : translate("No"); ?></td> </tr> - {/section} - <tr> - <td colspan="3" align="center"> - <br> - {$first} - {$last} of {$total} - <br> - {if $pages ne "1"}[ {$pages} ]{/if} - <br> - </td> - </tr> + <?php } ?> </table> + <?php include('pagination.html'); ?> </td> </tr> </table> Index: resolution-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/resolution-edit.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- resolution-edit.html 5 Nov 2002 20:58:19 -0000 1.5 +++ resolution-edit.html 25 Oct 2004 12:07:03 -0000 1.6 @@ -1,48 +1,68 @@ -<script language="JavaScript"> - var nameString = '{$STRING.givename}'; - var descString = '{$STRING.givedesc}'; - - {literal} - function checkForm(frm) { - if (frm.resolution_name.value == '') { - alert(nameString); - frm.resolution_name.focus(); - return false; - } - if (frm.resolution_desc.value == '') { - alert(descString); - frm.resolution_desc.focus(); - return false; - } - return true; - } - {/literal} -</script> -<b>{$page_title} </b> -<hr size="1"> -<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="resolution_id" value="{$resolution_id}"> -<input type="hidden" name="use_js" value="{$smarty.request.use_js}"> -<table border='0'> -{if $error} - <tr> - <td colspan="2" class="error">{$error}</td> - </tr> -{/if} -<tr> - <td align="right" valign="top">Name:</td> - <td><input type="text" size="20" maxlength="40" name="resolution_name" value="{$resolution_name|stripslashes|htmlspecialchars}"></td> -</tr> -<tr> - <td align="right" valign="top">Description:</td> - <td><textarea name="resolution_desc" cols=20 rows=5 wrap=virtual>{$resolution_desc|stripslashes|htmlspecialchars}</textarea></td> -</tr> -<tr> - <td align="right" valign="top">Sort Order:</td> - <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td> -</tr> - -</table> -<br> -<input type='submit' name='submit' value='Submit'> -</form> +<script type="text/javascript" language="JavaScript"> + var nameString = '<?php echo translate("Please enter a name"); ?>'; + var descString = '<?php echo translate("Please enter a description"); ?>'; + + function checkForm(frm) { + if (frm.resolution_name.value == '') { + alert(nameString); + frm.resolution_name.focus(); + return false; + } + if (frm.resolution_desc.value == '') { + alert(descString); + frm.resolution_desc.focus(); + return false; + } + return true; + } +</script> +<b><?php echo $page_title; ?> </b> +<hr size="1"> +<form method="post" onsubmit="return checkForm(this)"> + <table border='0'> + <?php if($error) { ?> + <tr> + <td colspan="2" class="error"> + <?php echo $error; ?> + </td> + </tr> + <?php } ?> + <tr> + <td align="right" valign="top"> + <?php echo translate("Name"); ?>: + </td> + <td> + <input type="text" size="20" maxlength="40" name="resolution_name" value="<?php echo stripslashes(htmlspecialchars($resolution_name)); ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + <?php echo translate("Description"); ?>: + </td> + <td> + <textarea name="resolution_desc" cols="20" rows="5" wrap="virtual"> + <?php echo stripslashes(htmlspecialchars($resolution_desc)); ?> + </textarea> + </td> + </tr> + <tr> + <td align="right" valign="top"> + <?php echo translate("Sort Order"); ?>: + </td> + <td> + <input type="text" size="3" maxlength="3" name="sort_order" value="<?php echo $sort_order; ?>"> + </td> + </tr> + <tr> + <td align="right" valign="top"> + + </td> + <td> + <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'> + <input type="hidden" name="resolution_id" value="<?php echo $resolution_id; ?>"> + <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>"> + <input type="hidden" name="op" value="save"> + </td> + </tr> + </table> +</form> Index: resolutionlist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/resolutionlist.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- resolutionlist.html 18 May 2002 03:00:50 -0000 1.11 +++ resolutionlist.html 25 Oct 2004 12:07:03 -0000 1.12 @@ -1,53 +1,41 @@ <script language="JavaScript"> <!-- - var me = '{$smarty.server.PHP_SELF}'; - {literal} - function popupResolution(id) { - window.open(me + '?op=edit&use_js=1&resolution_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1'); + window.open('resolution.php?op=edit&use_js=1&resolution_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1'); } - {/literal} // --> </script> <table border="0" width="100%"> <tr> <td valign="top"> - <b> {$page_title}</b> - <a href="{$smarty.server.PHP_SELF}?op=edit&resolution_id=0" onClick="popupResolution(0); return false;">{$STRING.addnew} Resolution</a> + <b> <?php echo $page_title; ?></b> - <a href="resolution.php?op=edit&resolution_id=0" onClick="popupResolution(0); return false;"><?php echo translate("Add new resolution"); ?></a> <hr size="1"> - <table border="0" cellpadding="2" cellspacing="1"> + <table class="bordertable" align="center"> <tr> - <th class="{$headers.name.class}"><a href="{$headers.name.url}">Name</a></th> - <th class="{$headers.description.class}"><a href="{$headers.description.url}">Description</a></th> - <th class="{$headers.sortorder.class}"><a href="{$headers.sortorder.url}">Sort Order</a></th> - <th>Delete</th> + <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th> + <th class="<?php echo $headers['description']['class']; ?>"><a href="<?php echo $headers['description']['url']; ?>"><?php echo translate("Description"); ?></a></th> + <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th> + <th><?php echo translate("Delete"); ?></th> </tr> - {section name=resolution loop=$resolutions} - <tr{if $smarty.section.resolution.iteration is even} class="alt"{/if}> - <td><a href="{$smarty.server.PHP_SELF}?op=edit&resolution_id={$resolutions[resolution].resolution_id}" onClick="popupResolution({$resolutions[resolution].resolution_id}); return false;">{$resolutions[resolution].resolution_name|stripslashes}</a></td> - <td> {$resolutions[resolution].resolution_desc}</td> - <td align="center">{$resolutions[resolution].sort_order}</td> - <td align="center"> - {if not $resolutions[resolution].bug_count} - <a href="{$smarty.server.PHP_SELF}?op=del&resolution_id={$resolutions[resolution].resolution_id}" onClick="return confirm('Are you sure you want to delete this resolution?')">Delete</a> - {/if} - </td> - </tr> - {/section} + <?php for ($i = 0, $count = count($resolutions); $i < $count; $i++) { ?> <tr> - <td colspan="3" align="center"> - <br> - {$first} - {$last} of {$total} - <br> - {if $pages ne "1"}[ {$pages} ]{/if} - <br> + <td><a href="resolution.php?op=edit&resolution_id=<?php echo $resolutions[$i]['resolution_id']; ?>" onClick="popupResolution(<?php echo $resolutions[$i]['resolution_id']; ?>); return false;"><?php echo stripslashes($resolutions[$i]['resolution_name']); ?></a></td> + <td> <?php echo $resolutions[$i]['resolution_desc']; ?></td> + <td align="center"><?php echo $resolutions[$i]['sort_order']; ?></td> + <td align="center"> + <?php if(!$resolutions[$i]['bug_count']) { ?> + <a href="resolution.php?op=del&resolution_id=<?php echo $resolutions[$i]['resolution_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this resolution?"); ?>')"><?php echo translate("Delete"); ?></a> + <?php } ?> </td> </tr> - </table> + <?php } ?> + </table> + <?php include('pagination.html'); ?> <br> <div class="info"> - Resolutions with a Sort Order = 0 will not be selectable by users - <br> - Only those Resolutions that have no bugs referencing them can be deleted + <?php echo translate("Items with a Sort Order = 0 will not be selectable by users."); ?> + <br> + <?php echo translate("Only those items that have no bugs referencing them can be deleted."); ?> </div> </td> </tr> Index: severity-edit.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/severity-edit.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- severity-edit.html 5 Nov 2002 20:58:19 -0000 1.5 +++ severity-edit.html 25 Oct 2004 12:07:03 -0000 1.6 @@ -1,52 +1,77 @@ -<script language="JavaScript"> - var nameString = '{$STRING.givename}'; - var descString = '{$STRING.givedesc}'; - - {literal} - function checkForm(frm) { - if (frm.severity_name.value == '') { - alert(nameString); - frm.severity_name.focus(); - return false; - } - if (frm.severity_desc.value == '') { - alert(descString); - frm.severity_desc.focus(); - return false; - } - return true; - } - {/literal} -</script> -<b>{$page_title} </b> -<hr size="1"> -<form action="{$smarty.server.PHP_SELF}" method="post" onSubmit="return checkForm(this)"> -<input type="hidden" name="severity_id" value="{$severity_id}"> -<input type="hidden" name="use_js" value="{$smarty.request.use_js}"> -<table border='0'> -{if $error} - <tr> - <td colspan="2" class="error">{$error}</td> - </tr> -{/if} -<tr> - <td align="right" valign="top">Name:</td> - <td><input type="text" size="20" maxlength="40" name="severity_name" value="{$severity_name|stripslashes|htmlspecialchars}"></td> -</tr> -<tr> - <td align="right" valign="top">Description:</td> - <td><textarea name="severity_desc" cols=20 rows=5 wrap=virtual>{$severity_desc|stripslashes|htmlspecialchars}</textarea></td> -</tr> -<tr> - <td align="right" valign="top">Sort Order:</td> - <td><input type="text" size="3" maxlength="3" name="sort_order" value="{$sort_order}"></td> -</tr> -<tr> - <td align="right" valign="top">Row Color:</td> - <td><input type="text" size="11" maxlength="10" name="severity_color" value="{$severity_color}"></td> -</tr> - -</table> -<br> -<input type='submit' name='submit' value='Submit'> -</form> +<script type="text/javascript" language="JavaScript"> + var nameString = '<?php echo translate("Please enter a name"); ?>'; + var descString = '<?php echo translate("Please enter a description"); ?>'; + + function checkForm(frm) { + if (frm.severity_name.value == '') { + alert(nameString); + frm.severity_name.foc... [truncated message content] |