// update advanced parameters and administration tabs
This commit is contained in:
@@ -172,246 +172,250 @@
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
<div class="productTabs">
|
||||
<ul class="tab">
|
||||
<div class="productTabs col-lg-2">
|
||||
<div class="tab list-group">
|
||||
{foreach $profiles as $profile}
|
||||
<li class="tab-row">
|
||||
<a class="nav-profile {if $profile.id_profile == $current_profile}selected{/if}" id="profile-{$profile.id_profile}" href="{$current}&token={$token}&id_profile={$profile.id_profile}">{$profile.name}</a>
|
||||
</li>
|
||||
<a class="list-group-item nav-profile {if $profile.id_profile == $current_profile}selected{/if}" id="profile-{$profile.id_profile}" href="{$current}&token={$token}&id_profile={$profile.id_profile}">{$profile.name}</a>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="{$table}_form" class="defaultForm" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
||||
{if $form_id}
|
||||
<input type="hidden" name="{$identifier}" id="{$identifier}" value="{$form_id}" />
|
||||
{/if}
|
||||
|
||||
{assign var=tabsize value=count($tabs)}
|
||||
{foreach $tabs AS $tab}
|
||||
{if $tab.id_tab > $tabsize}
|
||||
{assign var=tabsize value=$tab.id_tab}
|
||||
<form id="{$table}_form" class="defaultForm form-horizontal col-lg-10" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
{if $form_id}
|
||||
<input type="hidden" name="{$identifier}" id="{$identifier}" value="{$form_id}" />
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{foreach $profiles as $profile}
|
||||
|
||||
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile == $current_profile}block{else}none{/if}">
|
||||
|
||||
{if $profile.id_profile != $admin_profile}
|
||||
<table class="table float" cellspacing="0" style="margin-right:50px" id="table_{$profile.id_profile}">
|
||||
<tr>
|
||||
<th class="center">
|
||||
{l s='Menus'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="viewall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||view||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='View'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="addall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||add||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Add'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="editall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||edit||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Edit'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="deleteall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||delete||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Delete'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox" name="1" id="allall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='All'}
|
||||
</th>
|
||||
</tr>
|
||||
{if !count($tabs)}
|
||||
<tr>
|
||||
<td colspan="6">{l s='No menu'}</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $tabs AS $tab}
|
||||
|
||||
{assign var=access value=$accesses[$profile.id_profile]}
|
||||
|
||||
{if !$tab.id_parent OR $tab.id_parent == -1}
|
||||
{assign var=is_child value=false}
|
||||
{assign var=result_accesses value=0}
|
||||
<tr{if !$is_child} class="parent"{/if}>
|
||||
<td{if !$is_child} class="bold"{/if}>{if $is_child} » {/if}<strong>{$tab.name}</strong></td>
|
||||
{foreach $perms as $perm}
|
||||
{if $access_edit == 1}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id="{$perm}{$access[$tab.id_tab]['id_tab']}"
|
||||
rel="{$access[$tab.id_tab]['id_tab']}||{$profile.id_profile}||{$perm}||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower {$perm} {$access[$tab.id_tab]['id_tab']}"
|
||||
{if $access[$tab.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
disabled="disabled"
|
||||
{if $access[$tab.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{assign var=result_accesses value=$result_accesses + $access[$tab.id_tab][$perm]}
|
||||
{/foreach}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id='all{$access[$tab.id_tab]['id_tab']}'
|
||||
{if $access_edit == 1}
|
||||
rel="{$access[$tab.id_tab]['id_tab']}||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower all {$access[$tab.id_tab]['id_tab']}"
|
||||
{else}
|
||||
class="all {$access[$tab.id_tab]['id_tab']}"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
{if $result_accesses == 4}checked="checked"{/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{foreach $tabs AS $child}
|
||||
{if $child.id_parent === $tab.id_tab}
|
||||
{if isset($access[$child.id_tab])}
|
||||
{assign var=is_child value=true}
|
||||
{assign var=result_accesses value=0}
|
||||
<tr class="child-{$child.id_parent}">
|
||||
<td{if !$is_child} class="bold"{/if}>{if $is_child} » {/if}{$child.name}</td>
|
||||
{foreach $perms as $perm}
|
||||
{if $access_edit == 1}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id="{$perm}{$access[$child.id_tab]['id_tab']}"
|
||||
rel="{$access[$child.id_tab]['id_tab']}||{$profile.id_profile}||{$perm}||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower {$perm} {$access[$child.id_tab]['id_tab']}"
|
||||
{if $access[$child.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
disabled="disabled"
|
||||
{if $access[$child.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{assign var=result_accesses value=$result_accesses + $access[$child.id_tab][$perm]}
|
||||
{/foreach}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id='all{$access[$child.id_tab]['id_tab']}'
|
||||
{if $access_edit == 1}
|
||||
rel="{$access[$child.id_tab]['id_tab']}||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower all {$access[$child.id_tab]['id_tab']}"
|
||||
{else}
|
||||
class="all {$access[$child.id_tab]['id_tab']}"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
{if $result_accesses == 4}checked="checked"{/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<table class="table" cellspacing="0" style="margin-left:20px" id="table_module_{$profile.id_profile}">
|
||||
<tr>
|
||||
<th>{l s='Modules'}</th>
|
||||
<th class="center">
|
||||
<input type="checkbox"
|
||||
id="ajax-ma-view-master"
|
||||
{if $access_edit == 1}
|
||||
class="changeModuleAccess" rel="-1||view||{$profile.id_profile}"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} /> {l s='View'}
|
||||
</th>
|
||||
<th class="center">
|
||||
<input type="checkbox"
|
||||
id="ajax-ma-configure-master"
|
||||
{if $access_edit == 1}
|
||||
class="changeModuleAccess" rel="-1||configure||{$profile.id_profile}"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} /> {l s='Configure'}</th>
|
||||
</tr>
|
||||
|
||||
{if !count($modules)}
|
||||
<tr>
|
||||
<td colspan="3">{l s='No modules are installed'}</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $modules[$profile.id_profile] AS $module}
|
||||
<tr>
|
||||
<td>» {$module.name}</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
value="1"
|
||||
{if $module.view == true}checked="checked"{/if}
|
||||
{if $access_edit == 1}
|
||||
class="ajax-ma-view changeModuleAccess"
|
||||
rel="{$module.id_module}||view||{$profile.id_profile}"
|
||||
{else}
|
||||
class="ajax-ma-view"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
value="1"
|
||||
{if $module.configure == true}checked="checked"{/if}
|
||||
{if $access_edit == 1}
|
||||
class="ajax-ma-configure changeModuleAccess"
|
||||
rel="{$module.id_module}||configure||{$profile.id_profile}"
|
||||
{else}
|
||||
class="ajax-ma-configure"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
{else}
|
||||
{l s='Administrator permissions cannot be modified.'}
|
||||
{assign var=tabsize value=count($tabs)}
|
||||
{foreach $tabs AS $tab}
|
||||
{if $tab.id_tab > $tabsize}
|
||||
{assign var=tabsize value=$tab.id_tab}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
{foreach $profiles as $profile}
|
||||
|
||||
{/foreach}
|
||||
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile == $current_profile}block{else}none{/if}">
|
||||
|
||||
{if $profile.id_profile != $admin_profile}
|
||||
<table class="table" id="table_{$profile.id_profile}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{l s='Menus'}
|
||||
</th>
|
||||
<th>
|
||||
<input type="checkbox" name="1" id="viewall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||view||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='View'}
|
||||
</th>
|
||||
<th>
|
||||
<input type="checkbox" name="1" id="addall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||add||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Add'}
|
||||
</th>
|
||||
<th>
|
||||
<input type="checkbox" name="1" id="editall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||edit||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Edit'}
|
||||
</th>
|
||||
<th>
|
||||
<input type="checkbox" name="1" id="deleteall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||delete||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='Delete'}
|
||||
</th>
|
||||
<th>
|
||||
<input type="checkbox" name="1" id="allall"
|
||||
{if $access_edit == 1}
|
||||
rel="-1||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}" class="ajaxPower"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} />
|
||||
{l s='All'}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if !count($tabs)}
|
||||
<tr>
|
||||
<td colspan="6">{l s='No menu'}</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $tabs AS $tab}
|
||||
|
||||
{assign var=access value=$accesses[$profile.id_profile]}
|
||||
|
||||
{if !$tab.id_parent OR $tab.id_parent == -1}
|
||||
{assign var=is_child value=false}
|
||||
{assign var=result_accesses value=0}
|
||||
<tr{if !$is_child} class="parent"{/if}>
|
||||
<td{if !$is_child} class="bold"{/if}>{if $is_child} » {/if}<strong>{$tab.name}</strong></td>
|
||||
{foreach $perms as $perm}
|
||||
{if $access_edit == 1}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id="{$perm}{$access[$tab.id_tab]['id_tab']}"
|
||||
rel="{$access[$tab.id_tab]['id_tab']}||{$profile.id_profile}||{$perm}||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower {$perm} {$access[$tab.id_tab]['id_tab']}"
|
||||
{if $access[$tab.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
disabled="disabled"
|
||||
{if $access[$tab.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{assign var=result_accesses value=$result_accesses + $access[$tab.id_tab][$perm]}
|
||||
{/foreach}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id='all{$access[$tab.id_tab]['id_tab']}'
|
||||
{if $access_edit == 1}
|
||||
rel="{$access[$tab.id_tab]['id_tab']}||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower all {$access[$tab.id_tab]['id_tab']}"
|
||||
{else}
|
||||
class="all {$access[$tab.id_tab]['id_tab']}"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
{if $result_accesses == 4}checked="checked"{/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{foreach $tabs AS $child}
|
||||
{if $child.id_parent === $tab.id_tab}
|
||||
{if isset($access[$child.id_tab])}
|
||||
{assign var=is_child value=true}
|
||||
{assign var=result_accesses value=0}
|
||||
<tr class="child-{$child.id_parent}">
|
||||
<td{if !$is_child} class="bold"{/if}>{if $is_child} » {/if}{$child.name}</td>
|
||||
{foreach $perms as $perm}
|
||||
{if $access_edit == 1}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id="{$perm}{$access[$child.id_tab]['id_tab']}"
|
||||
rel="{$access[$child.id_tab]['id_tab']}||{$profile.id_profile}||{$perm}||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower {$perm} {$access[$child.id_tab]['id_tab']}"
|
||||
{if $access[$child.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{else}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
disabled="disabled"
|
||||
{if $access[$child.id_tab][$perm] == 1}checked="checked"{/if}/>
|
||||
</td>
|
||||
{/if}
|
||||
{assign var=result_accesses value=$result_accesses + $access[$child.id_tab][$perm]}
|
||||
{/foreach}
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
id='all{$access[$child.id_tab]['id_tab']}'
|
||||
{if $access_edit == 1}
|
||||
rel="{$access[$child.id_tab]['id_tab']}||{$profile.id_profile}||all||{$tabsize}||{count($tabs)}"
|
||||
class="ajaxPower all {$access[$child.id_tab]['id_tab']}"
|
||||
{else}
|
||||
class="all {$access[$child.id_tab]['id_tab']}"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
{if $result_accesses == 4}checked="checked"{/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table" id="table_module_{$profile.id_profile}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Modules'}</th>
|
||||
<th>
|
||||
<input type="checkbox"
|
||||
id="ajax-ma-view-master"
|
||||
{if $access_edit == 1}
|
||||
class="changeModuleAccess" rel="-1||view||{$profile.id_profile}"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} /> {l s='View'}
|
||||
</th>
|
||||
<th>
|
||||
<input type="checkbox"
|
||||
id="ajax-ma-configure-master"
|
||||
{if $access_edit == 1}
|
||||
class="changeModuleAccess" rel="-1||configure||{$profile.id_profile}"
|
||||
{else}
|
||||
disabled="disabled"
|
||||
{/if} /> {l s='Configure'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if !count($modules)}
|
||||
<tr>
|
||||
<td colspan="3">{l s='No modules are installed'}</td>
|
||||
</tr>
|
||||
{else}
|
||||
{foreach $modules[$profile.id_profile] AS $module}
|
||||
<tr>
|
||||
<td>» {$module.name}</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
value="1"
|
||||
{if $module.view == true}checked="checked"{/if}
|
||||
{if $access_edit == 1}
|
||||
class="ajax-ma-view changeModuleAccess"
|
||||
rel="{$module.id_module}||view||{$profile.id_profile}"
|
||||
{else}
|
||||
class="ajax-ma-view"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox"
|
||||
value="1"
|
||||
{if $module.configure == true}checked="checked"{/if}
|
||||
{if $access_edit == 1}
|
||||
class="ajax-ma-configure changeModuleAccess"
|
||||
rel="{$module.id_module}||configure||{$profile.id_profile}"
|
||||
{else}
|
||||
class="ajax-ma-configure"
|
||||
disabled="disabled"
|
||||
{/if}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{else}
|
||||
{l s='Administrator permissions cannot be modified.'}
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
{/foreach}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
@@ -31,6 +31,7 @@ class AdminAccessControllerCore extends AdminController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'access';
|
||||
$this->className = 'Profile';
|
||||
$this->multishop_context = Shop::CONTEXT_ALL;
|
||||
|
||||
@@ -29,6 +29,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->className = 'Configuration';
|
||||
$this->table = 'configuration';
|
||||
|
||||
@@ -47,7 +48,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'fields' => array(
|
||||
'PRESTASTORE_LIVE' => array(
|
||||
'title' => $this->l('Automatically check for module updates'),
|
||||
'desc' => $this->l('New modules and updates are displayed on the modules page.'),
|
||||
'hint' => $this->l('New modules and updates are displayed on the modules page.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
@@ -55,7 +56,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_COOKIE_CHECKIP' => array(
|
||||
'title' => $this->l('Check the IP address on the cookie'),
|
||||
'desc' => $this->l('Check the IP address of the cookie in order to prevent your cookie from being stolen.'),
|
||||
'hint' => $this->l('Check the IP address of the cookie in order to prevent your cookie from being stolen.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
@@ -64,7 +65,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_COOKIE_LIFETIME_FO' => array(
|
||||
'title' => $this->l('Lifetime of Front Office cookies'),
|
||||
'desc' => $this->l('Indicate the number of hours'),
|
||||
'hint' => $this->l('Indicate the number of hours'),
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
@@ -73,7 +74,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_COOKIE_LIFETIME_BO' => array(
|
||||
'title' => $this->l('Lifetime of Back Office cookies'),
|
||||
'desc' => $this->l('Indicate the number of hours'),
|
||||
'hint' => $this->l('Indicate the number of hours'),
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
@@ -89,8 +90,11 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'fields' => array(
|
||||
'PS_ATTACHMENT_MAXIMUM_SIZE' => array(
|
||||
'title' => $this->l('Maximum size for attachment'),
|
||||
'desc' => $this->l('Set the maximum size allowed for attachment files (in MegaBytes).').' '.$this->l('Maximum:').' '.
|
||||
'hint' => $this->l('Set the maximum size allowed for attachment files (in MegaBytes).'),
|
||||
/***** TO DO - ajouter cette ligne dans le hint ?
|
||||
.' '.$this->l('Maximum:').' '.
|
||||
((int)str_replace('M', '', ini_get('post_max_size')) > (int)str_replace('M', '', ini_get('upload_max_filesize')) ? ini_get('upload_max_filesize') : ini_get('post_max_size')),
|
||||
*****/
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
@@ -99,7 +103,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_LIMIT_UPLOAD_FILE_VALUE' => array(
|
||||
'title' => $this->l('File value upload limit'),
|
||||
'desc' => $this->l('Define the limit upload for a downloadable product. This value has to be less than or equal to the maximum file upload allotted by your server. ').sprintf('(%s MB).', $upload_mb),
|
||||
'hint' => $this->l('Define the limit upload for a downloadable product. This value has to be less than or equal to the maximum file upload allotted by your server. ').sprintf('(%s MB).', $upload_mb),
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
@@ -108,7 +112,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_LIMIT_UPLOAD_IMAGE_VALUE' => array(
|
||||
'title' => $this->l('Image value upload limit'),
|
||||
'desc' => $this->l('Define the limit upload for an image. This value has to be less than or equal to the maximum file upload allotted by your server. ').sprintf('(%s MB).', $upload_mb),
|
||||
'hint' => $this->l('Define the limit upload for an image. This value has to be less than or equal to the maximum file upload allotted by your server. ').sprintf('(%s MB).', $upload_mb),
|
||||
'validation' => 'isInt',
|
||||
'cast' => 'intval',
|
||||
'type' => 'text',
|
||||
@@ -123,7 +127,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'fields' => array(
|
||||
'PS_HELPBOX' => array(
|
||||
'title' => $this->l('Back Office help boxes'),
|
||||
'desc' => $this->l('Allow yellow help boxes to be displayed under the form fields in the Back Office.'),
|
||||
'hint' => $this->l('Allow yellow help boxes to be displayed under the form fields in the Back Office.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
@@ -131,7 +135,7 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
),
|
||||
'PS_HIDE_OPTIMIZATION_TIPS' => array(
|
||||
'title' => $this->l('Hide optimization tips'),
|
||||
'desc' => $this->l('Hide optimization tips on the Back Office homepage'),
|
||||
'hint' => $this->l('Hide optimization tips on the Back Office homepage'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
@@ -144,21 +148,21 @@ class AdminAdminPreferencesControllerCore extends AdminController
|
||||
'fields' => array(
|
||||
'PS_SHOW_NEW_ORDERS' => array(
|
||||
'title' => $this->l('Show notifications for new orders'),
|
||||
'desc' => $this->l('This will display notifications when new orders are made in your shop.'),
|
||||
'hint' => $this->l('This will display notifications when new orders are made in your shop.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_SHOW_NEW_CUSTOMERS' => array(
|
||||
'title' => $this->l('Show notifications for new customers'),
|
||||
'desc' => $this->l('This will display notifications every time a new customer registers in your shop.'),
|
||||
'hint' => $this->l('This will display notifications every time a new customer registers in your shop.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_SHOW_NEW_MESSAGES' => array(
|
||||
'title' => $this->l('Show notifications for new messages'),
|
||||
'desc' => $this->l('This will display notifications when new messages are posted in your shop.'),
|
||||
'hint' => $this->l('This will display notifications when new messages are posted in your shop.'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
|
||||
@@ -39,6 +39,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'employee';
|
||||
$this->className = 'Employee';
|
||||
$this->lang = false;
|
||||
@@ -85,16 +86,15 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'fields' => array(
|
||||
'PS_PASSWD_TIME_BACK' => array(
|
||||
'title' => $this->l('Password regeneration'),
|
||||
'desc' => $this->l('Security: Minimum time to wait between two password changes.'),
|
||||
'hint' => $this->l('Security: Minimum time to wait between two password changes.'),
|
||||
'cast' => 'intval',
|
||||
'size' => 5,
|
||||
'type' => 'text',
|
||||
'suffix' => ' '.$this->l('minutes'),
|
||||
'visibility' => Shop::CONTEXT_ALL
|
||||
),
|
||||
'PS_BO_ALLOW_EMPLOYEE_FORM_LANG' => array(
|
||||
'title' => $this->l('Memorize the language used in Admin panel forms'),
|
||||
'desc' => $this->l('Allow employees to select a specific language for the Admin panel form.'),
|
||||
'hint' => $this->l('Allow employees to select a specific language for the Admin panel form.'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'select',
|
||||
'identifier' => 'value',
|
||||
@@ -165,21 +165,19 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Employees'),
|
||||
'image' => '../img/admin/nav-user.gif'
|
||||
'icon' => 'icon-user'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('First Name:'),
|
||||
'name' => 'firstname',
|
||||
'size' => 33,
|
||||
'required' => true
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Last Name:'),
|
||||
'name' => 'lastname',
|
||||
'size' => 33,
|
||||
'required' => true
|
||||
),
|
||||
array(
|
||||
@@ -187,8 +185,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'label' => $this->l('Password:'),
|
||||
'name' => 'passwd',
|
||||
'required' => true,
|
||||
'size' => 33,
|
||||
'desc' => ($obj->id ?
|
||||
'hint' => ($obj->id ?
|
||||
$this->l('Leave this field blank if you do not want to change your password.') :
|
||||
$this->l('Minimum of eight characters (use only letters and numbers)').' -_')
|
||||
),
|
||||
@@ -196,7 +193,6 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Email address:'),
|
||||
'name' => 'email',
|
||||
'size' => 33,
|
||||
'required' => true
|
||||
),
|
||||
array(
|
||||
@@ -204,22 +200,20 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'label' => $this->l('Admin panel color:'),
|
||||
'name' => 'bo_color',
|
||||
'class' => 'color mColorPickerInput',
|
||||
'size' => 20,
|
||||
'desc' => $this->l('Admin panel background will be displayed in this color (HTML colors only).').' "lightblue", "#CC6600")'
|
||||
'hint' => $this->l('Admin panel background will be displayed in this color (HTML colors only).').' "lightblue", "#CC6600")'
|
||||
),
|
||||
array(
|
||||
'type' => 'default_tab',
|
||||
'label' => $this->l('Default page:'),
|
||||
'name' => 'default_tab',
|
||||
'desc' => $this->l('This page will be displayed just after login'),
|
||||
'hint' => $this->l('This page will be displayed just after login'),
|
||||
'options' => $this->tabs_list
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Back Office width'),
|
||||
'name' => 'bo_width',
|
||||
'size' => 10,
|
||||
'desc' => $this->l('Back Office width, in pixels. The value "0" means that the Back Office width will be flexible.')
|
||||
'hint' => $this->l('Back Office width, in pixels. The value "0" means that the Back Office width will be flexible.')
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
@@ -237,15 +231,14 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'label' => $this->l('Theme:'),
|
||||
'name' => 'bo_theme',
|
||||
'options' => array('query' => $this->themes),
|
||||
'desc' => $this->l('Back Office theme')
|
||||
'hint' => $this->l('Back Office theme')
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Show screencast at login:'),
|
||||
'name' => 'bo_show_screencast',
|
||||
'desc' => $this->l('Display the welcome video in the Admin panel dashboard at log in.'),
|
||||
'hint' => $this->l('Display the welcome video in the Admin panel dashboard at log in.'),
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'is_bool' => true,
|
||||
'values' => array(
|
||||
array(
|
||||
@@ -266,11 +259,10 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
if ((int)$this->tabAccess['edit'] && !$this->restrict_edition)
|
||||
{
|
||||
$this->fields_form['input'][] = array(
|
||||
'type' => 'radio',
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Status:'),
|
||||
'name' => 'active',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'is_bool' => true,
|
||||
'values' => array(
|
||||
array(
|
||||
@@ -284,7 +276,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('Allow or disallow this employee to log into the Admin panel.')
|
||||
'hint' => $this->l('Allow or disallow this employee to log into the Admin panel.')
|
||||
);
|
||||
|
||||
// if employee is not SuperAdmin (id_profile = 1), don't make it possible to select the admin profile
|
||||
@@ -317,7 +309,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
$this->fields_form['input'][] = array(
|
||||
'type' => 'shop',
|
||||
'label' => $this->l('Shop association:'),
|
||||
'desc' => $this->l('Select the shops the employee is allowed to access'),
|
||||
'hint' => $this->l('Select the shops the employee is allowed to access'),
|
||||
'name' => 'checkBoxShopAsso',
|
||||
);
|
||||
}
|
||||
@@ -325,7 +317,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
|
||||
$this->fields_form['submit'] = array(
|
||||
'title' => $this->l('Save '),
|
||||
'class' => 'button'
|
||||
'class' => 'btn btn-default'
|
||||
);
|
||||
|
||||
$this->fields_value['passwd'] = false;
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminProfilesControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->table = 'profile';
|
||||
$this->className = 'Profile';
|
||||
@@ -45,8 +46,7 @@ class AdminProfilesControllerCore extends AdminController
|
||||
$this->fields_list = array(
|
||||
'id_profile' => array(
|
||||
'title' => $this->l('ID'),
|
||||
'align' => 'center',
|
||||
'width' => 25
|
||||
'align' => 'center'
|
||||
),
|
||||
'name' => array('title' => $this->l('Name'))
|
||||
);
|
||||
@@ -56,21 +56,20 @@ class AdminProfilesControllerCore extends AdminController
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Profile'),
|
||||
'image' => '../img/admin/profiles.png'
|
||||
'icon' => 'icon-group'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Name:'),
|
||||
'name' => 'name',
|
||||
'size' => 33,
|
||||
'required' => true,
|
||||
'lang' => true,
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save '),
|
||||
'class' => 'button'
|
||||
'class' => 'btn btn-default'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminQuickAccessesControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'quick_access';
|
||||
$this->className = 'QuickAccess';
|
||||
$this->lang = true;
|
||||
@@ -45,20 +46,16 @@ class AdminQuickAccessesControllerCore extends AdminController
|
||||
$this->fields_list = array(
|
||||
'id_quick_access' => array(
|
||||
'title' => $this->l('ID'),
|
||||
'align' => 'center',
|
||||
'width' => 25
|
||||
'align' => 'center'
|
||||
),
|
||||
'name' => array(
|
||||
'title' => $this->l('Name'),
|
||||
'width' => 200
|
||||
'title' => $this->l('Name')
|
||||
),
|
||||
'link' => array(
|
||||
'title' => $this->l('Link'),
|
||||
'width' => 300
|
||||
'title' => $this->l('Link')
|
||||
),
|
||||
'new_window' => array(
|
||||
'title' => $this->l('New window'),
|
||||
'width' => 70,
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'activeVisu' => 'new_window'
|
||||
@@ -68,7 +65,7 @@ class AdminQuickAccessesControllerCore extends AdminController
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Quick Access menu'),
|
||||
'image' => '../img/admin/quick.gif'
|
||||
'icon' => 'icon-align-justify'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
@@ -76,26 +73,23 @@ class AdminQuickAccessesControllerCore extends AdminController
|
||||
'label' => $this->l('Name:'),
|
||||
'name' => 'name',
|
||||
'lang' => true,
|
||||
'size' => 33,
|
||||
'maxlength' => 32,
|
||||
'required' => true,
|
||||
'hint' => $this->l('Forbidden characters:').' <>;=#{}'
|
||||
'hint' => $this->l('Forbidden characters:').' <>;=#{}'
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $this->l('URL:'),
|
||||
'name' => 'link',
|
||||
'size' => 60,
|
||||
'maxlength' => 128,
|
||||
'required' => true,
|
||||
'desc' => $this->l('If it\'s a URL that comes from your Back Office, you must NOT use a security token.')
|
||||
'hint' => $this->l('If it\'s a URL that comes from your Back Office, you must NOT use a security token.')
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Open in new window:'),
|
||||
'name' => 'new_window',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'new_window_on',
|
||||
|
||||
@@ -30,6 +30,7 @@ class AdminTabsControllerCore extends AdminController
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->multishop_context = Shop::CONTEXT_ALL;
|
||||
$this->table = 'tab';
|
||||
@@ -45,12 +46,10 @@ class AdminTabsControllerCore extends AdminController
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_tab' => array(
|
||||
'title' => $this->l('ID'),
|
||||
'width' => 25
|
||||
'title' => $this->l('ID')
|
||||
),
|
||||
'name' => array(
|
||||
'title' => $this->l('Name'),
|
||||
'width' => 200
|
||||
'title' => $this->l('Name')
|
||||
),
|
||||
'logo' => array(
|
||||
'title' => $this->l('Icon'),
|
||||
@@ -64,7 +63,6 @@ class AdminTabsControllerCore extends AdminController
|
||||
),
|
||||
'active' => array(
|
||||
'title' => $this->l('Enabled'),
|
||||
'width' => 70,
|
||||
'align' => 'center',
|
||||
'active' => 'status',
|
||||
'type' => 'bool',
|
||||
@@ -72,7 +70,6 @@ class AdminTabsControllerCore extends AdminController
|
||||
),
|
||||
'position' => array(
|
||||
'title' => $this->l('Position'),
|
||||
'width' => 40,
|
||||
'filter_key' => 'a!position',
|
||||
'position' => 'position'
|
||||
)
|
||||
@@ -104,7 +101,7 @@ class AdminTabsControllerCore extends AdminController
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Menus'),
|
||||
'image' => '../img/admin/tab.gif'
|
||||
'icon' => 'icon-list-ul'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
@@ -117,9 +114,8 @@ class AdminTabsControllerCore extends AdminController
|
||||
'label' => $this->l('Name:'),
|
||||
'name' => 'name',
|
||||
'lang' => true,
|
||||
'size' => 33,
|
||||
'required' => true,
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}'
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}'
|
||||
),
|
||||
array(
|
||||
'type' => 'text',
|
||||
@@ -136,14 +132,13 @@ class AdminTabsControllerCore extends AdminController
|
||||
'type' => 'file',
|
||||
'label' => $this->l('Icon:'),
|
||||
'name' => 'icon',
|
||||
'desc' => $this->l('Upload a logo from your computer (.gif, .jpg, .jpeg or .png).')
|
||||
'hint' => $this->l('Upload a logo from your computer (.gif, .jpg, .jpeg or .png).')
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'type' => 'switch',
|
||||
'label' => $this->l('Status:'),
|
||||
'name' => 'active',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'is_bool' => true,
|
||||
'values' => array(
|
||||
array(
|
||||
@@ -157,12 +152,12 @@ class AdminTabsControllerCore extends AdminController
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('Show or hide menu.')
|
||||
'hint' => $this->l('Show or hide menu.')
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l(' Save '),
|
||||
'class' => 'button'
|
||||
'class' => 'btn btn-default'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user