{*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
| Copyright (C) 2011 Marty Wright |
| Licensed to CiviCRM under the Academic Free License version 3.0. |
{ts 1=$reminderName}WARNING: You are about to delete the Reminder titled <strong>%1</strong>.{/ts} {ts}Do you want to continue?{/ts}
</div>
{else}
- {* added onload javascript for source contact*}
- {literal}
- <script type="text/javascript">
- var recipient_manual = '';
- var recipient_manual_id = null;
- var toDataUrl = "{/literal}{crmURL p='civicrm/ajax/checkemail' q='id=1&noemail=1' h=0 }{literal}"; {/literal}
-
- {if $recipients}
- {foreach from=$recipients key=id item=name}
- {literal} recipient_manual += '{"name":"'+{/literal}"{$name}"{literal}+'","id":"'+{/literal}"{$id}"{literal}+'"},';{/literal}
- {/foreach}
- {literal} eval( 'recipient_manual = [' + recipient_manual + ']'); {/literal}
- {/if}
-
- {literal}
- if ( recipient_manual_id ) {
- eval( 'recipient_manual = ' + recipient_manual_id );
- }
-
- cj(document).ready( function( ) {
- {/literal}
- {literal}
-
- eval( 'tokenClass = { tokenList: "token-input-list-facebook", token: "token-input-token-facebook", tokenDelete: "token-input-delete-token-facebook", selectedToken: "token-input-selected-token-facebook", highlightedToken: "token-input-highlighted-token-facebook", dropdown: "token-input-dropdown-facebook", dropdownItem: "token-input-dropdown-item-facebook", dropdownItem2: "token-input-dropdown-item2-facebook", selectedDropdownItem: "token-input-selected-dropdown-item-facebook", inputToken: "token-input-input-token-facebook" } ');
-
- var sourceDataUrl = "{/literal}{$dataUrl}{literal}";
- var tokenDataUrl = "{/literal}{$tokenUrl}{literal}";
- var hintText = "{/literal}{ts escape='js'}Type in a partial or complete name of an existing recipient.{/ts}{literal}";
- cj( "#recipient_manual_id").tokenInput( tokenDataUrl, { prePopulate: recipient_manual, classes: tokenClass, hintText: hintText });
- cj( 'ul.token-input-list-facebook, div.token-input-dropdown-facebook' ).css( 'width', '450px' );
- cj('#source_contact_id').autocomplete( sourceDataUrl, { width : 180, selectFirst : false, hintText: hintText, matchContains: true, minChars: 1
- }).result( function(event, data, formatted) {
- }).bind( 'click', function( ) { });
- });
- </script>
- {/literal}
<table class="form-layout-compressed">
<tr class="crm-scheduleReminder-form-block-title">
<td class="right">{$form.title.label}</td><td colspan="3">{$form.title.html}</td>
</tr>
<tr id="recipientManual" class="crm-scheduleReminder-form-block-recipient_manual_id">
<td class="label">{$form.recipient_manual_id.label}</td>
- <td>{$form.recipient_manual_id.html}{edit}<span class="description">{ts}You can manually send out the reminders to these recipients.{/ts}</span>{/edit}</td>
+ <td>{$form.recipient_manual_id.html}{edit}<div class="description">{ts}You can manually send out the reminders to these recipients.{/ts}</div>{/edit}</td>
</tr>
<tr id="recipientGroup" class="crm-scheduleReminder-form-block-recipient_group_id">
<td class="label">{$form.group_id.label}</td>
<td>{$form.group_id.html}</td>
</tr>
+ <tr id="msgMode" class="crm-scheduleReminder-form-block-mode">
+ <td class="label">{$form.mode.label}</td>
+ <td>{$form.mode.html}</td>
+ </tr>
+ <tr id="smsProvider" class="crm-scheduleReminder-form-block-sms_provider_id">
+ <td class="label">{$form.sms_provider_id.label}</td>
+ <td>{$form.sms_provider_id.html}</td>
+ </tr>
</table>
- <fieldset id="compose_id"><legend>{ts}Email{/ts}</legend>
+ <fieldset id="compose_id"><legend>{$title}</legend>
<table id="email-field-table" class="form-layout-compressed">
<tr class="crm-scheduleReminder-form-block-active">
<td class="label"></td>
</tr>
</table>
- {include file="CRM/Contact/Form/Task/EmailCommon.tpl" upload=1 noAttach=1}
+ <div id="email">{include file="CRM/Contact/Form/Task/EmailCommon.tpl" upload=1 noAttach=1}</div>
+ {if $sms}<div id="sms">{include file="CRM/Contact/Form/Task/SMSCommon.tpl" upload=1 noAttach=1}</div>{/if}
</fieldset>
-{/if}
-
-<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
-</div>
-
{include file="CRM/common/showHideByFieldValue.tpl"
trigger_field_id = "is_repeat"
trigger_value = "true"
{literal}
<script type='text/javascript'>
- cj(function($) {
- $().crmAccordions();
- });
var entityMapping = eval({/literal}{$entityMapping}{literal});
var recipientMapping = eval({/literal}{$recipientMapping}{literal});
}
});
- cj('#absolute_date_display').parent( ).children('.crm-clear-link').children('a').click( function() {
- cj('#relativeDate').show();
- cj('#relativeDateRepeat').show();
- });
-
- cj(function() {
+ CRM.$(function($) {
if (cj('#absolute_date_display').val()) {
cj('#relativeDate').hide();
cj('#relativeDateRepeat').hide();
});
});
- cj(function() {
- if ( cj('#is_recipient_listing').val( ) ) {
- cj('#recipientList').show();
- } else {
- cj('#recipientList').hide();
- }
- cj('#recipient').change( function( ) {
- populateRecipient();
- });
- });
+ CRM.$(function($) {
+ loadMsgBox();
+ cj('#mode').change(function () {
+ loadMsgBox();
+ });
+
+ showHideLimitTo();
+ cj('#entity_0').change(function () {
+ showHideLimitTo();
+ });
+ });
+
+ function loadMsgBox() {
+ if (cj('#mode').val() == 'Email' || cj('#mode').val() == 0){
+ cj('#sms').hide();
+ cj('#smsProvider').hide();
+ cj('#email').show();
+ }
+ else if (cj('#mode').val() == 'SMS'){
+ cj('#email').hide();
+ cj('#sms').show();
+ cj('#smsProvider').show();
+ }
+ else if (cj('#mode').val() == 'User_Preference'){
+ cj('#email').show();
+ cj('#sms').show();
+ cj('#smsProvider').show();
+ }
+ }
+
+ function showHideLimitTo() {
+ if (cj('#entity_0').val() == 1) {
+ cj('#limit_to').hide();
+ }
+ else {
+ cj('#limit_to').show();
+ }
+ }
+
+ CRM.$(function($) {
+ if (cj('#is_recipient_listing').val()) {
+ cj('#recipientList').show();
+ }
+ else {
+ cj('#recipientList').hide();
+ }
+ cj('#recipient').change(function () {
+ populateRecipient();
+ });
+ });
function populateRecipient( ) {
var recipient = cj("#recipient option:selected").val();
</script>
{/literal}
+
+{/if}
+
+ <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
+</div>