Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
4 | +--------------------------------------------------------------------+ |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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"} | |
28 | <div id="help"> | |
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 | ||
33 | <table class="form-layout"> | |
34 | <tbody> | |
35 | <tr class="crm-sms-schedule-form-block-now"> | |
36 | <td class="label">{$form.now.label}</td> | |
37 | <td>{$form.now.html}</td> | |
38 | </tr> | |
39 | <tr> | |
40 | <td class="label">{ts}OR{/ts}</td> | |
41 | <td> </td> | |
42 | </tr> | |
43 | <tr class="crm-sms-schedule-form-block-start_date"> | |
44 | <td class="label">{$form.start_date.label}</td> | |
45 | <td>{include file="CRM/common/jcalendar.tpl" elementName=start_date} | |
46 | <div class="description">{ts}Set a date and time when you want CiviSMS to start sending this Mass SMS.{/ts}</div> | |
47 | </td> | |
48 | </tr> | |
49 | </tbody> | |
50 | </table> | |
51 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div> | |
52 | ||
53 | {if $preview} | |
54 | <div class="crm-accordion-wrapper crm-plain_text_sms-accordion collapsed"> | |
55 | <div class="crm-accordion-header"> | |
56 | {ts}Preview SMS{/ts} | |
57 | </div><!-- /.crm-accordion-header --> | |
58 | <div class="crm-accordion-body"> | |
59 | <table class="form-layout"> | |
60 | ||
61 | {if $preview.viewURL} | |
62 | <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> | |
63 | {/if} | |
64 | </table> | |
65 | </div><!-- /.crm-accordion-body --> | |
66 | </div><!-- /.crm-accordion-wrapper --> | |
67 | {/if} | |
68 | ||
69 | {* include jscript to warn if unsaved form field changes *} | |
70 | {include file="CRM/common/formNavigate.tpl"} | |
71 | ||
72 | </div> | |
73 | ||
74 | <script type="text/javascript"> | |
75 | {if $preview} | |
76 | {literal} | |
77 | cj(function() { | |
78 | cj().crmAccordions(); | |
79 | }); | |
80 | {/literal} | |
81 | {/if} | |
82 | ||
83 | {literal} | |
84 | cj(function() { | |
85 | cj('#start_date_display').change( function( ) { | |
86 | if ( cj(this).val( ) ) { | |
8539f25d | 87 | cj('#now').prop('checked', false ); |
6a488035 TO |
88 | } |
89 | }); | |
90 | cj('#now').change( function( ) { | |
8539f25d | 91 | if ( cj('#now').prop('checked', true ) ) { |
6a488035 TO |
92 | cj('#start_date_display').val( '' ); |
93 | cj('#start_date').val( '' ); | |
94 | cj('#start_date_time').val( '' ); | |
95 | } | |
96 | }); | |
97 | }); | |
98 | {/literal} | |
99 | </script> |