[*] BO : Rights verification for multi-shop

This commit is contained in:
lLefevre
2011-10-10 16:10:57 +00:00
parent a9cb3ef295
commit 63f696082d
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">';