Hello,
1 and 2 is easy. i don’t know 3.
for 1 :
in detailviewdefs of meetings
'includes' =>
array (
0 =>
array (
'file' => 'custom/modules/Meetings/accept_decline.js',
),
),
The content of accept_decline.js
function accept(url) {
//alert('accept');
if (url) {
$.ajax({
url: url,
success: function() {
// Reload subpanel
showSubPanel('contacts', null, true);
}
});
}
}
function decline(url) {
//alert('decline');
if (url) {
$.ajax({
url: url,
success: function() {
// Reload subpanel
showSubPanel('contacts', null, true);
}
});
}
}
function ajaxRequest(url) {
if (url) {
$.ajax({
url: url,
success: function(result) {
YAHOO.SUGAR.MessageBox.show({msg: result} );
// showSubPanel('contacts', null, true);
showSubPanel('dio_prestations_meetings', null, true);
showSubPanel('dio_sisdprestations_meetings', null, true);
}
});
}
}
in contact module : metadata meeting_subpanel_contact
array (
'vname' => 'LBL_NEW_FIELD',
'widget_class' => 'SubPanelDioAccept',
'width' => '5%',
'custom_link_only' => true,
'displayHeaderCell' => false,
'default' => true,
),
in include generic the widget :
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
class SugarWidgetSubPanelDioAccept extends SugarWidgetField {
function displayHeaderCell(&$layout_def) {
return ' ';
}
function displayList(&$layout_def) {
global $app_strings;
global $subpanel_item_count;
$unique_id = $layout_def['subpanel_id'] . "_edit_" . $subpanel_item_count;
$accept = 'index.php?entryPoint=acceptDecline'
. '&module=Meetings'
. '&contact_id=' . $layout_def['fields']['ID']
. '&accept_status=accept'
. '&record=' . $_REQUEST['record'];
$decline = 'index.php?entryPoint=acceptDecline'
. '&module=Meetings'
. '&contact_id=' . $layout_def['fields']['ID']
. '&accept_status=decline'
. '&record=' . $_REQUEST['record'];
$toreturn = '<img src="/themes/default/images/accept_inline.gif" onclick="accept("' .$accept .'")"> ';
$toreturn .= '<img src="/themes/default/images/decline_inline.gif" onclick="decline("' .$decline .'")"> ';
return $toreturn;
}
}
Please note, you must certainly correct the path of icons accept_inline.gif and decline_inline.gif
For 2 :
It’s easy to create a custom action in meeting, load relationship contact, loop and send basic email. (i dont know how use a template)
Maybe correct the original send invite button ?
Regards