First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,51 @@
{include file="CRM/common/TrackingFields.tpl"}
<h3>{ts 1=$mer_participant->display_name 2=$mer_participant->email}Choose Events For %1 (%2){/ts}</h3>
{foreach from=$slot_fields key=slot_name item=field_name}
<fieldset>
<legend>
{$slot_name}
</legend>
<div class="slot_options">
<ul class="indented">
{$form.$field_name.html}
</ul>
</div>
</fieldset>
{/foreach}
<script type="text/javascript">
var session_options = {$session_options};
{literal}
for (var radio_id in session_options)
{
var info = session_options[radio_id];
var label_sel = "label[for=" + radio_id + "]";
cj("#"+radio_id +","+ label_sel).wrapAll("<li>");
if (info.session_full) {
cj("#"+radio_id).prop('disabled', true);
cj("#"+radio_id).after('<span class="error">{/literal}{ts escape='js'}Session is Full{/ts}{literal}: </span>');
}
var more = cj('<a href="#">{/literal}{ts escape='js'}more info{/ts}{literal}</a>').click(function(event) {
event.preventDefault();
var nfo = cj(this).data("session_info");//F-!
cj("<div style='font-size: 90%;'>" + (nfo.session_description || "-{/literal}{ts escape='js'}No description available for this event{/ts}{literal}-") + "</div>").dialog({
title: nfo.session_title,
resizable: false,
draggable: false,
width: 600,
modal: true
});
});
more.data("session_info", info);
cj(label_sel).append(" ", more);
}
{/literal}
</script>
<div id="crm-submit-buttons" class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
{include file="CRM/Event/Cart/Form/viewCartLink.tpl"}

View file

@ -0,0 +1,31 @@
{assign var=event_id value=$participant->event_id}
{assign var=participant_id value=$participant->id}
<fieldset class="participant" id="event_{$event_id}_participant_{$participant_id}">
<legend>
{assign var=name value="event[`$event_id`][participant][`$participant_id`][number]"}
{$custom.$name}
</legend>
<div class="clearfix">
{assign var=pre value="event[`$event_id`][participant][`$participant_id`][customPre]"}
<div class="profile-group">
{include file="CRM/UF/Form/Block.tpl" fields=$custom.$pre form=$form.field.$participant_id}
</div>
<div class="participant-info crm-section form-item">
<div class="label">
{$form.event.$event_id.participant.$participant_id.email.label}
</div>
<div class="edit-value content">
{$form.event.$event_id.participant.$participant_id.email.html}
</div>
</div>
{assign var=post value="event[`$event_id`][participant][`$participant_id`][customPost]"}
<div style="clear:left"></div>
<div class="profile-group">
{include file="CRM/UF/Form/Block.tpl" fields=$custom.$post form=$form.field.$participant_id}
</div>
</div>
<!--if $form_participant->participant_index > 0-->
<a class="link-delete" href="#" onclick="delete_participant({$event_id}, {$participant_id}); return false;">{ts}Delete{/ts} {$form->name}</a>
</fieldset>

View file

