Hi to all, Simply question: i created 3 layout of information in Accounts. General, more information, commercials. There is a way to hide the commercials layout if the status of the Account is Inactive?
Thanks to all
Hi to all, Simply question: i created 3 layout of information in Accounts. General, more information, commercials. There is a way to hide the commercials layout if the status of the Account is Inactive?
Thanks to all
yess you can hide layout goto/custom/module/modulename/views/view.edit.php and use javascript hide display method
thanks for the suggest, there is a way to make some field “readonly” if i’m a commercial or some other role?
Thanks
i can’t find in E:\Siti\CRM\custom\modules\Accounts the folder views, is normal?
Actually i’ve created a file and i call it in detailviewdefs.php:
array (
0 =>
array (
'file' => 'modules/Accounts/Account.js',
),
1 =>
array (
'file' => 'modules/Accounts/Hide_panels.php',
),
the call works fine and my code is:
<?php
/**
* Created by PhpStorm.
* User: Francesco
* Date: 17/01/2018
* Time: 15:22
*/
require_once __DIR__.'/../ACLRoles/ACLRole.php';
$objACLRole = new ACLRole();
$roles = $objACLRole->getUserRoles($GLOBALS['current_user']->id);
if($roles[0]=="Commerciale"){ ?>
<script type='text/javascript'>
$(function() {
// self executing function here
// your page initialization code here
// the DOM will be available here
document.getElementById('tab3').style.display = 'none';
console.log("qui");
});
</script>
<?php
}
But actually nothing happend. i mean, if by console i call:
document.getElementById(‘tab3’)
it give me
So for the console he is in style display:nonebut if i analize the element no style are in, and it show. what i’m missing?
thanks
you follows this
you can create views folder like views/view.edit.php