From 13bde223443d15251162418ad7f7394b201244ac Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 1 Mar 2011 10:31:38 +0100 Subject: [PATCH] - updated outdated domains_add & domains_edit templates in Classic-theme - fixed formfield when path-mode is 'Manual' fixes #620 Signed-off-by: Michael Kaufmann (d00p) --- .../domains/formfield.domains_add.php | 3 +- .../domains/formfield.domains_edit.php | 3 +- .../filedir/function.makePathfield.php | 14 ++-- .../Classic/customer/domains/domains_add.tpl | 50 ++------------ .../Classic/customer/domains/domains_edit.tpl | 69 ++----------------- 5 files changed, 20 insertions(+), 119 deletions(-) diff --git a/lib/formfields/customer/domains/formfield.domains_add.php b/lib/formfields/customer/domains/formfield.domains_add.php index d333bb07..135b30d9 100644 --- a/lib/formfields/customer/domains/formfield.domains_add.php +++ b/lib/formfields/customer/domains/formfield.domains_add.php @@ -44,7 +44,8 @@ return array( 'label' => $lng['panel']['path'], 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], - 'select_var' => $pathSelect['value'] + 'select_var' => $pathSelect['value'], + 'value' => $pathSelect['value'] ), 'url' => array( 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), diff --git a/lib/formfields/customer/domains/formfield.domains_edit.php b/lib/formfields/customer/domains/formfield.domains_edit.php index 2741e5f3..ba551e8d 100644 --- a/lib/formfields/customer/domains/formfield.domains_edit.php +++ b/lib/formfields/customer/domains/formfield.domains_edit.php @@ -44,7 +44,8 @@ return array( 'label' => $lng['panel']['path'], 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], - 'select_var' => $pathSelect['value'] + 'select_var' => $pathSelect['value'], + 'value' => $pathSelect['value'] ), 'url' => array( 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), diff --git a/lib/functions/filedir/function.makePathfield.php b/lib/functions/filedir/function.makePathfield.php index 1d5098b3..912a47b4 100644 --- a/lib/functions/filedir/function.makePathfield.php +++ b/lib/functions/filedir/function.makePathfield.php @@ -38,6 +38,12 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '') $value = str_replace($path, '', $value); $field = array(); + // path is given without starting slash + // but dirList holds the paths with starting slash + // so we just add one here to get the correct + // default path selected, #225 + $value = '/'.$value; + if($fieldType == 'Manual') { $field = array( @@ -48,12 +54,6 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '') } elseif($fieldType == 'Dropdown') { - // path is given without starting slash - // but dirList holds the paths with starting slash - // so we just add one here to get the correct - // default path selected, #225 - $value = '/'.$value; - $dirList = findDirs($path, $uid, $gid); natcasesort($dirList); @@ -93,7 +93,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '') else { //$field = $lng['panel']['dirsmissing']; - $field = ''; + //$field = ''; $field = array( 'type' => 'hidden', 'value' => '/', diff --git a/templates/Classic/customer/domains/domains_add.tpl b/templates/Classic/customer/domains/domains_add.tpl index d9862601..ff9c2a24 100644 --- a/templates/Classic/customer/domains/domains_add.tpl +++ b/templates/Classic/customer/domains/domains_add.tpl @@ -3,55 +3,13 @@ $header - +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {$subdomain_add_form}
 {$lng['domains']['subdomain_add']}
{$lng['domains']['domainname']}: .
{$lng['domains']['aliasdomain']}:
{$lng['panel']['pathorurl']}:
{$lng['panel']['pathDescription']}{$lng['panel']['pathDescriptionEx']}
{$pathSelect}
{$lng['panel']['path']}:{$pathSelect}
{$lng['panel']['urloverridespath']}:
{$lng['domains']['redirectifpathisurl']}:
{$lng['domains']['redirectifpathisurlinfo']}
SSL Redirect:$ssl_redirect
{$lng['domain']['openbasedirpath']}:
$title {$title}


-$footer \ No newline at end of file +$footer diff --git a/templates/Classic/customer/domains/domains_edit.tpl b/templates/Classic/customer/domains/domains_edit.tpl index 526808c6..456e6519 100644 --- a/templates/Classic/customer/domains/domains_edit.tpl +++ b/templates/Classic/customer/domains/domains_edit.tpl @@ -2,75 +2,16 @@ $header
- - + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {$subdomain_edit_form}
 {$lng['domains']['subdomain_edit']}
{$lng['domains']['domainname']}:{$result['domain']}
{$lng['dns']['destinationip']}:{$domainip}
{$lng['domains']['aliasdomain']}:
{$lng['panel']['pathorurl']}:
{$lng['panel']['pathDescription']}{$lng['panel']['pathDescriptionEx']}
{$pathSelect}
{$lng['panel']['path']}:{$pathSelect}
{$lng['panel']['urloverridespath']}:
{$lng['domains']['redirectifpathisurl']}:
{$lng['domains']['redirectifpathisurlinfo']}
{$lng['domains']['wildcarddomain']}$iswildcarddomain
Emaildomain:$isemaildomain
SSL Redirect:$ssl_redirect
{$lng['domain']['openbasedirpath']}:
$title {$title}


$footer +