mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
admin/cats: changed logic and look to apply with the style-guide
This commit is contained in:
parent
3a4c803dbd
commit
1b1329661f
@ -285,15 +285,6 @@
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Add global category');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$this->set_langs();
|
||||
|
||||
$this->template->set_file(array('form' => 'category_form.tpl'));
|
||||
$this->template->set_block('form','delete','deletehandle');
|
||||
|
||||
if ($_POST['save'])
|
||||
{
|
||||
$values = array
|
||||
@ -312,11 +303,20 @@
|
||||
else
|
||||
{
|
||||
$this->bo->save_cat($values);
|
||||
$this->template->set_var('message',lang('Category %1 has been added !', $cat_name));
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
}
|
||||
|
||||
$link_data['menuaction'] = 'admin.uicategories.add';
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Add global category');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$this->set_langs();
|
||||
|
||||
$this->template->set_file(array('form' => 'category_form.tpl'));
|
||||
$this->template->set_block('form','delete','deletehandle');
|
||||
|
||||
$link_data['menuaction'] = 'admin.uicategories.add';
|
||||
$this->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
|
||||
|
||||
$this->template->set_var('category_list',$this->bo->cats->formatted_list(array('selected' => $cat_parent)));
|
||||
@ -350,14 +350,6 @@
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Edit global category');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$this->set_langs();
|
||||
|
||||
$this->template->set_file(array('form' => 'category_form.tpl'));
|
||||
|
||||
if ($_POST['save'])
|
||||
{
|
||||
$values = array
|
||||
@ -378,10 +370,18 @@
|
||||
else
|
||||
{
|
||||
$this->cat_id = $this->bo->save_cat($values);
|
||||
$this->template->set_var('message',lang('Category %1 has been updated !',$cat_name));
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Edit global category');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$this->set_langs();
|
||||
|
||||
$this->template->set_file(array('form' => 'category_form.tpl'));
|
||||
|
||||
$cats = $this->bo->cats->return_single($this->cat_id);
|
||||
|
||||
$hidden_vars = '<input type="hidden" name="cat_id" value="' . $this->cat_id . '">' . "\n"
|
||||
|
@ -7,20 +7,21 @@
|
||||
<form name="form" action="{action_url}" method="POST">
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<tr bgcolor="{row_on}">
|
||||
<td>{lang_parent}</td>
|
||||
<td colspan="2">{lang_parent}</td>
|
||||
<td><select name="new_parent"><option value="">{lang_none}</option>{category_list}</select></td>
|
||||
</tr>
|
||||
<tr bgcolor="{row_off}">
|
||||
<td>{lang_name}:</td>
|
||||
<td colspan="2">{lang_name}:</td>
|
||||
<td><input name="cat_name" size="50" value="{cat_name}"></td>
|
||||
</tr>
|
||||
<tr bgcolor="{row_on}">
|
||||
<td valign="top">{lang_descr}:</td>
|
||||
<td colspan="2"><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td>
|
||||
<td valign="top" colspan="2">{lang_descr}:</td>
|
||||
<td><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td>
|
||||
</tr>
|
||||
<tr height="50" valign="bottom">
|
||||
<td><input type="submit" name="save" value="{lang_save}"></td>
|
||||
<td align="right"><input type="submit" name="cancel" value="{lang_cancel}"></td>
|
||||
<td><input type="submit" name="cancel" value="{lang_cancel}"></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
@ -44,9 +44,10 @@
|
||||
<tr valign="bottom" height="50">
|
||||
<form method="POST" action="{action_url}">
|
||||
<!-- BEGIN add -->
|
||||
<td colspan="2"><input type="submit" name="add" value="{lang_add}"></td>
|
||||
<td><input type="submit" name="add" value="{lang_add}">
|
||||
<!-- END add -->
|
||||
<td colspan="3" align="right"><input type="submit" name="done" value="{lang_done}"></td>
|
||||
<input type="submit" name="done" value="{lang_cancel}"></td>
|
||||
<td colspan="5"> </td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user