- 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

@@ -368,9 +368,9 @@ elseif($page == 'domains')
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
}
$redirectcode = '';
if($settings['customredirect']['enabled'] == '1')
{
$redirectcode = '';
$codes = getRedirectCodesArray();
foreach($codes as $rc)
{
@@ -552,10 +552,10 @@ elseif($page == 'domains')
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
}
$redirectcode = '';
if($settings['customredirect']['enabled'] == '1')
{
$def_code = getDomainRedirectId($id);
$redirectcode = '';
$codes = getRedirectCodesArray();
foreach($codes as $rc)
{

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'],

View File

@@ -1,9 +1,10 @@
$header
<form method="post" action="$filename">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="send" value="send" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
<tr>
<td class="maintitle" colspan="2"><b><img src="images/Classic/title.gif" alt="{$title}" />&nbsp;{$title}</b></td>

View File

@@ -3,6 +3,7 @@ $header
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="send" value="send" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
<tr>
<td class="maintitle" colspan="2"><b><img src="images/Classic/title.gif" alt="{$title}" />&nbsp;{$title}</b></td>

View File

@@ -1,8 +1,9 @@
$header
<form method="post" action="$filename">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="send" value="send" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
<tr>
<td class="maintitle" colspan="2"><b><img src="images/Classic/title.gif" alt="{$title}" />&nbsp;{$title}</b></td>

View File

@@ -3,6 +3,7 @@ $header
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="send" value="send" />
<input type="hidden" name="id" value="$id" />
<if 0 < $ticket_replies_count >
$ticket_replies

View File

@@ -9,7 +9,7 @@ $header
<tr>
<td class="maintitle" colspan="2"><b><img src="images/Classic/title.gif" alt="{$title}" />&nbsp;{$title}</b></td>
</tr>
{$account_changepw}
{$account_changepw_form}
</table>
</form>
<br />

View File

@@ -1,15 +1,13 @@
$header
<form method="post" action="$filename">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="send" value="send" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
<tr>
<td class="maintitle" colspan="2"><b><img src="images/Classic/title.gif" alt="$title" />&nbsp;{$title}</b></td>
</tr>
{$email_edit_form}
<tr>
<td class="maintitle" colspan="2"><a href="$filename?page=email&amp;s=$s">Back to overview (@TODO lng)</a></td>
</tr>
</table>
</form>
<br />

View File

@@ -15,15 +15,10 @@ $header
<table class="formtable">
{$email_edit_form}
<tr>
<td class="maintitle" colspan="2"><a href="$filename?page=emails&amp;s=$s">Back to overview (@TODO lng)</a></td>
</tr>
</table>
<p style="display: none;">
<input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" />
<input type="hidden" name="action" value="$action" />
<input type="hidden" name="id" value="$id" />
<input type="hidden" name="send" value="send" />
</p>
</fieldset>
</form>