Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
f299f7db | 5 | | Copyright CiviCRM LLC (c) 2004-2020 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | <div class="crm-block crm-form-block crm-sms-schedule-form-block"> | |
27 | {include file="CRM/common/WizardHeader.tpl"} | |
f6eedce7 | 28 | <div class="help"> |
6a488035 TO |
29 | {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"} |
30 | </div> | |
31 | {include file="CRM/Mailing/Form/Count.tpl"} | |
32 | ||
e737155e J |
33 | <div> |
34 | <div> | |
35 | <div> | |
36 | {$form.send_option.html} | |
37 | <span class="start_date_elements">{$form.start_date.html}</span> | |
38 | </div> | |
39 | ||
40 | </div> | |
41 | <div class="description">{ts}Set a date and time when you want CiviSMS to start sending this Mass SMS.{/ts}</div> | |
42 | </div> | |
6a488035 TO |
43 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div> |
44 | ||
45 | {if $preview} | |
46 | <div class="crm-accordion-wrapper crm-plain_text_sms-accordion collapsed"> | |
47 | <div class="crm-accordion-header"> | |
48 | {ts}Preview SMS{/ts} | |
49 | </div><!-- /.crm-accordion-header --> | |
50 | <div class="crm-accordion-body"> | |
51 | <table class="form-layout"> | |
52 | ||
53 | {if $preview.viewURL} | |
54 | <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> | |
55 | {/if} | |
56 | </table> | |
57 | </div><!-- /.crm-accordion-body --> | |
58 | </div><!-- /.crm-accordion-wrapper --> | |
59 | {/if} | |
60 | ||
6a488035 TO |
61 | </div> |
62 | ||
63 | <script type="text/javascript"> | |
6a488035 | 64 | {literal} |
47ea29e3 | 65 | CRM.$(function($) { |
e737155e J |
66 | |
67 | // If someone changes the schedule date, auto-select the 'send at' option | |
68 | $(".start_date_elements input").change(function() { | |
69 | $('#send_immediate').prop('checked', false); | |
70 | $('#send_later').prop('checked', true); | |
47ea29e3 | 71 | }); |
e737155e J |
72 | |
73 | // Clear scheduled date/time when send immediately is selected | |
74 | $("#send_immediate").change(function() { | |
47ea29e3 | 75 | if ($(this).prop('checked')) { |
e737155e J |
76 | $(".start_date_elements input").val(''); |
77 | $(".start_date_elements input").siblings("a.crm-clear-link").css('visibility', 'hidden'); | |
47ea29e3 CW |
78 | } |
79 | }); | |
e737155e | 80 | |
47ea29e3 | 81 | }); |
6a488035 TO |
82 | {/literal} |
83 | </script> |