// Fix Admin access
This commit is contained in:
@@ -32,7 +32,8 @@
|
|||||||
$('div.productTabs a').click(function() {
|
$('div.productTabs a').click(function() {
|
||||||
var id = $(this).attr('id');
|
var id = $(this).attr('id');
|
||||||
$('.nav-profile').removeClass('selected');
|
$('.nav-profile').removeClass('selected');
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected active');
|
||||||
|
$(this).siblings().removeClass('active');
|
||||||
$('.tab-profile').hide()
|
$('.tab-profile').hide()
|
||||||
$('.'+id).show();
|
$('.'+id).show();
|
||||||
});
|
});
|
||||||
@@ -175,11 +176,10 @@
|
|||||||
<div class="productTabs col-lg-2">
|
<div class="productTabs col-lg-2">
|
||||||
<div class="tab list-group">
|
<div class="tab list-group">
|
||||||
{foreach $profiles as $profile}
|
{foreach $profiles as $profile}
|
||||||
<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>
|
<a class="list-group-item nav-profile {if $profile.id_profile == $current_profile}active{/if}" id="profile-{$profile.id_profile}" href="{$current}&token={$token}&id_profile={$profile.id_profile}">{$profile.name}</a>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="{$table}_form" class="defaultForm form-horizontal col-lg-10" action="{$current}&{$submit_action}=1&token={$token}" method="post" enctype="multipart/form-data">
|
<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>
|
<fieldset>
|
||||||
{if $form_id}
|
{if $form_id}
|
||||||
@@ -195,8 +195,8 @@
|
|||||||
|
|
||||||
{foreach $profiles as $profile}
|
{foreach $profiles as $profile}
|
||||||
|
|
||||||
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile == $current_profile}block{else}none{/if}">
|
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile != $current_profile}none{/if}">
|
||||||
|
<h3>{$profile.name}</h3>
|
||||||
{if $profile.id_profile != $admin_profile}
|
{if $profile.id_profile != $admin_profile}
|
||||||
<table class="table" id="table_{$profile.id_profile}">
|
<table class="table" id="table_{$profile.id_profile}">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -418,4 +418,4 @@
|
|||||||
|
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
@@ -114,16 +114,11 @@ class AdminAccessControllerCore extends AdminController
|
|||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
$this->display = 'edit';
|
$this->display = 'edit';
|
||||||
// toolbar (save, cancel, new, ..)
|
|
||||||
$this->initToolbar();
|
|
||||||
unset($this->toolbar_btn['save']);
|
|
||||||
unset($this->toolbar_btn['cancel']);
|
|
||||||
|
|
||||||
if (!$this->loadObject(true))
|
if (!$this->loadObject(true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$this->content .= $this->renderForm();
|
$this->content .= $this->renderForm();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'content' => $this->content,
|
||||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||||
|
|||||||
Reference in New Issue
Block a user