@ -0,0 +1,87 @@
{include file="CRM/common/TrackingFields.tpl"}
{if $contact}
<div class="messages status no-popup">
{ts 1=$contact.display_name}Welcome %1{/ts}. (<a href="{crmURL p='civicrm/event/cart_checkout' q="&cid=0&reset=1"}" title="{ts}Click here to register a different person for this event.{/ts}">{ts 1=$contact.display_name}Not %1, or want to register a different person{/ts}</a>?)</div>
{/if}
{foreach from=$events_in_carts key=index item=event_in_cart}
{if !$event_in_cart.main_conference_event_id}
{assign var=event_id value=$event_in_cart->event_id}
<h3 class="event-title">
{$event_in_cart->event->title} ({$event_in_cart->event->start_date|date_format:"%m/%d/%Y %l:%M%p"})
</h3>
<fieldset class="event_form">
<div class="participants crm-section" id="event_{$event_in_cart->event_id}_participants">
{foreach from=$event_in_cart->participants item=participant}
{include file="CRM/Event/Cart/Form/Checkout/Participant.tpl"}
{/foreach}
<a class="link-add" href="#" onclick="add_participant({$event_in_cart->event_cart->id}, {$event_in_cart->event_id}); return false;">{ts}Add Another Participant{/ts}</a>
</div>
{if $event_in_cart->event->is_monetary }
<div class="price_choices crm-section">
{foreach from=$price_fields_for_event.$event_id key=price_index item=price_field_name}
<div class="label">
{$form.$price_field_name.label}
</div>
<div class="content">
{$form.$price_field_name.html|replace:'/label>&nbsp;':'/label><br>'}
</div>
{/foreach}
</div>
{else}
<p>{ts}There is no charge for this event.{/ts}</p>
{/if}
</fieldset>
{/if}
{/foreach}
<div id="crm-submit-buttons" class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
{include file="CRM/Event/Cart/Form/viewCartLink.tpl"}
{literal}
<script type="text/javascript">
//<![CDATA[
function add_participant( cart_id, event_id ) {
var max_index = 0;
var matcher = new RegExp("event_" + event_id + "_participant_(\\d+)");
cj('#event_' + event_id + '_participants .participant').each(
function(index) {
matches = matcher.exec(cj(this).attr('id'));
index = parseInt(matches[1]);
if (index > max_index)
{
max_index = index;
}
}
);
// FIXME: this get should be a post according to restful standards
cj.get(CRM.url("civicrm/ajax/event/add_participant_to_cart?snippet=1", {cart_id: cart_id, event_id: event_id}),
function(data) {
cj('#event_' + event_id + '_participants').append(data).trigger('crmLoad');
}
);
}
function delete_participant( event_id, participant_id )
{
// FIXME: this get should be a post according to restful standards
cj('#event_' + event_id + '_participant_' + participant_id).remove();
cj.get(CRM.url("civicrm/ajax/event/remove_participant_from_cart", {id: participant_id}));
}
//XXX missing
cj('#ajax_error').ajaxError(
function( e, xrh, settings, exception ) {
cj(this).append('<div class="error">{/literal}{ts escape='js'}Error adding a participant at{/ts}{literal} ' + settings.url + ': ' + exception);
}
);
//]]>
</script>
{/literal}

View file

