Hello Evrybody,
How can i hide the Mass Update-Segment in the Module Meetings (ListView).??? I currently use Sugar Version 5...
Thanks for your answers!!
William From Germany :-)
Hello Evrybody,
How can i hide the Mass Update-Segment in the Module Meetings (ListView).??? I currently use Sugar Version 5...
Thanks for your answers!!
William From Germany :-)
HI kuske,
Thank for ur answer, am gonna try it...
best regards
Very simple to do:
In module /include/MassUpdate.php in function getMassUpdateForm add a return statement at the beginning of the function:
Gruß von ebendort !Code:function getMassUpdateForm(){ global $app_strings; global $current_user; //KUS PATCH return 'Mass Update not allowed in this company!'; //KUS PATCH if($this->sugarbean->bean_implements('ACL') && !ACLController::checkAccess($this->sugarbean->module_dir, 'edit', true)){ return ''; }
HI kuske,
do u know how can i hide the add Envitee-Segment of the module Meetings (EditView), Only the Add Envitees-Segment, the Segment Scheduling have to be displayed....
It's gonna be better to do it inside a php-File... I've already look inside the JS-File modules/Meetings/jsclass_scheduler.js... But i can get what i want....
Mit freundlichen Grüßen
William aus München
The "Add Invitees" form is generated in
modules/Meetings/jsclass_scheduler.js
(the original file is located in jssource/src/files/modules/meetings/jsclass_scheduler.js)
You can comment the line where the output div is written:
There is no php-PATCH as I know.Code:SugarWidgetSchedulerSearch.prototype.display = function() { var html ='<br/><h5 class="listViewSubHeadS1">'+GLOBAL_REGISTRY['meeting_strings']['LBL_ADD_INVITEE']+'</h5><table border="0" cellpadding="0" cellspacing="0" width="100%" class="tabForm">'; html +='<tr><td>'; html += '<form name="schedulerwidget" id="'+this.form_id+'" onsubmit="SugarWidgetSchedulerSearch.submit(this);return false;">'; html += '<table width="100%" cellpadding="0" cellspacing="0" width="100%" >' html += '<tr>'; //html += '<form id="'+this.form_id+'"><table width="100%"><tbody><tr>'; html += '<td class="dataLabel" nowrap><b>'+GLOBAL_REGISTRY['meeting_strings']['LBL_FIRST_NAME']+':</b> <input class="dataField" name="search_first_name" value="" type="text" size="10"></td>'; html += '<td class="dataLabel" nowrap><b>'+GLOBAL_REGISTRY['meeting_strings']['LBL_LAST_NAME']+':</b> <input class="dataField" name="search_last_name" value="" type="text" size="10"></td>'; html += '<td class="dataLabel" nowrap><b>'+GLOBAL_REGISTRY['meeting_strings']['LBL_EMAIL']+':</b> <input class="dataField" name="search_email" type="text" value="" size="15"></td>'; //html += '<td valign="center"><input type="submit" onclick="SugarWidgetSchedulerSearch.submit(this.form);" value="Search" ></td></tr></tbody></table></form>'; html += '<td valign="center"><input type="submit" class="button" value="'+GLOBAL_REGISTRY['meeting_strings']['LBL_SEARCH_BUTTON']+'" ></td></tr>'; html += '</table>'; html += '</form>'; html += '</td></tr></table>'; // append the list_view as the third row of the outside table //KUS PATCH // this.parentNode.innerHTML= html; //KUS PATCH
Greetings from Darmstadt
Hi Kuske,
Thank u for ur answer, it's work... i wanted to do it inside a php-File because, i just wanna hide this Segement for the users without admin rights...
I dont know if it's possible from the JS-File if a user an admin is or not... For example with PHP
DankePHP Code:global $current_user;
if ($current_user->is_admin) {
// do something
}
William
OK, to get information about the current user in JavaScript you can use the GLOBAL_REGISTRY var.
Just change your code like this:
You do not have direct access to the property "isAdmin" but you can list all allowed admin accounts, as I indicated by the three admin user names "admin", "admin2" and "admin3".Code:SugarWidgetSchedulerSearch.prototype.display = function() { var html ='<br/><h5 class="listViewSubHeadS1">'+GLOBAL_REGISTRY['meeting_strings']['LBL_ADD_INVITEE']+'</h5><table border="0" cellpadding="0" cellspacing="0" width="100%" class="tabForm">'; html +='<tr><td>'; html += '<form name="schedulerwidget" id="'+this.form_id+'" onsubmit="SugarWidgetSchedulerSearch.submit(this);return false;">'; html += '<table width="100%" cellpadding="0" cellspacing="0" width="100%" >' html += '<tr>'; //html += '<form id="'+this.form_id+'"><table width="100%"><tbody><tr>'; html += '<td class="dataLabel" nowrap><b>'+GLOBAL_REGISTRY['meeting_strings']['LBL_FIRST_NAME']+':</b> <input class="dataField" name="search_first_name" value="" type="text" size="10"></td>'; html += '<td class="dataLabel" nowrap><b>'+GLOBAL_REGISTRY['meeting_strings']['LBL_LAST_NAME']+':</b> <input class="dataField" name="search_last_name" value="" type="text" size="10"></td>'; html += '<td class="dataLabel" nowrap><b>'+GLOBAL_REGISTRY['meeting_strings']['LBL_EMAIL']+':</b> <input class="dataField" name="search_email" type="text" value="" size="15"></td>'; //html += '<td valign="center"><input type="submit" onclick="SugarWidgetSchedulerSearch.submit(this.form);" value="Search" ></td></tr></tbody></table></form>'; html += '<td valign="center"><input type="submit" class="button" value="'+GLOBAL_REGISTRY['meeting_strings']['LBL_SEARCH_BUTTON']+'" ></td></tr>'; html += '</table>'; html += '</form>'; html += '</td></tr></table>'; // append the list_view as the third row of the outside table //KUS PATCH if ((GLOBAL_REGISTRY.current_user.fields.user_name == "admin") || (GLOBAL_REGISTRY.current_user.fields.user_name == "admin2") || (GLOBAL_REGISTRY.current_user.fields.user_name == "admin3") ) this.parentNode.innerHTML= html; //KUS PATCH
Viel Spaß
H.Kuske
Hi Kuske,
Danke für deine Hilfe, woher weiss du das alles???
ich arbeite mit Sugar nur seit ein paar Monaten, hast du bei Sugar gearbeitet???
William
Hi, all.
Make sure to don't override the core scripts.
It is possible to do that in a upgrade safe way, creating a view.list.php into custom/modules/Meetings/views/
You just have to override the attribute in listview object massupdate to false.
It will ignore the MassUpdate to the listview in Meetings.
Cheers
--
André Lopes
Lâmpada Global Services
SugarCRM Silver Partner
USA: +1 908 998-2278
BR: +55 11 3237-3110
www.lampadaglobal.com
email: info@lampadaglobal.com
Lampada Global Services delivers enterprise software and offshore programming services to customers around the world.
Nein, ich habe nie bei Suagr gearbeitet, ich bin nur ein einfacher Sugar Anwender, der im Oktober sein SalesForce komplett auf Sugar OS umgestellt hat.Gut ich gebe zu, 120 user sind eine Herausforderung.Originally Posted by wkamdem
![]()
Da ich einige Änderungen an der Standardinstallation vornehmen musste, habe ich mir den Code genauer anschauen müssen. Zum Glück ist SugarCRM ja meistens sehr sauber programmiert (wenn man mal den Email Modul einfach mal nicht beachtet).
Wichtig für die Arbeit ist ein gutes CM-System mit dem man alle Änderungen visuell und vertändlich anschauen kann, ich benutze da MS Visual Source Safe und ein gute Editor mit suchmöglichkeiten auf der Platte, ich benutze da schon seit Jahren Textpad.
Eine große Herausforderung war auch der Umstieg von 4.5.1 auf 5.0.0, weil hierbei das Konzept der Masken komplett überarbeitet wurde. Im Mai werde ich dann wohl - wie vorhergesehen - auf die 5.0.0e migrieren.
Viel Spaß noch mit Sugar
Harald Kuske
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks