- fix undefined index in customer_domains.php

- add possibility to disable form-buttons if not needed
- corrected ticket-categories order-counter begin-value
- beautify domains-add and e-mail add form for customers
- added various missing hidden-fields in templates (Classic-theme)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2011-03-04 11:46:40 +01:00
parent adeac9cce1
commit d6d19e7cb2
13 changed files with 35 additions and 28 deletions

View File

@@ -27,6 +27,7 @@ class htmlform
public static function genHTMLForm($data = array())
{
global $lng;
$nob = false;
self::$_form = '';
@@ -47,7 +48,11 @@ class htmlform
continue;
}
eval("self::\$_form .= \"" . getTemplate("misc/form/table_section", "1") . "\";");
if (!isset($section['nobuttons']) || $section['nobuttons'] == false) {
eval("self::\$_form .= \"" . getTemplate("misc/form/table_section", "1") . "\";");
} else {
$nob = true;
}
$nexto = false;
foreach($section['fields'] as $fieldname => $fielddata)
@@ -89,7 +94,9 @@ class htmlform
}
// add save/reset buttons at the end of the form
eval("self::\$_form .= \"" . getTemplate("misc/form/table_end", "1") . "\";");
if (!$nob) {
eval("self::\$_form .= \"" . getTemplate("misc/form/table_end", "1") . "\";");
}
return self::$_form;
}

View File

@@ -453,7 +453,7 @@ class ticket
{
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`;";
$result = $_db->query_first($sql);
return (isset($result['highestorder']) ? (int)$result['highestorder'] : 1);
return (isset($result['highestorder']) ? (int)$result['highestorder'] : 0);
}
/**

View File

@@ -26,7 +26,8 @@ return array(
'fields' => array(
'subdomain' => array(
'label' => $lng['domains']['domainname'],
'type' => 'text',
'type' => 'textul',
'ul_field' => '',
'has_nextto' => true
),
'domain' => array(

View File

@@ -26,7 +26,8 @@ return array(
'fields' => array(
'email_part' => array(
'label' => $lng['emails']['emailaddress'],
'type' => 'text',
'type' => 'textul',
'ul_field' => '',
'has_nextto' => true
),
'domain' => array(

View File

@@ -23,6 +23,7 @@ return array(
'section_a' => array(
'title' => $lng['emails']['emails_edit'],
'image' => 'icons/email_edit.png',
'nobuttons' => true,
'fields' => array(
'email_full' => array(
'label' => $lng['emails']['emailaddress'],