diff --git a/admin_domains.php b/admin_domains.php index 41f36d40..7168dedc 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -563,7 +563,7 @@ if($page == 'domains' $row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']'; } - $ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']); + $ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $settings['system']['defaultip']); } $ssl_ipsandports = ''; diff --git a/install/updates/preconfig/0.9/preconfig_0.9.inc.php b/install/updates/preconfig/0.9/preconfig_0.9.inc.php index 610d8e15..1bf88b4e 100644 --- a/install/updates/preconfig/0.9/preconfig_0.9.inc.php +++ b/install/updates/preconfig/0.9/preconfig_0.9.inc.php @@ -31,11 +31,13 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) if(versionInUpdate($current_version, '0.9.4-svn2')) { $has_preconfig = true; - $return .= 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).'; - $return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.
'; - $return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.

'; - $return .= 'Do you want to use wildcard-entries for existing domains?: '; - $return .= makeyesno('update_domainwildcardentry', '1', '0', '1').'

'; + $description = 'Froxlor now enables the usage of a domain-wildcard entry and subdomains for this domain at the same time (subdomains are parsed before the main-domain vhost container).'; + $description.= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.
'; + $description.= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.'; + $question = 'Do you want to use wildcard-entries for existing domains?: '; + $question.= makeyesno('update_domainwildcardentry', '1', '0', '1'); + + eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if(versionInUpdate($current_version, '0.9.6-svn2')) @@ -43,35 +45,38 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) if(!PHPMailer::ValidateAddress($settings['panel']['adminmail'])) { $has_preconfig = true; - $return .= 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.'; - $return .= '

Please specify a new admin-email address: 

'; + $description = 'Froxlor uses a newer version of the phpMailerClass and determined that your current admin-mail address is invalid.'; + $question = 'Please specify a new admin-email address: '; + eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } if(versionInUpdate($current_version, '0.9.6-svn3')) { $has_preconfig = true; - $return .= 'You now have the possibility to define default error-documents for your webserver which replace the default webserver output.

'; - $return .= 'Do you want to enable default error-documents?: '; - $return .= makeyesno('update_deferr_enable', '1', '0', '0').'

'; + $description = 'You now have the possibility to define default error-documents for your webserver which replace the default webserver error-messages.'; + $question = 'Do you want to enable default error-documents?: '; + $question .= makeyesno('update_deferr_enable', '1', '0', '0').'

'; if($settings['system']['webserver'] == 'apache2') { - $return .= 'Path/URL for error 500: 
'; - $return .= 'Path/URL for error 401: 
'; - $return .= 'Path/URL for error 403: 
'; + $question .= 'Path/URL for error 500: 

'; + $question .= 'Path/URL for error 401: 

'; + $question .= 'Path/URL for error 403: 

'; } - $return .= 'Path/URL for error 404: 

'; + $question .= 'Path/URL for error 404: '; + eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } if(versionInUpdate($current_version, '0.9.6-svn4')) { $has_preconfig = true; - $return .= 'You can define a default support-ticket priority level which is pre-selected for new support-tickets.

'; - $return .= 'Which should be the default ticket-priority?: '; - $return .= ''; $priorities = makeoption($lng['ticket']['unf_high'], '1', '2'); $priorities.= makeoption($lng['ticket']['unf_normal'], '2', '2'); $priorities.= makeoption($lng['ticket']['unf_low'], '3', '2'); - $return .= $priorities.'

'; + $question .= $priorities.''; + eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); } } diff --git a/templates/admin/update/preconfigitem.tpl b/templates/admin/update/preconfigitem.tpl new file mode 100644 index 00000000..5bf40f2c --- /dev/null +++ b/templates/admin/update/preconfigitem.tpl @@ -0,0 +1,6 @@ +
+

+ {$description} + {$question} +

+
diff --git a/templates/main.css b/templates/main.css index df22892f..711c6a69 100644 --- a/templates/main.css +++ b/templates/main.css @@ -458,3 +458,14 @@ TR.RowOverSelected { margin-left: 15px; } +.preconfigitem +{ + padding: 0.15em; + border-bottom: 1px solid #cccccc; +} + +.preconfdesc +{ + display: block; + margin-bottom: 0.5em; +}