// better message for Theme edition + french translation
This commit is contained in:
@@ -122,7 +122,8 @@ class ShopCore extends ObjectModel
|
||||
parent::__construct($id, $id_lang, $id_shop);
|
||||
if ($this->id)
|
||||
{
|
||||
$sql = 'SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.name, t.directory
|
||||
$sql = 'SELECT su.physical_uri, su.virtual_uri,
|
||||
su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
|
||||
FROM '._DB_PREFIX_.'shop s
|
||||
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
||||
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
||||
@@ -133,6 +134,7 @@ class ShopCore extends ObjectModel
|
||||
if (!$row = Db::getInstance()->getRow($sql))
|
||||
return;
|
||||
|
||||
$this->theme_id = $row['id_theme'];
|
||||
$this->theme_name = $row['name'];
|
||||
$this->theme_directory = $row['directory'];
|
||||
$this->physical_uri = $row['physical_uri'];
|
||||
|
||||
@@ -158,7 +158,7 @@ class AdminThemesControllerCore extends AdminController
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Name:'),
|
||||
'label' => $this->l('Name of the theme:'),
|
||||
'name' => 'name',
|
||||
'size' => 48,
|
||||
'required' => true,
|
||||
@@ -175,19 +175,22 @@ class AdminThemesControllerCore extends AdminController
|
||||
{
|
||||
$this->fields_form['input'][] = array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Directory:'),
|
||||
'label' => $this->l('Name of the theme\'s directory:'),
|
||||
'name' => 'directory',
|
||||
'required' => true,
|
||||
'desc' => $this->l('Note: only the existence of the directory is checked. Please be sure to select a valid theme directory.'),
|
||||
'desc' => $this->l('If the directory does not exists, it will be created.'),
|
||||
);
|
||||
|
||||
$theme_query = Theme::getThemes();
|
||||
$this->fields_form['input'][] = array(
|
||||
'type' => 'select',
|
||||
'name' => 'based_on',
|
||||
'label' => $this->l('Based on'),
|
||||
'label' => $this->l('Copy missing files from existing theme:'),
|
||||
'desc' => $this->l('If you create a new theme, it\'s recommended to use default theme files for basic.'),
|
||||
'options' => array(
|
||||
'id' => 'id', 'name' => 'name',
|
||||
'default' => array('value' => 0, 'label' => ' - '),
|
||||
'query' => Theme::getThemes(),
|
||||
'id' => 'id', 'name' => 'name',
|
||||
'default' => array('value' => 0, 'label' => ' - '),
|
||||
'query' => $theme_query,
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -201,7 +204,7 @@ class AdminThemesControllerCore extends AdminController
|
||||
'class' => 't',
|
||||
'values' => $available_theme_dir,
|
||||
'selected' => $selected_theme_dir,
|
||||
'desc' => $this->l('Note: only the existence of the directory is checked. Please be sure to select a valid theme directory.'),
|
||||
'desc' => $this->l('Please select a valid theme directory.'),
|
||||
);
|
||||
|
||||
return parent::renderForm();
|
||||
|
||||
+511
-502
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user