Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | <div class="crm-block crm-form-block crm-sms-schedule-form-block"> | |
11 | {include file="CRM/common/WizardHeader.tpl"} | |
f6eedce7 | 12 | <div class="help"> |
6a488035 TO |
13 | {ts}You can schedule this Mass SMS to be sent starting at a specific date and time, OR you can request that it be sent as soon as possible by checking "Send Immediately".{/ts} {help id="sending"} |
14 | </div> | |
15 | {include file="CRM/Mailing/Form/Count.tpl"} | |
16 | ||
e737155e J |
17 | <div> |
18 | <div> | |
19 | <div> | |
20 | {$form.send_option.html} | |
21 | <span class="start_date_elements">{$form.start_date.html}</span> | |
22 | </div> | |
23 | ||
24 | </div> | |
25 | <div class="description">{ts}Set a date and time when you want CiviSMS to start sending this Mass SMS.{/ts}</div> | |
26 | </div> | |
6a488035 TO |
27 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div> |
28 | ||
29 | {if $preview} | |
30 | <div class="crm-accordion-wrapper crm-plain_text_sms-accordion collapsed"> | |
31 | <div class="crm-accordion-header"> | |
32 | {ts}Preview SMS{/ts} | |
33 | </div><!-- /.crm-accordion-header --> | |
34 | <div class="crm-accordion-body"> | |
35 | <table class="form-layout"> | |
36 | ||
37 | {if $preview.viewURL} | |
38 | <tr><td class="label">{if $preview.type eq 'html'}{ts}SMS HTML:{/ts}{else}{ts}SMS Text:{/ts}{/if}</td><td><iframe height="300" src="{$preview.viewURL}" width="80%"><a href="{$preview.viewURL}" onclick="window.open(this.href); return false;">{ts}SMS Text:{/ts}</a></iframe></td></tr> | |
39 | {/if} | |
40 | </table> | |
41 | </div><!-- /.crm-accordion-body --> | |
42 | </div><!-- /.crm-accordion-wrapper --> | |
43 | {/if} | |
44 | ||
6a488035 TO |
45 | </div> |
46 | ||
47 | <script type="text/javascript"> | |
6a488035 | 48 | {literal} |
47ea29e3 | 49 | CRM.$(function($) { |
e737155e J |
50 | |
51 | // If someone changes the schedule date, auto-select the 'send at' option | |
52 | $(".start_date_elements input").change(function() { | |
53 | $('#send_immediate').prop('checked', false); | |
54 | $('#send_later').prop('checked', true); | |
47ea29e3 | 55 | }); |
e737155e J |
56 | |
57 | // Clear scheduled date/time when send immediately is selected | |
58 | $("#send_immediate").change(function() { | |
47ea29e3 | 59 | if ($(this).prop('checked')) { |
e737155e J |
60 | $(".start_date_elements input").val(''); |
61 | $(".start_date_elements input").siblings("a.crm-clear-link").css('visibility', 'hidden'); | |
47ea29e3 CW |
62 | } |
63 | }); | |
e737155e | 64 | |
47ea29e3 | 65 | }); |
6a488035 TO |
66 | {/literal} |
67 | </script> |