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
-
{$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} |
||