{*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
<tr>
<td></td>
<td>
- <a class="button" href='{crmURL p="civicrm/event/participant/feeselection" q="reset=1&id=`$participantId`&cid=`$contactId`&action=update"}' title="{ts}Change Selections{/ts}"><span><div class="icon edit-icon"></div> {ts}Change Selections{/ts}</span></a>
+ <a class="action-item crm-hover-button" href='{crmURL p="civicrm/event/participant/feeselection" q="reset=1&id=`$participantId`&cid=`$contactId`&action=update"}'><span class="icon ui-icon-pencil"></span> {ts}Change Selections{/ts}</a>
</td>
</tr>
{else}
{if $context eq 'standalone' and $outBound_option != 2 }
<script type="text/javascript">
{literal}
-CRM.$(function($) {
- $("#contact_id").change( function( ) {
- checkEmail( );
- } );
- checkEmail( );
-});
-function checkEmail( ) {
- var contactID = cj("#contact_id").val();
- if ( contactID ) {
- var postUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' h=0}{literal}";
- cj.post( postUrl, {contact_id: contactID},
- function ( response ) {
- if ( response ) {
- cj("#email-receipt").show( );
- if ( cj("#send_receipt").is(':checked') ) {
- cj("#notice").show( );
- }
+ CRM.$(function($) {
+ var $form = $("form.{/literal}{$form.formClass}{literal}");
+ $("#contact_id", $form).change(checkEmail);
+ checkEmail();
- cj("#email-address").html( response );
- } else {
- cj("#email-receipt").hide( );
- cj("#notice").hide( );
- }
- }
- );
+ function checkEmail( ) {
+ var data = $("#contact_id", $form).select2('data');
+ if (data && data.extra && data.extra.email && data.extra.email.length) {
+ $("#email-receipt", $form).show();
+ if ($("#send_receipt", $form).is(':checked')) {
+ $("#notice", $form).show();
+ }
+ $("#email-address", $form).html(data.extra.email);
+ }
+ else {
+ $("#email-receipt, #notice", $form).hide();
+ }
}
-}
+ });
{/literal}
</script>
{/if}