@ -0,0 +1,196 @@
{include file="CRM/common/TrackingFields.tpl"}
<table>
<thead>
<tr>
<th class="event-title">
{ts}Event{/ts}
</th>
<th class="participants-column">
{ts}Participants{/ts}
</th>
<th class="cost">
{ts}Price{/ts}
</th>
<th class="amount">
{ts}Total{/ts}
</th>
</tr>
</thead>
<tbody>
{foreach from=$line_items item=line_item}
<tr class="event-line-item {$line_item.class}">
<td class="event-title">
{$line_item.event->title} ({$line_item.event->start_date})
</td>
<td class="participants-column">
{$line_item.num_participants}<br/>
{if $line_item.num_participants > 0}
<div class="participants" style="padding-left: 10px;">
{foreach from=$line_item.participants item=participant}
{$participant.display_name}<br />
{/foreach}
</div>
{/if}
{if $line_item.num_waiting_participants > 0}
{ts}Waitlisted:{/ts}<br/>
<div class="participants" style="padding-left: 10px;">
{foreach from=$line_item.waiting_participants item=participant}
{$participant.display_name}<br />
{/foreach}
</div>
{/if}
</td>
<td class="cost">
{$line_item.cost|crmMoney:$currency|string_format:"%10s"}
</td>
<td class="amount">
&nbsp;{$line_item.amount|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
{if $discounts}
<tr>
<td>
</td>
<td>
</td>
<td>
{ts}Subtotal:{/ts}
</td>
<td>
&nbsp;{$sub_total|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
{foreach from=$discounts key=myId item=i}
<tr>
<td>{$i.title}
</td>
<td>
</td>
<td>
</td>
<td>
-{$i.amount|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
{/foreach}
{/if}
<tr>
<td>
</td>
<td>
</td>
<td class="total">
{ts}Total:{/ts}
</td>
<td class="total">
&nbsp;{$total|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
</tfoot>
</table>
{if $payment_required == true}
{if $form.is_pay_later.label}
<div class="crm-section {$form.is_pay_later.name}-section">
<div class="label">{$form.is_pay_later.label}</div>
<div class="content">{$form.is_pay_later.html}
</div>
<div class="clear"></div>
</div>
<div class="pay-later-instructions" style="display:none">
{$pay_later_instructions}
</div>
{/if}
{include file='CRM/Core/BillingBlockWrapper.tpl'}
{/if}
{if $collect_billing_email == true}
<div class="crm-section {$form.billing_contact_email.name}-section">
<div class="label">{$form.billing_contact_email.label}</div>
<div class="content">{$form.billing_contact_email.html}
</div>
<div class="clear"></div>
</div>
{/if}
{if $administrator}
<!--
<div style="border: 1px solid blue; padding: 5px;">
<b>{ts}Staff use only{/ts}</b>
<div class="crm-section {$form.note.name}-section">
<div class="label">{$form.note.label}</div>
<div class="content">{$form.note.html}
<div class="description">{ts}Note that will be sent to the billing customer.{/ts}</div>
</div>
<div class="clear"></div>
</div>
<div class="crm-section {$form.source.name}-section">
<div class="label">{$form.source.label}</div>
<div class="content">{$form.source.html}
<div class="description">{ts}Description of this transaction.{/ts}</div>
</div>
<div class="clear"></div>
</div>
<div class="crm-section {$form.payment_type.name}-section">
<div class="label">{$form.payment_type.label}</div>
<div class="content">{$form.payment_type.html}
</div>
<div class="clear"></div>
</div>
<div class="crm-section {$form.check_number.name}-section" style="display: none;">
<div class="label">{$form.check_number.label}</div>
<div class="content">{$form.check_number.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section {$form.is_pending.name}-section">
<div class="label">{$form.is_pending.label}</div>
<div class="content">{$form.is_pending.html}
</div>
<div class="clear"></div>
</div>
</div>
-->
{/if}
<script type="text/javascript">
{if $form.is_pay_later.name}
var pay_later_sel = "input#{$form.is_pay_later.name}";
{/if}
{literal}
CRM.$(function($) {
function refresh() {
{/literal}{if $form.is_pay_later.name}{literal}
var is_pay_later = $(pay_later_sel).prop("checked");
{/literal}{else}
var is_pay_later = false;
{/if}{literal}
$(".credit_card_info-group").toggle(!is_pay_later);
$(".pay-later-instructions").toggle(is_pay_later);
$("div.billingNameInfo-section .description").html(is_pay_later ? "Enter the billing address at which you can be invoiced." : "Enter the name as shown on your credit or debit card, and the billing address for this card.");
}
{/literal}{if $form.is_pay_later.name}{literal}
$(pay_later_sel).change(function() {
refresh();
});
{/literal}{/if}{literal}
$("input#source").prop('disabled', true);
$(".payment_type-section :radio").change(function() {
var sel = $(this).attr("id");
$(".check_number-section").toggle(
$(this).is(":checked") &&
$("label[for="+sel+"]").html() == "{/literal}{ts escape='js'}Check{/ts}{literal}"
);
});
refresh();
});
{/literal}
</script>
<div id="crm-submit-buttons" class="crm-submit-buttons">
{include file="CRM/common/formButtons.tpl" location="bottom"}
</div>
{include file="CRM/Event/Cart/Form/viewCartLink.tpl"}

View file

@ -0,0 +1,167 @@
{include file="CRM/common/TrackingFields.tpl"}
<div class="crm-block crm-event-thankyou-form-block">
<p>
{ts}This is your receipt of payment made for the following event registration.{/ts}
</p>
<p>
{ts 1=$transaction_id 2=$transaction_date|date_format:"%D %I:%M %p %Z"}Your order number is <strong>#%1</strong>. Please print this confirmation for your records. You will receieve a confirmation email with the information below. Information about the workshops will be sent separately to each participant. Here's a summary of your transaction placed on %2:{/ts}
</p>
{if $pay_later_receipt && $is_pay_later}
<p>
{$pay_later_receipt}
</p>
{/if}
{if $payment_required}
<div class="crm-group billing_name_address-group">
<div class="header-dark">
{ts}Billing Name and Address{/ts}
</div>
<div class="crm-section no-label billing_name-section">
<div class="content">{$billing_name}</div>
<div class="clear"></div>
</div>
<div class="crm-section no-label billing_address-section">
<div class="content">
{$billing_street_address}<br/>
{$billing_city}, {$billing_state} {$billing_postal_code}
</div>
<div class="clear"></div>
</div>
</div>
{if $credit_card_type}
<div class="crm-group credit_card-group">
<div class="header-dark">
{ts}Credit Card Information{/ts}
</div>
<div class="crm-section no-label credit_card_details-section">
<div class="content">{$credit_card_type}</div>
<div class="content">{$credit_card_number}</div>
<div class="content">{ts}Expires{/ts}: {$credit_card_exp_date.M}/{$credit_card_exp_date.Y}
<div class="clear"></div>
</div>
</div>
</div>
{/if}
{/if}
<table>
<thead>
<tr style="border-bottom: 1px solid #ccc">
<th class="event-title">
{ts}Event{/ts}
</th>
<th class="participants-column">
{ts}Participants{/ts}
</th>
<th class="cost">
{ts}Price{/ts}
</th>
<th class="amount">
{ts}Total{/ts}
</th>
</tr>
</thead>
<tbody>
{foreach from=$line_items item=line_item}
<tr class="event-line-item {$line_item.class}">
<td class="event-info">
<div class="event-title"><strong>{$line_item.event->title}</strong></div>
{if $line_item.event->is_show_location}
<div class="event-location">
{if $line_item.location.address.1.name}
{$line_item.location.address.1.name}
{/if}
{if $line_item.location.address.1.street_address}
{$line_item.location.address.1.street_address}
{/if}
{if $line_item.location.address.1.supplemental_address_1}
{$line_item.location.address.1.supplemental_address_1}
{/if}
{if $line_item.location.address.1.supplemental_address_2}
{$line_item.location.address.1.supplemental_address_2}
{/if}
{if $line_item.location.address.1.supplemental_address_3}
{$line_item.location.address.1.supplemental_address_3}
{/if}
{if $line_item.location.address.1.city}
{$line_item.location.address.1.city}, {$line_item.location.address.1.state_province} {$line_item.location.address.1.postal_code}
{/if}
</div>
{/if}{*End of isShowLocation condition*}
<div class="event-data">
{$line_item.event->start_date|date_format:"%D %I:%M %p"} -
{$line_item.event->end_date|date_format:"%I:%M %p"}
</div>
</td>
<td class="participants-column">
{$line_item.num_participants}<br />
{if $line_item.num_participants > 0}
<div class="participants" style="padding-left: 10px;">
{foreach from=$line_item.participants item=participant}
{$participant.display_name}<br />
{/foreach}
</div>
{/if}
{if $line_item.num_waiting_participants > 0}
{ts}Waitlisted:{/ts}<br/>
<div class="participants" style="padding-left: 10px;">
{foreach from=$line_item.waiting_participants item=participant}
{$participant.display_name}<br />
{/foreach}
</div>
{/if}
</td>
<td class="cost">
{$line_item.cost|crmMoney:$currency|string_format:"%10s"}
</td>
<td class="amount">
&nbsp;{$line_item.amount|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
{/foreach}
</tbody>
<tfoot>
{if $discounts}
<tr>
<td>
</td>
<td>
</td>
<td>
{ts}Subtotal{/ts}:
</td>
<td>
&nbsp;{$sub_total|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
{foreach from=$discounts key=myId item=i}
<tr>
<td>
{$i.title}
</td>
<td>
</td>
<td>
</td>
<td>
-{$i.amount|crmMoney:$currency|string_format:"%10s"}
</td>
</tr>
{/foreach}
{/if}
<tr>
<td>
</td>
<td>
</td>
<td class="total">
<strong>{ts}Total{/ts}:</strong>
</td>
<td class="total">
<strong>&nbsp;{$total|crmMoney:$currency|string_format:"%10s"}</strong>
</td>
</tr>
</tfoot>
</table>
<p>{ts}If you have questions about the status of your registration or purchase please contact us.{/ts}</p>
</div>

View file

@ -0,0 +1,4 @@
{capture assign=cartURL}{crmURL p='civicrm/event/view_cart' q="reset=1"}{/capture}
<div>
{ts 1=$cartURL}<a href='%1'>Return to Cart</a>{/ts}
</div>

View file

@ -0,0 +1,3 @@
<div>
Foo!
</div>

View file

@ -0,0 +1,29 @@
<table>
<thead>
<tr>
<th>
</th>
<th>
</th>
</tr>
</thead>
<tbody>
{foreach from=$events_in_carts item=event_in_cart}
{if !$event_in_cart.main_conference_event_id}
<tr>
<td>
<a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$event_in_cart.event.id`"}" title="{ts}View event info page{/ts}" class="bold">{$event_in_cart.event.title}</a>
</td>
<td>
<a title="Remove From Cart" class="action-item" href="{crmURL p='civicrm/event/remove_from_cart' q="reset=1&id=`$event_in_cart.event.id`"}">{ts}Remove{/ts}</a>
</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
{if $events_count > 0}
<a href="{crmURL p='civicrm/event/cart_checkout' }" title="Check Out" class="button crm-check-out-button"><span>{ts}Check Out{/ts}</span></a>
<br /><br />
{/if}
<a href="{crmURL p="civicrm/event/ical" q="reset=1&page=1&html=1"}">&laquo; Back to Event List</a>