</table>
{/if}
{* Fee block (EventFees.tpl) is injected here when an event is selected. *}
- <div id="feeBlock"></div>
+ <div class="crm-event-form-fee-block"></div>
<fieldset>
<table class="form-layout">
<tr class="crm-participant-form-block-note">
{/if}
{literal}
- var eventId = $('#event_id').val();
-
- {/literal}{if $action eq 2}{literal}
- if (typeof eventId == 'undefined') {
- var eventId = $('[name=event_id]').val();
- }
- {/literal}{/if}{literal}
+ var eventId = $('[name=event_id], #event_id', $form).val();
if (eventId) {
dataUrl += '&eventId=' + eventId;
}
else {
- $('#eventFullMsg').hide( );
- $('#feeBlock').html('');
+ $('#eventFullMsg', $form).hide( );
+ $('.crm-event-form-fee-block', $form).html('');
return;
}
$.ajax({
url: dataUrl,
success: function ( html ) {
- $("#feeBlock").html( html ).trigger('crmLoad');
+ $(".crm-event-form-fee-block", $form).html( html ).trigger('crmLoad');
//show event real full as well as waiting list message.
- if ( $("#hidden_eventFullMsg").val( ) ) {
- $( "#eventFullMsg" ).show( ).html( $("#hidden_eventFullMsg" ).val( ) );
+ if ( $("#hidden_eventFullMsg", $form).val( ) ) {
+ $( "#eventFullMsg", $form).show( ).html( $("#hidden_eventFullMsg", $form).val( ) );
}
else {
- $( "#eventFullMsg" ).hide( );
+ $( "#eventFullMsg", $form ).hide( );
}
}
});