Merge pull request #20450 from jaapjansma/dev_financials_6_reports
[civicrm-core.git] / templates / CRM / SMS / Form / Schedule.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
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 |
8 +--------------------------------------------------------------------+
9 *}
10 <div class="crm-block crm-form-block crm-sms-schedule-form-block">
11 {include file="CRM/common/WizardHeader.tpl"}
12 <div class="help">
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 &quot;Send Immediately&quot;.{/ts} {help id="sending"}
14 </div>
15 {include file="CRM/Mailing/Form/Count.tpl"}
16
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>
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
45 </div>
46
47 <script type="text/javascript">
48 {literal}
49 CRM.$(function($) {
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);
55 });
56
57 // Clear scheduled date/time when send immediately is selected
58 $("#send_immediate").change(function() {
59 if ($(this).prop('checked')) {
60 $(".start_date_elements input").val('');
61 $(".start_date_elements input").siblings("a.crm-clear-link").css('visibility', 'hidden');
62 }
63 });
64
65 });
66 {/literal}
67 </script>