[*] BO : Rights verification for multi-shop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9198 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2011-10-10 16:10:57 +00:00
parent 5fe22693dd
commit a8a11c0ece
8 changed files with 155 additions and 51 deletions
+15 -8
View File
@@ -182,16 +182,23 @@ class AdminEmployees extends AdminTab
<script type="text/javascript">
$(document).ready(function(){
$(\'select[name=id_profile]\').change(function(){
var val = $(this).val();
if(val == '._PS_ADMIN_PROFILE_.')
{
$(\'.assoShop input[type=checkbox]\').attr(\'disabled\', \'disabled\');
$(\'.assoShop input[type=checkbox]\').attr(\'checked\', \'checked\');
}
else
$(\'.assoShop input[type=checkbox]\').attr(\'disabled\', \'\');
ifSuperAdmin($(this));
});
ifSuperAdmin($(\'select[name=id_profile]\'));
});
function ifSuperAdmin(el)
{
var val = $(el).val();
if(val == '._PS_ADMIN_PROFILE_.')
{
$(\'.assoShop input[type=checkbox]\').attr(\'disabled\', \'disabled\');
$(\'.assoShop input[type=checkbox]\').attr(\'checked\', \'checked\');
}
else
$(\'.assoShop input[type=checkbox]\').attr(\'disabled\', \'\');
}
</script>
';
echo '<label>'.$this->l('Shop association:').'</label><div class="margin-form">';