add test
This commit is contained in:
@@ -284,7 +284,8 @@ function booking_manual_email_form($form, &$form_state, $input_option = "")
|
|||||||
$email_options_array['remindertravelrequired'] = 'Reminder Travel Form Required Email';
|
$email_options_array['remindertravelrequired'] = 'Reminder Travel Form Required Email';
|
||||||
$email_options_array['travelcomplete'] = 'Travel Form Complete Email';
|
$email_options_array['travelcomplete'] = 'Travel Form Complete Email';
|
||||||
$preselection_options['---'] = "---";
|
$preselection_options['---'] = "---";
|
||||||
$preselection_options['bookedin'] = 'bookedin';
|
$preselection_options['bookedin'] = 'Status of Booked In';
|
||||||
|
$preselection_options['test'] = 'Testing';
|
||||||
|
|
||||||
//add in the custom email types
|
//add in the custom email types
|
||||||
for ($i = 1; $i <= variable_get('booking_custom_email_count','5'); $i++)
|
for ($i = 1; $i <= variable_get('booking_custom_email_count','5'); $i++)
|
||||||
@@ -483,6 +484,9 @@ function _booking_email_get_default_selection_callback($form, $form_state) {
|
|||||||
if ($selection == 'bookedin' && $person->booking_status == 1) {
|
if ($selection == 'bookedin' && $person->booking_status == 1) {
|
||||||
$defaults[] = $person->nid;
|
$defaults[] = $person->nid;
|
||||||
}
|
}
|
||||||
|
elseif ($selection == 'test' && $person->booking_lastname == 'Coad') {
|
||||||
|
$defaults[] = $person->nid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//set return value via drupal_json_encode($var)
|
//set return value via drupal_json_encode($var)
|
||||||
$replacementform_data['booking-email-default-ids'] = array (
|
$replacementform_data['booking-email-default-ids'] = array (
|
||||||
|
@@ -2,13 +2,11 @@
|
|||||||
* Special Effects AJAX framework command.
|
* Special Effects AJAX framework command.
|
||||||
*/
|
*/
|
||||||
Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, status) {
|
Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, status) {
|
||||||
|
|
||||||
jQuery(function($) {
|
jQuery(function($) {
|
||||||
var arr = $.parseJSON($('input#booking_email_default_ids').val())
|
var arr = $.parseJSON($('input#booking_email_default_ids').val())
|
||||||
$('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () {
|
$('#booking-manual-email-form').find(':checkbox[name^="table"]').each(function () {
|
||||||
//.prop() doesn't exist in Drupal's old version of jQuery so use .attr() instead
|
//.prop() doesn't exist in Drupal's old version of jQuery so use .attr() instead
|
||||||
$(this).attr("checked", ($.inArray($(this).val(), arr) != -1));
|
$(this).attr("checked", ($.inArray($(this).val(), arr) != -1));
|
||||||
});
|
});
|
||||||
alert(arr[0]);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
Reference in New Issue
Block a user