installer modification
This commit is contained in:
@@ -189,7 +189,7 @@ class Installer
|
||||
public function setPreferences($preferences)
|
||||
{
|
||||
$currencyList = $this->app->getContainer()->get('config')->get('currencyList');
|
||||
if (!in_array($preferences['defaultCurrency'], $currencyList)) {
|
||||
if (isset($preferences['defaultCurrency']) && !in_array($preferences['defaultCurrency'], $currencyList)) {
|
||||
$preferences['currencyList'] = array($preferences['defaultCurrency']);
|
||||
}
|
||||
|
||||
@@ -285,6 +285,9 @@ class Installer
|
||||
);
|
||||
|
||||
$data = array_intersect_key($preferences, array_flip($allowedPreferences));
|
||||
if (empty($data)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$entity = $this->getEntityManager()->getEntity('Preferences', '1');
|
||||
if ($entity) {
|
||||
|
||||
@@ -35,29 +35,21 @@ class SystemHelper
|
||||
|
||||
protected $modRewriteUrl = '/api/v1/Metadata';
|
||||
|
||||
protected $systemConfig = 'data/config.php';
|
||||
protected $writableDir = 'data';
|
||||
|
||||
|
||||
public function initWritable()
|
||||
{
|
||||
$pathInfo = pathinfo($this->systemConfig);
|
||||
|
||||
if (!is_writable($pathInfo['dirname'])) {
|
||||
return false;
|
||||
if (is_writable($this->writableDir)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!@touch($this->systemConfig)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getSystemDir()
|
||||
public function getWritableDir()
|
||||
{
|
||||
$pathInfo = pathinfo($this->systemConfig);
|
||||
|
||||
return $pathInfo['dirname'];
|
||||
return $this->writableDir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ $data = array(
|
||||
$lang = (!empty($_SESSION['install']['user-lang']))? $_SESSION['install']['user-lang'] : 'en_US';
|
||||
if (!$installer->saveData($data, $lang)) {
|
||||
$result['success'] = false;
|
||||
$result['errorMsg'] = $langs['Can not save settings'];
|
||||
$result['errorMsg'] = $langs['messages']['Can not save settings'];
|
||||
}
|
||||
|
||||
ob_clean();
|
||||
|
||||
@@ -29,7 +29,7 @@ if (!$installer->isWritable()) {
|
||||
foreach ($urls as &$url) {
|
||||
$url = ' '.$url;
|
||||
}
|
||||
$result['errorMsg'] = $langs['Permission denied to files'].':<br>'.implode('<br>', $urls);
|
||||
$result['errorMsg'] = $langs['messages']['Permission denied to files'].':<br>'.implode('<br>', $urls);
|
||||
$result['errorFixInstruction'] = $systemHelper->getPermissionCommands('', array('644', '755'));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
$serverType = $systemHelper->getServerType();
|
||||
$os = $systemHelper->getOS();
|
||||
|
||||
$cronFile = $systemHelper->getRootDir().DIRECTORY_SEPARATOR.'cron.php';
|
||||
|
||||
$cronHelp = (isset($langs['cronHelp'][$serverType]))? $langs['cronHelp'][$serverType] : $langs['cronHelp']['default'];
|
||||
$cronHelp = str_replace('<cron-file>', $cronFile, $cronHelp);
|
||||
$cronHelp = str_replace('<php-bin-dir>', $systemHelper->getPhpBin(), $cronHelp);
|
||||
$cronTitle = (isset($langs['cronTitle'][$serverType]))? $langs['cronTitle'][$serverType] : $langs['cronTitle']['default'];
|
||||
$cronHelp = (isset($langs['options']['cronHelp'][$os]))? $langs['options']['cronHelp'][$os] : $langs['options']['cronHelp']['default'];
|
||||
$cronHelp = str_replace('{cronFile}', $cronFile, $cronHelp);
|
||||
$cronHelp = str_replace('{phpBinDir}', $systemHelper->getPhpBin(), $cronHelp);
|
||||
$cronTitle = (isset($langs['options']['cronTitle'][$os]))? $langs['options']['cronTitle'][$os] : $langs['options']['cronTitle']['default'];
|
||||
|
||||
$smarty->assign('cronTitle', $cronTitle);
|
||||
$smarty->assign('cronHelp', $cronHelp);
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
ob_start();
|
||||
$result = array('success' => false, 'errorMsg' => '');
|
||||
|
||||
if (!empty($_SESSION['install'])) {
|
||||
$preferences = array(
|
||||
'smtpServer' => $_SESSION['install']['smtpServer'],
|
||||
'smtpPort' => $_SESSION['install']['smtpPort'],
|
||||
'smtpAuth' => (empty($_SESSION['install']['smtpAuth']) || $_SESSION['install']['smtpAuth'] == 'false' || !$_SESSION['install']['smtpAuth'])? false : true,
|
||||
'smtpSecurity' => $_SESSION['install']['smtpSecurity'],
|
||||
'smtpUsername' => $_SESSION['install']['smtpUsername'],
|
||||
'smtpPassword' => $_SESSION['install']['smtpPassword'],
|
||||
'outboundEmailFromName' => $_SESSION['install']['outboundEmailFromName'],
|
||||
'outboundEmailFromAddress' => $_SESSION['install']['outboundEmailFromAddress'],
|
||||
'outboundEmailIsShared' => (empty($_SESSION['install']['smtpAuth']) || $_SESSION['install']['outboundEmailIsShared'] == 'false' || !$_SESSION['install']['smtpAuth'])? false : true,
|
||||
);
|
||||
$res = $installer->setPreferences($preferences);
|
||||
if (!empty($res)) {
|
||||
$result['success'] = true;
|
||||
}
|
||||
else {
|
||||
$result['success'] = false;
|
||||
$result['errorMsg'] = 'Cannot save preferences';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$result['success'] = false;
|
||||
$result['errorMsg'] = 'Cannot save preferences';
|
||||
}
|
||||
|
||||
ob_clean();
|
||||
echo json_encode($result);
|
||||
@@ -33,15 +33,6 @@ if (!empty($_SESSION['install'])) {
|
||||
'thousandSeparator' => $_SESSION['install']['thousandSeparator'],
|
||||
'decimalMark' => $_SESSION['install']['decimalMark'],
|
||||
'language' => $_SESSION['install']['language'],
|
||||
'smtpServer' => $_SESSION['install']['smtpServer'],
|
||||
'smtpPort' => $_SESSION['install']['smtpPort'],
|
||||
'smtpAuth' => (empty($_SESSION['install']['smtpAuth']) || $_SESSION['install']['smtpAuth'] == 'false' || !$_SESSION['install']['smtpAuth'])? false : true,
|
||||
'smtpSecurity' => $_SESSION['install']['smtpSecurity'],
|
||||
'smtpUsername' => $_SESSION['install']['smtpUsername'],
|
||||
'smtpPassword' => $_SESSION['install']['smtpPassword'],
|
||||
'outboundEmailFromName' => $_SESSION['install']['outboundEmailFromName'],
|
||||
'outboundEmailFromAddress' => $_SESSION['install']['outboundEmailFromAddress'],
|
||||
'outboundEmailIsShared' => (empty($_SESSION['install']['smtpAuth']) || $_SESSION['install']['outboundEmailIsShared'] == 'false' || !$_SESSION['install']['smtpAuth'])? false : true,
|
||||
);
|
||||
$res = $installer->setPreferences($preferences);
|
||||
if (!empty($res)) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
$fields = array(
|
||||
'db-name' => array(),
|
||||
'host-name' => array(
|
||||
'default' => (isset($langs['localhost']))? $langs['localhost'] : '',),
|
||||
'default' => (isset($langs['labels']['localhost']))? $langs['labels']['localhost'] : '',),
|
||||
'db-user-name' => array(),
|
||||
'db-user-password' => array(),
|
||||
'db-driver' => array()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
$fields = array(
|
||||
'user-name' => array(
|
||||
'default' => (isset($langs['admin']))? $langs['admin'] : 'admin',
|
||||
'default' => (isset($langs['labels']['admin']))? $langs['labels']['admin'] : 'admin',
|
||||
),
|
||||
'user-pass' => array(),
|
||||
'user-confirm-pass' => array(),
|
||||
|
||||
@@ -38,20 +38,7 @@ $fields = array(
|
||||
),
|
||||
'language' => array(
|
||||
'default'=> (!empty($_SESSION['install']['user-lang'])) ? $_SESSION['install']['user-lang'] : 'en_US'
|
||||
),
|
||||
'smtpServer' => array(),
|
||||
'smtpPort' => array(
|
||||
'default' => '25',
|
||||
),
|
||||
'smtpAuth' => array(),
|
||||
'smtpSecurity' => array(
|
||||
'default' => (isset($settingsDefaults['smtpSecurity']['default'])) ? $settingsDefaults['smtpSecurity']['default'] : ''),
|
||||
'smtpUsername' => array(),
|
||||
'smtpPassword' => array(),
|
||||
|
||||
'outboundEmailFromName' => array(),
|
||||
'outboundEmailFromAddress' => array(),
|
||||
'outboundEmailIsShared' => array(),
|
||||
);
|
||||
|
||||
foreach ($fields as $fieldName => $field) {
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
$fields = array(
|
||||
'smtpServer' => array(),
|
||||
'smtpPort' => array(
|
||||
'default' => '25',
|
||||
),
|
||||
'smtpAuth' => array(),
|
||||
'smtpSecurity' => array(
|
||||
'default' => (isset($settingsDefaults['smtpSecurity']['default'])) ? $settingsDefaults['smtpSecurity']['default'] : ''),
|
||||
'smtpUsername' => array(),
|
||||
'smtpPassword' => array(),
|
||||
|
||||
'outboundEmailFromName' => array(),
|
||||
'outboundEmailFromAddress' => array(),
|
||||
'outboundEmailIsShared' => array(),
|
||||
);
|
||||
|
||||
foreach ($fields as $fieldName => $field) {
|
||||
if (isset($_SESSION['install'][$fieldName])) {
|
||||
$fields[$fieldName]['value'] = $_SESSION['install'][$fieldName];
|
||||
}
|
||||
else {
|
||||
$fields[$fieldName]['value'] = (isset($fields[$fieldName]['default']))? $fields[$fieldName]['default'] : '';
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->assign('fields', $fields);
|
||||
@@ -1,163 +0,0 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
|
||||
return array(
|
||||
'Main page title' => 'Welcome to EspoCRM',
|
||||
'Main page header' => '',
|
||||
'Bad init Permission' => 'Permission denied for "{*}" directory. Please set 775 for "{*}" or just execute this command in the terminal <pre><b>{C}</b></pre>
|
||||
Operation not permitted? Try this one: {CSU}',
|
||||
'Start page title' => 'License Agreement',
|
||||
'Step1 page title' => 'License Agreement',
|
||||
'License Agreement' => 'License Agreement',
|
||||
'I accept the agreement' => 'I accept the agreement',
|
||||
'Choose your language:' => 'Choose your language:',
|
||||
'Database Name' => 'Database Name',
|
||||
'Host Name' => 'Host Name',
|
||||
'Database User Name' => 'Database User Name',
|
||||
'Database User Password' => 'Database User Password',
|
||||
'Database driver' => 'Database driver',
|
||||
'Step2 page title' => 'Database configuration',
|
||||
'Step3 page title' => 'Administrator Setup',
|
||||
'Step4 page title' => 'System Settings',
|
||||
'User Name' => 'User Name',
|
||||
'Password' => 'Password',
|
||||
'Confirm Password' => 'Confirm your Password',
|
||||
'Errors page title' => 'Errors',
|
||||
'Finish page title' => 'Installation is complete',
|
||||
'Congratulation! Welcome to EspoCRM!' => 'Congratulation! EspoCRM has been successfully installed.',
|
||||
'admin' => 'admin',
|
||||
'localhost' => 'localhost',
|
||||
|
||||
'Locale' => 'Locale',
|
||||
'Outbound Email Configuration' => 'Outbound Email Configuration',
|
||||
'SMTP' => 'SMTP',
|
||||
'From Address' => 'From Address',
|
||||
'From Name' => 'From Name',
|
||||
'Is Shared' => 'Is Shared',
|
||||
'Date Format' => 'Date Format',
|
||||
'Time Format' => 'Time Format',
|
||||
'Time Zone' => 'Time Zone',
|
||||
'First Day of Week' => 'First Day of Week',
|
||||
'Thousand Separator' => 'Thousand Separator',
|
||||
'Decimal Mark' => 'Decimal Mark',
|
||||
'Default Currency' => 'Default Currency',
|
||||
'Currency List' => 'Currency List',
|
||||
'Language' => 'Language',
|
||||
|
||||
'smtpServer' => 'Server',
|
||||
'smtpPort' => 'Port',
|
||||
'smtpAuth' => 'Auth',
|
||||
'smtpSecurity' => 'Security',
|
||||
'smtpUsername' => 'Username',
|
||||
'emailAddress' => 'Email',
|
||||
'smtpPassword' => 'Password',
|
||||
|
||||
|
||||
// messages
|
||||
'Some errors occurred!' => 'Some errors occurred!',
|
||||
'Supported php version >=' => 'Supported php version >=',
|
||||
'The PHP extension was not found...' => 'The <b><ext-name></b> PHP extension was not found...',
|
||||
'All Settings correct' => 'All Settings are correct',
|
||||
'Failed to connect to database' => 'Failed to connect to database',
|
||||
'PHP version:' => 'PHP version:',
|
||||
'You must agree to the license agreement' => 'You must agree to the license agreement',
|
||||
'Passwords do not match' => 'Passwords do not match',
|
||||
'Enable mod_rewrite in Apache server' => 'Enable mod_rewrite in Apache server',
|
||||
'checkWritable error' => 'checkWritable error',
|
||||
'applySett error' => 'applySett error',
|
||||
'buildDatabse error' => 'buildDatabse error',
|
||||
'createUser error' => 'createUser error',
|
||||
'checkAjaxPermission error' => 'checkAjaxPermission error',
|
||||
'Ajax failed' => 'Ajax failed',
|
||||
'Cannot create user' => 'Cannot create user',
|
||||
'Permission denied' => 'Permission denied',
|
||||
'permissionInstruction' => '<br>Run this in Terminal<pre><b>"{C}"</b></pre>',
|
||||
'Permission denied to files' => 'Permission denied to file(s)',
|
||||
'Can not save settings' => 'Can not save settings',
|
||||
'Cannot save preferences' => 'Cannot save preferences',
|
||||
|
||||
'db driver' => array(
|
||||
'mysqli' => 'MySQLi',
|
||||
'pdo_mysql' => 'PDO MySQL',
|
||||
),
|
||||
|
||||
'modRewriteInstruction' => array(
|
||||
'apache' => array(
|
||||
'linux' => '<br><br>Run those commands in Terminal<pre><b>1. a2enmod rewrite <br>2. service apache2 restart</b></pre>',
|
||||
'windows' => '<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>
|
||||
2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound \'#\' sign from in front of the line)<br>
|
||||
3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.
|
||||
</pre>',
|
||||
),
|
||||
'microsoft-iis' => array(
|
||||
'windows' => '',
|
||||
|
||||
),
|
||||
),
|
||||
|
||||
'modRewriteHelp' => array(
|
||||
'apache' => 'Enable "mod_rewrite" in Apache server',
|
||||
'nginx' => 'Add this code to Nginx Host Config (inside "server" block):<br>
|
||||
<pre>
|
||||
location /api/v1/ {
|
||||
if (!-e $request_filename){
|
||||
rewrite ^/api/v1/(.*)$ /api/v1/index.php last; break;
|
||||
}
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite reset/?$ reset.html break;
|
||||
}</pre>',
|
||||
'microsoft-iis' => 'Enable "URL Rewrite" Module in IIS server',
|
||||
'default' => 'Enable Rewrite Module in your server (e.g. mod_rewrite in Apache)',
|
||||
),
|
||||
|
||||
'cronTitle' => array(
|
||||
'apache' => 'To Setup Crontab:',
|
||||
'nginx' => 'To Setup Crontab:',
|
||||
'microsoft-iis' => 'To Setup Scheduled Task:',
|
||||
'default' => 'To Setup Cron job:',
|
||||
),
|
||||
|
||||
'cronHelp' => array(
|
||||
'apache' => 'Note: Add this line to the crontab file to run Espo Scheduled Jobs:
|
||||
* * * * * <php-bin-dir> -f <cron-file> > /dev/null 2>&1',
|
||||
'nginx' => 'Note: Add this line to Tasks to run Espo Scheduled Jobs:
|
||||
* * * * * <php-bin-dir> -f <cron-file> > /dev/null 2>&1',
|
||||
'microsoft-iis' => 'Note: Create a batch file with the following commands to run Espo Scheduled Jobs using Windows Scheduled Tasks:
|
||||
<php-bin-dir>.exe -f <cron-file>',
|
||||
'default' => 'Run command <cron-file>',
|
||||
),
|
||||
|
||||
// controll
|
||||
'Start' => 'Start',
|
||||
'Back' => 'Back',
|
||||
'Next' => 'Next',
|
||||
'Go to EspoCRM' => 'Go to EspoCRM',
|
||||
'Re-check' => 'Re-check',
|
||||
'Test settings' => 'Test Connection',
|
||||
|
||||
// db errors
|
||||
'1049' => 'Unknown database',
|
||||
'2005' => 'Unknown MySQL server host',
|
||||
'1045' => 'Access denied for user',
|
||||
);
|
||||
@@ -0,0 +1,118 @@
|
||||
{
|
||||
"labels": {
|
||||
"Main page title": "Welcome to EspoCRM",
|
||||
"Main page header": "",
|
||||
"Start page title": "License Agreement",
|
||||
"Step1 page title": "License Agreement",
|
||||
"License Agreement": "License Agreement",
|
||||
"I accept the agreement": "I accept the agreement",
|
||||
"Step2 page title": "Database configuration",
|
||||
"Step3 page title": "Administrator Setup",
|
||||
"Step4 page title": "System settings",
|
||||
"Step5 page title": "SMTP settings for outgoing emails",
|
||||
"Errors page title": "Errors",
|
||||
"Finish page title": "Installation is complete",
|
||||
"Congratulation! Welcome to EspoCRM!": "Congratulation! EspoCRM has been successfully installed.",
|
||||
"admin": "admin",
|
||||
"localhost": "localhost",
|
||||
"Locale": "Locale",
|
||||
"Outbound Email Configuration": "Outbound Email Configuration",
|
||||
"SMTP": "SMTP",
|
||||
"Start": "Start",
|
||||
"Back": "Back",
|
||||
"Next": "Next",
|
||||
"Go to EspoCRM": "Go to EspoCRM",
|
||||
"Re-check": "Re-check",
|
||||
"Test settings": "Test Connection"
|
||||
},
|
||||
"fields": {
|
||||
"Choose your language:": "Choose your language:",
|
||||
"Database Name": "Database Name",
|
||||
"Host Name": "Host Name",
|
||||
"Database User Name": "Database User Name",
|
||||
"Database User Password": "Database User Password",
|
||||
"Database driver": "Database driver",
|
||||
"User Name": "User Name",
|
||||
"Password": "Password",
|
||||
"Confirm Password": "Confirm your Password",
|
||||
"From Address": "From Address",
|
||||
"From Name": "From Name",
|
||||
"Is Shared": "Is Shared",
|
||||
"Date Format": "Date Format",
|
||||
"Time Format": "Time Format",
|
||||
"Time Zone": "Time Zone",
|
||||
"First Day of Week": "First Day of Week",
|
||||
"Thousand Separator": "Thousand Separator",
|
||||
"Decimal Mark": "Decimal Mark",
|
||||
"Default Currency": "Default Currency",
|
||||
"Currency List": "Currency List",
|
||||
"Language": "Language",
|
||||
"smtpServer": "Server",
|
||||
"smtpPort": "Port",
|
||||
"smtpAuth": "Auth",
|
||||
"smtpSecurity": "Security",
|
||||
"smtpUsername": "Username",
|
||||
"emailAddress": "Email",
|
||||
"smtpPassword": "Password"
|
||||
},
|
||||
"messages": {
|
||||
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}<\/b><\/pre>\n\tOperation not permitted? Try this one: {CSU}",
|
||||
"Some errors occurred!": "Some errors occurred!",
|
||||
"Supported php version >=": "Supported php version >=",
|
||||
"The PHP extension was not found...": "The <b>{extName}<\/b> PHP extension was not found...",
|
||||
"All Settings correct": "All Settings are correct",
|
||||
"Failed to connect to database": "Failed to connect to database",
|
||||
"PHP version:": "PHP version:",
|
||||
"You must agree to the license agreement": "You must agree to the license agreement",
|
||||
"Passwords do not match": "Passwords do not match",
|
||||
"Enable mod_rewrite in Apache server": "Enable mod_rewrite in Apache server",
|
||||
"checkWritable error": "checkWritable error",
|
||||
"applySett error": "applySett error",
|
||||
"buildDatabse error": "buildDatabse error",
|
||||
"createUser error": "createUser error",
|
||||
"checkAjaxPermission error": "checkAjaxPermission error",
|
||||
"Ajax failed": "Ajax failed",
|
||||
"Cannot create user": "Cannot create user",
|
||||
"Permission denied": "Permission denied",
|
||||
"permissionInstruction": "<br>Run this in Terminal<pre><b>\"{C}\"<\/b><\/pre>",
|
||||
"Permission denied to files": "Permission denied to file(s)",
|
||||
"Can not save settings": "Can not save settings",
|
||||
"Cannot save preferences": "Cannot save preferences",
|
||||
"Thousand Separator and Decimal Mark equal": "Thousand Separator and Decimal Mark cannot be equal",
|
||||
"1049": "Unknown database",
|
||||
"2005": "Unknown MySQL server host",
|
||||
"1045": "Access denied for user"
|
||||
},
|
||||
"options": {
|
||||
"db driver": {
|
||||
"mysqli": "MySQLi",
|
||||
"pdo_mysql": "PDO MySQL"
|
||||
},
|
||||
"modRewriteInstruction": {
|
||||
"apache": {
|
||||
"linux": "<br><br>Run those commands in Terminal<pre><b>1. a2enmod rewrite <br>2. service apache2 restart<\/b><\/pre>",
|
||||
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules\/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n<\/pre>"
|
||||
},
|
||||
"microsoft-iis": {
|
||||
"windows": ""
|
||||
}
|
||||
},
|
||||
"modRewriteHelp": {
|
||||
"apache": "Enable \"mod_rewrite\" in Apache server",
|
||||
"nginx": "Add this code to Nginx Host Config (inside \"server\" block):<br>\n<pre>\nlocation \/api\/v1\/ {\n if (!-e $request_filename){\n rewrite ^\/api\/v1\/(.*)$ \/api\/v1\/index.php last; break;\n }\n}\n\nlocation \/ {\n rewrite reset\/?$ reset.html break;\n}<\/pre>",
|
||||
"microsoft-iis": "Enable \"URL Rewrite\" Module in IIS server",
|
||||
"default": "Enable Rewrite Module in your server (e.g. mod_rewrite in Apache)"
|
||||
},
|
||||
"cronTitle": {
|
||||
"linux": "To Setup Crontab:",
|
||||
"windows": "To Setup Scheduled Task:",
|
||||
"default": "To Setup Cron job:"
|
||||
},
|
||||
"cronHelp": {
|
||||
"linux": "Note: Add this line to the crontab file to run Espo Scheduled Jobs:\n* * * * * {phpBinDir} -f {cronFile} > \/dev\/null 2>&1",
|
||||
"mac": "Note: Add this line to Tasks to run Espo Scheduled Jobs:\n* * * * * {phpBinDir} -f {cronFile} > \/dev\/null 2>&1",
|
||||
"windows": "Note: Create a batch file with the following commands to run Espo Scheduled Jobs using Windows Scheduled Tasks:\n{phpBinDir}.exe -f {cronFile}",
|
||||
"default": "Run command {cronFile}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">{$langs['Errors page title']}</h4>
|
||||
<h4 class="panel-title">{$langs['labels']['Errors page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
<div id="msg-box" class="alert alert-danger">{$errors}</div>
|
||||
@@ -14,7 +14,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-primary" type="button" id="re-check">{$langs['Re-check']}</button>
|
||||
<button class="btn btn-primary" type="button" id="re-check">{$langs['labels']['Re-check']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">{$langs['Finish page title']}</h4>
|
||||
<h4 class="panel-title">{$langs['labels']['Finish page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
<form id="nav">
|
||||
<div class="row">
|
||||
<div class=" col-md-13">
|
||||
<div class="panel-body" align="center">
|
||||
{$langs['Congratulation! Welcome to EspoCRM!']}
|
||||
{$langs['labels']['Congratulation! Welcome to EspoCRM!']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@
|
||||
</pre>
|
||||
{/if}
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-primary" type="button" id="start">{$langs['Go to EspoCRM']}</button>
|
||||
<button class="btn btn-primary" type="button" id="start">{$langs['labels']['Go to EspoCRM']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">{$langs['Main page title']}</h4>
|
||||
<h4 class="panel-title">{$langs['labels']['Main page title']}</h4>
|
||||
</header>
|
||||
<form id="nav">
|
||||
<div class="panel-body">
|
||||
@@ -10,14 +10,14 @@
|
||||
<div class="content-img">
|
||||
<img class="devices" src="img/devices.png" alt="EspoCRM">
|
||||
</div>
|
||||
{$langs['Main page header']}
|
||||
{$langs['labels']['Main page header']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="modal-footer">
|
||||
<div class="cell cell-website pull-left" align="left">
|
||||
<label class="field-label-website control-label">{$langs['Choose your language:']}</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Choose your language:']}</label>
|
||||
<div class="field field-website">
|
||||
<select name="user-lang" class="form-control">
|
||||
{foreach from=$languageList item=lbl key=val}
|
||||
@@ -30,7 +30,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="button" id="start">{$langs['Start']}</button>
|
||||
<button class="btn btn-primary" type="button" id="start">{$langs['labels']['Start']}</button>
|
||||
</footer>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">{$langs['Step1 page title']}</h4>
|
||||
<h4 class="panel-title">{$langs['labels']['Step1 page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
<div id="msg-box" class="alert hide"></div>
|
||||
@@ -17,14 +17,14 @@
|
||||
</div>
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<input class="btn btn-default" type="checkbox" name="license-agree" id="license-agree" value="1" {if $fields['license-agree'].value}checked="checked"{/if}>
|
||||
<label class="point-lbl" for="license-agree"> {$langs['I accept the agreement']}</label>
|
||||
<label class="point-lbl" for="license-agree"> {$langs['labels']['I accept the agreement']}</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['Next']}</button>
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['labels']['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['labels']['Next']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">{$langs['Step2 page title']}</h4>
|
||||
<h4 class="panel-title">{$langs['labels']['Step2 page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class=" col-md-6">
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['Host Name']} *</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Host Name']} *</label>
|
||||
<div class="field field-website">
|
||||
<input type="text" value="{$fields['host-name'].value}" name="host-name" class="main-element form-control">
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class=" col-md-6">
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['Database Name']} *</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Database Name']} *</label>
|
||||
<div class="field field-website">
|
||||
<input type="text" value="{$fields['db-name'].value}" name="db-name" class="main-element form-control">
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class=" col-md-6">
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['Database User Name']} *</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Database User Name']} *</label>
|
||||
<div class="field field-website">
|
||||
<input type="text" value="{$fields['db-user-name'].value}" name="db-user-name" class="main-element form-control">
|
||||
</div>
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class=" col-md-6">
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['Database User Password']}</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Database User Password']}</label>
|
||||
<div class="field field-website">
|
||||
<input type="password" value="{$fields['db-user-password'].value}" name="db-user-password" class="main-element form-control">
|
||||
</div>
|
||||
@@ -59,13 +59,13 @@
|
||||
</form>
|
||||
|
||||
<div class="btn-panel">
|
||||
<button class="btn btn-default" type="button" id="test-connection">{$langs['Test settings']}</button>
|
||||
<button class="btn btn-default" type="button" id="test-connection">{$langs['labels']['Test settings']}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['Next']}</button>
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['labels']['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['labels']['Next']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title">{$langs['Step3 page title']}</h4>
|
||||
<h4 class="panel-title">{$langs['labels']['Step3 page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
<div id="msg-box" class="alert hide"></div>
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class=" col-md-6">
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['User Name']} *</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['User Name']} *</label>
|
||||
<div class="field field-website">
|
||||
<input type="text" value="{$fields['user-name'].value}" name="user-name" class="main-element form-control">
|
||||
</div>
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['Password']} *</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Password']} *</label>
|
||||
<div class="field field-website">
|
||||
<input type="password" value="{$fields['user-pass'].value}" name="user-pass" class="main-element form-control">
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-website col-sm-12 form-group">
|
||||
<label class="field-label-website control-label">{$langs['Confirm Password']} *</label>
|
||||
<label class="field-label-website control-label">{$langs['fields']['Confirm Password']} *</label>
|
||||
<div class="field field-website">
|
||||
<input type="password" value="{$fields['user-confirm-pass'].value}" name="user-confirm-pass" class="main-element form-control">
|
||||
</div>
|
||||
@@ -40,8 +40,8 @@
|
||||
</form>
|
||||
</div>
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['Next']}</button>
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['labels']['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['labels']['Next']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
|
||||
+126
-287
@@ -1,287 +1,147 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title main-title">{$langs['Step4 page title']}</h4>
|
||||
<h4 class="panel-title main-title">{$langs['labels']['Step4 page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
<div id="msg-box" class="alert hide"></div>
|
||||
<div class="loading-icon hide"></div>
|
||||
<form id="nav">
|
||||
<div class="row">
|
||||
<div class=" col-md-8" style="width:100%" >
|
||||
<div class="record">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title subpanel" >{$langs['Locale']}</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell cell-dateFormat col-sm-6 form-group">
|
||||
<label class="field-label-dateFormat control-label">
|
||||
{$langs['Date Format']}
|
||||
</label>
|
||||
<div class="field field-dateFormat">
|
||||
<select name="dateFormat" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['dateFormat'].options item=lbl key=val}
|
||||
{if $val == $fields['dateFormat'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-timeFormat col-sm-6 form-group">
|
||||
<label class="field-label-timeFormat control-label">
|
||||
{$langs['Time Format']}
|
||||
</label>
|
||||
<div class="field field-timeFormat">
|
||||
<select name="timeFormat" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['timeFormat'].options item=lbl key=val}
|
||||
{if $val == $fields['timeFormat'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-timeZone col-sm-6 form-group">
|
||||
<label class="field-label-timeZone control-label">
|
||||
{$langs['Time Zone']}
|
||||
</label>
|
||||
<div class="field field-timeZone">
|
||||
<select name="timeZone" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['timeZone'].options item=lbl key=val}
|
||||
{if $val == $fields['timeZone'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-weekStart col-sm-6 form-group">
|
||||
<label class="field-label-weekStart control-label">
|
||||
{$langs['First Day of Week']}
|
||||
</label>
|
||||
<div class="field field-weekStart">
|
||||
<select name="weekStart" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['weekStart'].options item=lbl key=val}
|
||||
{if $val == $fields['weekStart'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="cell cell-defaultCurrency col-sm-6 form-group">
|
||||
<label class="field-label-defaultCurrency control-label">
|
||||
{$langs['Default Currency']}
|
||||
</label>
|
||||
<div class="field field-defaultCurrency">
|
||||
<select name="defaultCurrency" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['defaultCurrency'].options item=lbl key=val}
|
||||
{if $val == $fields['defaultCurrency'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="cell cell-thousandSeparator col-sm-6 form-group">
|
||||
<label class="field-label-thousandSeparator control-label">
|
||||
{$langs['Thousand Separator']} *
|
||||
</label>
|
||||
<div class="field field-thousandSeparator">
|
||||
<input type="text" class="main-element form-control" name="thousandSeparator" value="{$fields['thousandSeparator'].value}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-decimalMark col-sm-6 form-group">
|
||||
<label class="field-label-decimalMark control-label">
|
||||
{$langs['Decimal Mark']} *</label>
|
||||
<div class="field field-decimalMark">
|
||||
<input type="text" class="main-element form-control" name="decimalMark" value="{$fields['decimalMark'].value}">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="cell cell-language col-sm-6 form-group">
|
||||
<label class="field-label-language control-label">
|
||||
{$langs['Language']}
|
||||
</label>
|
||||
<div class="field field-language">
|
||||
<select name="language" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['language'].options item=lbl key=val}
|
||||
{if $val == $fields['language'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
|
||||
<div class="panel-heading"><h4 class="panel-title subpanel">{$langs['Outbound Email Configuration']}</h4></div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="cell cell-outboundEmailFromName col-sm-6 form-group">
|
||||
<label class="field-label-outboundEmailFromName control-label">
|
||||
{$langs['From Name']}</label>
|
||||
<div class="field field-outboundEmailFromName">
|
||||
|
||||
<input type="text" class="main-element form-control" name="outboundEmailFromName" value="{$fields['outboundEmailFromName'].value}">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-outboundEmailFromAddress col-sm-6 form-group">
|
||||
<label class="field-label-outboundEmailFromAddress control-label">
|
||||
{$langs['From Address']}</label>
|
||||
<div class="field field-outboundEmailFromAddress">
|
||||
|
||||
<input type="text" class="main-element form-control" name="outboundEmailFromAddress" value="{$fields['outboundEmailFromAddress'].value}">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-outboundEmailIsShared col-sm-6 form-group">
|
||||
<label class="field-label-outboundEmailIsShared control-label">
|
||||
{$langs['Is Shared']}
|
||||
</label>
|
||||
<div class="field field-outboundEmailIsShared">
|
||||
<input type="checkbox" {if $fields['outboundEmailIsShared'].value} checked {/if} name="outboundEmailIsShared" class="main-element">
|
||||
|
||||
<div class="col-md-8" style="width:100%" >
|
||||
<div class="row">
|
||||
<div class="cell cell-dateFormat col-sm-6 form-group">
|
||||
<label class="field-label-dateFormat control-label">
|
||||
{$langs['fields']['Date Format']}
|
||||
</label>
|
||||
<div class="field field-dateFormat">
|
||||
<select name="dateFormat" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['dateFormat'].options item=lbl key=val}
|
||||
{if $val == $fields['dateFormat'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-timeFormat col-sm-6 form-group">
|
||||
<label class="field-label-timeFormat control-label">
|
||||
{$langs['fields']['Time Format']}
|
||||
</label>
|
||||
<div class="field field-timeFormat">
|
||||
<select name="timeFormat" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['timeFormat'].options item=lbl key=val}
|
||||
{if $val == $fields['timeFormat'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-timeZone col-sm-6 form-group">
|
||||
<label class="field-label-timeZone control-label">
|
||||
{$langs['fields']['Time Zone']}
|
||||
</label>
|
||||
<div class="field field-timeZone">
|
||||
<select name="timeZone" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['timeZone'].options item=lbl key=val}
|
||||
{if $val == $fields['timeZone'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h4 class="panel-title subpanel">{$langs['SMTP']}</h4></div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="cell cell-smtpServer col-sm-6 form-group">
|
||||
<label class="field-label-smtpServer control-label">
|
||||
{$langs['smtpServer']}
|
||||
</label>
|
||||
<div class="field field-smtpServer">
|
||||
<input type="text" class="main-element form-control" name="smtpServer" value="{$fields['smtpServer'].value}">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell cell-smtpPort col-sm-6 form-group">
|
||||
<label class="field-label-smtpPort control-label">
|
||||
{$langs['smtpPort']}
|
||||
</label>
|
||||
<div class="field field-smtpPort">
|
||||
<input type="text" class="main-element form-control" name="smtpPort" value="{$fields['smtpPort'].value}" pattern="[\-]?[0-9]*" maxlength="4">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpAuth col-sm-6 form-group">
|
||||
<label class="field-label-smtpAuth control-label">
|
||||
{$langs['smtpAuth']}
|
||||
</label>
|
||||
<div class="field field-smtpAuth">
|
||||
<input type="checkbox" name="smtpAuth" class="main-element" {if $fields['smtpAuth'].value} checked {/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell cell-smtpSecurity col-sm-6 form-group">
|
||||
<label class="field-label-smtpSecurity control-label">
|
||||
{$langs['smtpSecurity']}
|
||||
</label>
|
||||
<div class="field field-smtpSecurity">
|
||||
<select name="smtpSecurity" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['smtpSecurity'].options item=lbl key=val}
|
||||
{if $val == $fields['smtpSecurity'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpUsername col-sm-6 form-group {if !$fields['smtpAuth'].value} hide {/if}">
|
||||
<label class="field-label-smtpUsername control-label">
|
||||
{$langs['smtpUsername']} *</label>
|
||||
<div class="field field-smtpUsername">
|
||||
<input type="text" class="main-element form-control" name="smtpUsername" value="{$fields['smtpUsername'].value}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpPassword col-sm-6 form-group {if !$fields['smtpAuth'].value} hide {/if}">
|
||||
<label class="field-label-smtpPassword control-label">
|
||||
{$langs['smtpPassword']}
|
||||
</label>
|
||||
<div class="field field-smtpPassword">
|
||||
<input type="password" class="main-element form-control" name="smtpPassword" value="{$fields['smtpPassword'].value}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell cell-weekStart col-sm-6 form-group">
|
||||
<label class="field-label-weekStart control-label">
|
||||
{$langs['fields']['First Day of Week']}
|
||||
</label>
|
||||
<div class="field field-weekStart">
|
||||
<select name="weekStart" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['weekStart'].options item=lbl key=val}
|
||||
{if $val == $fields['weekStart'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-defaultCurrency col-sm-6 form-group">
|
||||
<label class="field-label-defaultCurrency control-label">
|
||||
{$langs['fields']['Default Currency']}
|
||||
</label>
|
||||
<div class="field field-defaultCurrency">
|
||||
<select name="defaultCurrency" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['defaultCurrency'].options item=lbl key=val}
|
||||
{if $val == $fields['defaultCurrency'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-thousandSeparator col-sm-6 form-group">
|
||||
<label class="field-label-thousandSeparator control-label">
|
||||
{$langs['fields']['Thousand Separator']}
|
||||
</label>
|
||||
<div class="field field-thousandSeparator">
|
||||
<input type="text" class="main-element form-control" name="thousandSeparator" value="{$fields['thousandSeparator'].value}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="extra"></div>
|
||||
<div class="bottom"></div>
|
||||
<div class="cell cell-decimalMark col-sm-6 form-group">
|
||||
<label class="field-label-decimalMark control-label">
|
||||
{$langs['fields']['Decimal Mark']} *</label>
|
||||
<div class="field field-decimalMark">
|
||||
<input type="text" class="main-element form-control" name="decimalMark" value="{$fields['decimalMark'].value}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-language col-sm-6 form-group">
|
||||
<label class="field-label-language control-label">
|
||||
{$langs['fields']['Language']}
|
||||
</label>
|
||||
<div class="field field-language">
|
||||
<select name="language" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['language'].options item=lbl key=val}
|
||||
{if $val == $fields['language'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side col-md-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['Next']}</button>
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['labels']['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['labels']['Next']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
@@ -290,27 +150,6 @@
|
||||
var langs = {$langsJs};
|
||||
{literal}
|
||||
var installScript = new InstallScript({action: 'step4', langs: langs});
|
||||
$('.field-smtpAuth').find('input[type="checkbox"]').change( function(e){
|
||||
if ($(this).is(':checked')) {
|
||||
$('.cell-smtpPassword').removeClass('hide');
|
||||
$('.cell-smtpUsername').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('.cell-smtpPassword').addClass('hide');
|
||||
$('.cell-smtpUsername').addClass('hide');
|
||||
$('.cell-smtpUsername').find('input').val('');
|
||||
$('.cell-smtpPassword').find('input').val('');
|
||||
}
|
||||
});
|
||||
$('[name="smtpSecurity"]').change( function(e){
|
||||
if ($(this).val() == '') {
|
||||
$('[name="smtpPort"]').val('25');
|
||||
}
|
||||
else {
|
||||
$('[name="smtpPort"]').val('465');
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<header class="panel-heading">
|
||||
<h4 class="panel-title main-title">{$langs['labels']['Step5 page title']}</h4>
|
||||
</header>
|
||||
<div class="panel-body body">
|
||||
<div id="msg-box" class="alert hide"></div>
|
||||
<div class="loading-icon hide"></div>
|
||||
<form id="nav">
|
||||
<div class="row">
|
||||
<div class="col-md-8" style="width:100%" >
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-outboundEmailFromName col-sm-6 form-group">
|
||||
<label class="field-label-outboundEmailFromName control-label">
|
||||
{$langs['fields']['From Name']}</label>
|
||||
<div class="field field-outboundEmailFromName">
|
||||
<input type="text" class="main-element form-control" name="outboundEmailFromName" value="{$fields['outboundEmailFromName'].value}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-outboundEmailFromAddress col-sm-6 form-group">
|
||||
<label class="field-label-outboundEmailFromAddress control-label">
|
||||
{$langs['fields']['From Address']}</label>
|
||||
<div class="field field-outboundEmailFromAddress">
|
||||
<input type="text" class="main-element form-control" name="outboundEmailFromAddress" value="{$fields['outboundEmailFromAddress'].value}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-outboundEmailIsShared col-sm-6 form-group">
|
||||
<label class="field-label-outboundEmailIsShared control-label">
|
||||
{$langs['fields']['Is Shared']}
|
||||
</label>
|
||||
<div class="field field-outboundEmailIsShared">
|
||||
<input type="checkbox" {if $fields['outboundEmailIsShared'].value} checked {/if} name="outboundEmailIsShared" class="main-element">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpServer col-sm-6 form-group">
|
||||
<label class="field-label-smtpServer control-label">
|
||||
{$langs['fields']['smtpServer']}
|
||||
</label>
|
||||
<div class="field field-smtpServer">
|
||||
<input type="text" class="main-element form-control" name="smtpServer" value="{$fields['smtpServer'].value}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-smtpPort col-sm-6 form-group">
|
||||
<label class="field-label-smtpPort control-label">
|
||||
{$langs['fields']['smtpPort']}
|
||||
</label>
|
||||
<div class="field field-smtpPort">
|
||||
<input type="text" class="main-element form-control" name="smtpPort" value="{$fields['smtpPort'].value}" pattern="[\-]?[0-9]*" maxlength="4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpAuth col-sm-6 form-group">
|
||||
<label class="field-label-smtpAuth control-label">
|
||||
{$langs['fields']['smtpAuth']}
|
||||
</label>
|
||||
<div class="field field-smtpAuth">
|
||||
<input type="checkbox" name="smtpAuth" class="main-element" {if $fields['smtpAuth'].value} checked {/if}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cell cell-smtpSecurity col-sm-6 form-group">
|
||||
<label class="field-label-smtpSecurity control-label">
|
||||
{$langs['fields']['smtpSecurity']}
|
||||
</label>
|
||||
<div class="field field-smtpSecurity">
|
||||
<select name="smtpSecurity" class="form-control main-element">
|
||||
{foreach from=$settingsDefaults['smtpSecurity'].options item=lbl key=val}
|
||||
{if $val == $fields['smtpSecurity'].value}
|
||||
<option selected="selected" value="{$val}">{$lbl}</option>
|
||||
{else}
|
||||
<option value="{$val}">{$lbl}</option>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpUsername col-sm-6 form-group {if !$fields['smtpAuth'].value} hide {/if}">
|
||||
<label class="field-label-smtpUsername control-label">
|
||||
{$langs['fields']['smtpUsername']} *
|
||||
</label>
|
||||
<div class="field field-smtpUsername">
|
||||
<input type="text" class="main-element form-control" name="smtpUsername" value="{$fields['smtpUsername'].value}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell cell-smtpPassword col-sm-6 form-group {if !$fields['smtpAuth'].value} hide {/if}">
|
||||
<label class="field-label-smtpPassword control-label">
|
||||
{$langs['fields']['smtpPassword']}
|
||||
</label>
|
||||
<div class="field field-smtpPassword">
|
||||
<input type="password" class="main-element form-control" name="smtpPassword" value="{$fields['smtpPassword'].value}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<footer class="modal-footer">
|
||||
<button class="btn btn-default" type="button" id="back">{$langs['labels']['Back']}</button>
|
||||
<button class="btn btn-primary" type="button" id="next">{$langs['labels']['Next']}</button>
|
||||
</footer>
|
||||
<script>
|
||||
{literal}
|
||||
$(function(){
|
||||
{/literal}
|
||||
var langs = {$langsJs};
|
||||
{literal}
|
||||
var installScript = new InstallScript({action: 'step5', langs: langs});
|
||||
})
|
||||
{/literal}
|
||||
</script>
|
||||
+11
-6
@@ -26,21 +26,22 @@ require_once('../bootstrap.php');
|
||||
|
||||
// get user selected language
|
||||
$userLang = (!empty($_SESSION['install']['user-lang']))? $_SESSION['install']['user-lang'] : 'en_US';
|
||||
$langFileName = 'core/i18n/'.$userLang.'.php';
|
||||
$langFileName = 'core/i18n/'.$userLang.'/install.json';
|
||||
$langs = array();
|
||||
if (file_exists('install/'.$langFileName)) {
|
||||
$langs = include($langFileName);
|
||||
$langs = file_get_contents('install/'.$langFileName);
|
||||
} else {
|
||||
$langs = include('core/i18n/en_US.php');
|
||||
$langs = file_get_contents('install/core/i18n/en_US/install.json');
|
||||
}
|
||||
$langs = json_decode($langs, true);
|
||||
|
||||
require_once 'core/SystemHelper.php';
|
||||
$systemHelper = new SystemHelper();
|
||||
|
||||
if (!$systemHelper->initWritable()) {
|
||||
$dir = $systemHelper->getSystemDir();
|
||||
$dir = $systemHelper->getWritableDir();
|
||||
|
||||
$message = $langs['Bad init Permission'];
|
||||
$message = $langs['messages']['Bad init Permission'];
|
||||
$message = str_replace('{*}', $dir, $message);
|
||||
$message = str_replace('{C}', $systemHelper->getPermissionCommands(array($dir, ''), '775'), $message);
|
||||
$message = str_replace('{CSU}', $systemHelper->getPermissionCommands(array($dir, ''), '775', true), $message);
|
||||
@@ -108,7 +109,11 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'step4':
|
||||
case 'errors':
|
||||
$settingsDefaults = $installer->getSettingDefaults();
|
||||
$smarty->assign("settingsDefaults", $settingsDefaults);
|
||||
break;
|
||||
|
||||
case 'step5':
|
||||
$settingsDefaults = $installer->getSettingDefaults();
|
||||
$smarty->assign("settingsDefaults", $settingsDefaults);
|
||||
break;
|
||||
|
||||
+121
-40
@@ -49,7 +49,8 @@ var InstallScript = function(opt) {
|
||||
|
||||
this.connSett = {};
|
||||
this.userSett = {};
|
||||
this.firstUserPreferences = {};
|
||||
this.systemSettings = {};
|
||||
this.emailSettings = {};
|
||||
this.checkActions = [
|
||||
{
|
||||
'action': 'checkModRewrite',
|
||||
@@ -110,7 +111,7 @@ InstallScript.prototype.step1 = function() {
|
||||
|
||||
if (licenseAgree.length > 0 && !licenseAgree.is(':checked')) {
|
||||
$(this).removeAttr('disabled');
|
||||
self.showMsg({msg: self.getLang('You must agree to the license agreement'), error: true});
|
||||
self.showMsg({msg: self.getLang('You must agree to the license agreement', 'messages'), error: true});
|
||||
}
|
||||
else {
|
||||
self.goTo(nextAction);
|
||||
@@ -142,7 +143,7 @@ InstallScript.prototype.step2 = function() {
|
||||
success: function(data) {
|
||||
if (data.success) {
|
||||
if (btn.attr('id') == 'next') self.goTo(nextAction);
|
||||
else self.showMsg({msg: self.getLang('All Settings correct')});
|
||||
else self.showMsg({msg: self.getLang('All Settings correct', 'messages')});
|
||||
}
|
||||
else {
|
||||
$('#next').removeAttr('disabled');
|
||||
@@ -154,7 +155,7 @@ InstallScript.prototype.step2 = function() {
|
||||
$('#next').removeAttr('disabled');
|
||||
$('#test-connection').removeAttr('disabled');
|
||||
self.hideLoading();
|
||||
}, // success END
|
||||
}, // error END
|
||||
|
||||
}) // checkSett END
|
||||
|
||||
@@ -183,11 +184,10 @@ InstallScript.prototype.step3 = function() {
|
||||
success: function(){
|
||||
self.showLoading();
|
||||
self.actionsChecking();
|
||||
//self.goTo(nextAction);
|
||||
},
|
||||
error: function(msg) {
|
||||
$("#next").removeAttr('disabled');
|
||||
self.showMsg({msg: self.getLang(msg), error: true});
|
||||
self.showMsg({msg: self.getLang(msg, 'messages'), error: true});
|
||||
}
|
||||
});
|
||||
})
|
||||
@@ -196,7 +196,7 @@ InstallScript.prototype.step3 = function() {
|
||||
InstallScript.prototype.step4 = function() {
|
||||
var self = this;
|
||||
var backAction = 'step3';
|
||||
var nextAction = 'finish';
|
||||
var nextAction = 'step5';
|
||||
|
||||
$('#back').click(function(){
|
||||
$(this).attr('disabled', 'disabled');
|
||||
@@ -205,12 +205,12 @@ InstallScript.prototype.step4 = function() {
|
||||
|
||||
$("#next").click(function(){
|
||||
$(this).attr('disabled', 'disabled');
|
||||
self.setFirstUserPreferences();
|
||||
self.setSystemSett();
|
||||
if (!self.validate()) {
|
||||
$(this).removeAttr('disabled');
|
||||
return;
|
||||
}
|
||||
var data = self.firstUserPreferences;
|
||||
var data = self.systemSettings;
|
||||
|
||||
data.action = 'setPreferences';
|
||||
$.ajax({
|
||||
@@ -231,6 +231,65 @@ InstallScript.prototype.step4 = function() {
|
||||
})
|
||||
}
|
||||
|
||||
InstallScript.prototype.step5 = function() {
|
||||
var self = this;
|
||||
var backAction = 'step4';
|
||||
var nextAction = 'finish';
|
||||
|
||||
$('#back').click(function(){
|
||||
$(this).attr('disabled', 'disabled');
|
||||
self.goTo(backAction);
|
||||
})
|
||||
|
||||
$("#next").click(function(){
|
||||
$(this).attr('disabled', 'disabled');
|
||||
self.setEmailSett();
|
||||
if (!self.validate()) {
|
||||
$(this).removeAttr('disabled');
|
||||
return;
|
||||
}
|
||||
var data = self.emailSettings;
|
||||
|
||||
data.action = 'setEmailSett';
|
||||
$.ajax({
|
||||
url: "index.php",
|
||||
type: "POST",
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
})
|
||||
.done(function(ajaxData){
|
||||
if (typeof(ajaxData) != 'undefined' && ajaxData.success) {
|
||||
self.goTo(nextAction);
|
||||
}
|
||||
})
|
||||
.fail(function(ajaxData){
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
$('.field-smtpAuth').find('input[type="checkbox"]').change( function(e){
|
||||
if ($(this).is(':checked')) {
|
||||
$('.cell-smtpPassword').removeClass('hide');
|
||||
$('.cell-smtpUsername').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('.cell-smtpPassword').addClass('hide');
|
||||
$('.cell-smtpUsername').addClass('hide');
|
||||
$('.cell-smtpUsername').find('input').val('');
|
||||
$('.cell-smtpPassword').find('input').val('');
|
||||
}
|
||||
});
|
||||
$('[name="smtpSecurity"]').change( function(e){
|
||||
if ($(this).val() == '') {
|
||||
$('[name="smtpPort"]').val('25');
|
||||
}
|
||||
else {
|
||||
$('[name="smtpPort"]').val('465');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
InstallScript.prototype.errors = function() {
|
||||
var self = this;
|
||||
|
||||
@@ -266,25 +325,27 @@ InstallScript.prototype.setUserSett = function() {
|
||||
this.userSett.confPass = $('[name="user-confirm-pass"]').val();
|
||||
}
|
||||
|
||||
InstallScript.prototype.setFirstUserPreferences = function() {
|
||||
this.firstUserPreferences.dateFormat = $('[name="dateFormat"]').val();
|
||||
this.firstUserPreferences.timeFormat = $('[name="timeFormat"]').val();
|
||||
this.firstUserPreferences.timeZone = $('[name="timeZone"]').val();
|
||||
this.firstUserPreferences.weekStart = $('[name="weekStart"]').val();
|
||||
this.firstUserPreferences.defaultCurrency = $('[name="defaultCurrency"]').val();
|
||||
this.firstUserPreferences.thousandSeparator = $('[name="thousandSeparator"]').val();
|
||||
this.firstUserPreferences.decimalMark = $('[name="decimalMark"]').val();
|
||||
this.firstUserPreferences.language = $('[name="language"]').val();
|
||||
this.firstUserPreferences.smtpServer = $('[name="smtpServer"]').val();
|
||||
this.firstUserPreferences.smtpPort = $('[name="smtpPort"]').val();
|
||||
this.firstUserPreferences.smtpAuth = $('[name="smtpAuth"]').is(':checked');
|
||||
this.firstUserPreferences.smtpSecurity = $('[name="smtpSecurity"]').val();
|
||||
this.firstUserPreferences.smtpUsername = $('[name="smtpUsername"]').val();
|
||||
this.firstUserPreferences.smtpPassword = $('[name="smtpPassword"]').val();
|
||||
this.firstUserPreferences.outboundEmailFromName = $('[name="outboundEmailFromName"]').val();
|
||||
this.firstUserPreferences.outboundEmailFromAddress = $('[name="outboundEmailFromAddress"]').val();
|
||||
this.firstUserPreferences.outboundEmailIsShared = $('[name="outboundEmailIsShared"]').is(':checked');
|
||||
InstallScript.prototype.setSystemSett = function() {
|
||||
this.systemSettings.dateFormat = $('[name="dateFormat"]').val();
|
||||
this.systemSettings.timeFormat = $('[name="timeFormat"]').val();
|
||||
this.systemSettings.timeZone = $('[name="timeZone"]').val();
|
||||
this.systemSettings.weekStart = $('[name="weekStart"]').val();
|
||||
this.systemSettings.defaultCurrency = $('[name="defaultCurrency"]').val();
|
||||
this.systemSettings.thousandSeparator = $('[name="thousandSeparator"]').val();
|
||||
this.systemSettings.decimalMark = $('[name="decimalMark"]').val();
|
||||
this.systemSettings.language = $('[name="language"]').val();
|
||||
}
|
||||
|
||||
InstallScript.prototype.setEmailSett = function() {
|
||||
this.emailSettings.smtpServer = $('[name="smtpServer"]').val();
|
||||
this.emailSettings.smtpPort = $('[name="smtpPort"]').val();
|
||||
this.emailSettings.smtpAuth = $('[name="smtpAuth"]').is(':checked');
|
||||
this.emailSettings.smtpSecurity = $('[name="smtpSecurity"]').val();
|
||||
this.emailSettings.smtpUsername = $('[name="smtpUsername"]').val();
|
||||
this.emailSettings.smtpPassword = $('[name="smtpPassword"]').val();
|
||||
this.emailSettings.outboundEmailFromName = $('[name="outboundEmailFromName"]').val();
|
||||
this.emailSettings.outboundEmailFromAddress = $('[name="outboundEmailFromAddress"]').val();
|
||||
this.emailSettings.outboundEmailIsShared = $('[name="outboundEmailIsShared"]').is(':checked');
|
||||
}
|
||||
|
||||
InstallScript.prototype.checkSett = function(opt) {
|
||||
@@ -309,15 +370,15 @@ InstallScript.prototype.checkSett = function(opt) {
|
||||
if (typeof(data.errors)) {
|
||||
var errors = data.errors;
|
||||
if (typeof(errors.phpVersion) !== 'undefined') {
|
||||
msg += self.getLang('Supported php version >=')+' '+errors.phpVersion+rowDelim;
|
||||
msg += self.getLang('Supported php version >=', 'messages')+' '+errors.phpVersion+rowDelim;
|
||||
}
|
||||
|
||||
if (typeof(errors.exts) !== 'undefined') {
|
||||
var exts = errors.exts;
|
||||
var len = exts.length;
|
||||
for (var index = 0; index < len; index++) {
|
||||
var temp = self.getLang('The <ext-name> PHP extension was not found...');
|
||||
temp = temp.replace('<ext-name>', exts[index]);
|
||||
var temp = self.getLang('The {extName} PHP extension was not found...', 'messages');
|
||||
temp = temp.replace('{extName}', exts[index]);
|
||||
msg += temp+rowDelim;
|
||||
}
|
||||
}
|
||||
@@ -328,7 +389,7 @@ InstallScript.prototype.checkSett = function(opt) {
|
||||
|
||||
if (typeof(errors.dbConnect) !== 'undefined') {
|
||||
if (typeof(errors.dbConnect.errorCode) !== 'undefined') {
|
||||
var temp = self.getLang(errors.dbConnect.errorCode);
|
||||
var temp = self.getLang(errors.dbConnect.errorCode, 'messages');
|
||||
if (temp == errors.dbConnect.errorCode && typeof(errors.dbConnect.errorMsg) !== 'undefined') temp = errors.dbConnect.errorMsg;
|
||||
}
|
||||
else if (typeof(errors.dbConnect.errorMsg) !== 'undefined') {
|
||||
@@ -339,7 +400,7 @@ InstallScript.prototype.checkSett = function(opt) {
|
||||
}
|
||||
|
||||
if (msg == '') {
|
||||
msg = self.getLang('Some errors occurred!');
|
||||
msg = self.getLang('Some errors occurred!', 'messages');
|
||||
}
|
||||
self.showMsg({msg: msg, error: true});
|
||||
}
|
||||
@@ -347,13 +408,15 @@ InstallScript.prototype.checkSett = function(opt) {
|
||||
opt.success(data);
|
||||
})
|
||||
.fail(function(){
|
||||
msg = self.getLang('Ajax failed');
|
||||
msg = self.getLang('Ajax failed', 'messages');
|
||||
self.showMsg({msg: msg, error: true});
|
||||
opt.error();
|
||||
})
|
||||
}
|
||||
|
||||
InstallScript.prototype.validate = function() {
|
||||
this.hideMsg();
|
||||
|
||||
var valid = true;
|
||||
var elem = null;
|
||||
var fieldRequired = [];
|
||||
@@ -365,7 +428,11 @@ InstallScript.prototype.validate = function() {
|
||||
fieldRequired = ['user-name', 'user-pass', 'user-confirm-pass'];
|
||||
break;
|
||||
case 'step4':
|
||||
fieldRequired = ['thousandSeparator', 'decimalMark', 'smtpUsername'];
|
||||
fieldRequired = ['decimalMark'];
|
||||
break;
|
||||
break;
|
||||
case 'step5':
|
||||
fieldRequired = ['smtpUsername'];
|
||||
break;
|
||||
|
||||
|
||||
@@ -383,6 +450,20 @@ InstallScript.prototype.validate = function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// decimal and group sep
|
||||
$('[name="thousandSeparator"]').parent().parent().removeClass('has-error');
|
||||
if (typeof(this.systemSettings.thousandSeparator) !== 'undefined'
|
||||
&& typeof(this.systemSettings.decimalMark) !== 'undefined'
|
||||
&& this.systemSettings.thousandSeparator == this.systemSettings.decimalMark
|
||||
&& valid) {
|
||||
|
||||
$('[name="thousandSeparator"]').parent().parent().addClass('has-error');
|
||||
$('[name="decimalMark"]').parent().parent().addClass('has-error');
|
||||
msg = this.getLang('Thousand Separator and Decimal Mark equal', 'messages');
|
||||
this.showMsg({msg: msg, error: true});
|
||||
valid = false;
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
@@ -408,8 +489,8 @@ InstallScript.prototype.goTo = function(action) {
|
||||
$('#nav').submit();
|
||||
}
|
||||
|
||||
InstallScript.prototype.getLang = function(key) {
|
||||
return (typeof(this.langs) !== 'undefined' && typeof(this.langs[key]) !== 'undefined')? this.langs[key] : key;
|
||||
InstallScript.prototype.getLang = function(key, type) {
|
||||
return (typeof(this.langs) !== 'undefined' && typeof(this.langs[type]) !== 'undefined' && typeof(this.langs[type][key]) !== 'undefined')? this.langs[type][key] : key;
|
||||
}
|
||||
|
||||
InstallScript.prototype.showMsg = function(opt) {
|
||||
@@ -616,9 +697,9 @@ InstallScript.prototype.callbackAjaxPerm = function(data) {
|
||||
'success': this.ajaxUrlPermRes
|
||||
}
|
||||
if (!this.ajaxUrlPermRes) {
|
||||
var errorMsg = this.getLang('Permission denied') + ' ( ' + this.ajaxUrlPermMsgs.join(', ') + ' ) .';
|
||||
var errorMsg = this.getLang('Permission denied', 'messages') + ' ( ' + this.ajaxUrlPermMsgs.join(', ') + ' ) .';
|
||||
if (this.ajaxUrlPermInstructions.length > 0) {
|
||||
errorMsg += '<br>' + this.getLang('permissionInstruction').replace('"{C}"', this.ajaxUrlPermInstructions.join('<br>'));
|
||||
errorMsg += '<br>' + this.getLang('permissionInstruction', 'messages').replace('"{C}"', this.ajaxUrlPermInstructions.join('<br>'));
|
||||
}
|
||||
ajaxData.errorMsg = errorMsg;
|
||||
}
|
||||
@@ -637,8 +718,8 @@ InstallScript.prototype.callbackModRewrite = function(data) {
|
||||
}
|
||||
ajaxData.success = false;
|
||||
if (typeof(this.langs) !== 'undefined') {
|
||||
ajaxData.errorMsg = (typeof(this.langs['modRewriteHelp'][this.serverType]) !== 'undefined')? this.langs['modRewriteHelp'][this.serverType] : this.langs['modRewriteHelp']['default'];
|
||||
ajaxData.errorMsg += (typeof(this.langs['modRewriteInstruction'][this.serverType]) !== 'undefined' && typeof(this.langs['modRewriteInstruction'][this.serverType][this.OS]) !== 'undefined') ? this.langs['modRewriteInstruction'][this.serverType][this.OS] : '';
|
||||
ajaxData.errorMsg = (typeof(this.langs['options']['modRewriteHelp'][this.serverType]) !== 'undefined')? this.langs['options']['modRewriteHelp'][this.serverType] : this.langs['options']['modRewriteHelp']['default'];
|
||||
ajaxData.errorMsg += (typeof(this.langs['options']['modRewriteInstruction'][this.serverType]) !== 'undefined' && typeof(this.langs['options']['modRewriteInstruction'][this.serverType][this.OS]) !== 'undefined') ? this.langs['options']['modRewriteInstruction'][this.serverType][this.OS] : '';
|
||||
}
|
||||
var realCheckIndex = this.checkIndex - 1;
|
||||
if (typeof(this.checkActions[realCheckIndex]) != 'undefined'
|
||||
|
||||
Reference in New Issue
Block a user