Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-03-03-17-36-50
[civicrm-core.git] / templates / CRM / Mailing / Form / Search.tpl
CommitLineData
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-search-form-block">
27<table class="form-layout">
28 <tr>
29 <td>{$form.mailing_name.label}<br />
30 {$form.mailing_name.html|crmAddClass:big} {help id="id-mailing_name"}
31 </td>
32 </tr>
33 <tr>
34 <td>
96cfe0d7 35 <label>{if $sms eq 1}{ts}SMS Date{/ts}{else}{ts}Mailing Date{/ts}{/if}</label>
6a488035
TO
36 </td>
37 </tr>
38 <tr>
39 {include file="CRM/Core/DateRange.tpl" fieldName="mailing" from='_from' to='_to'}
40 </tr>
41 <tr>
42 <td colspan="1">{$form.sort_name.label}<br />
43 {$form.sort_name.html|crmAddClass:big} {help id="id-create_sort_name"}
f6df2c32 44 <br/><br/>
6ff6d85a 45 <div class="crm-search-form-block-is_archive">
f6df2c32
DS
46 {$form.is_archived.label}<br/>
47 {$form.is_archived.html}
6ff6d85a 48 </div>
6a488035 49 </td>
cbb4cb7b
PJ
50 {if $form.mailing_status}
51 <td width="100%"><label>{if $sms eq 1}{ts}SMS Status{/ts}{else}{ts}Mailing Status{/ts}{/if}</label><br />
52 <div class="listing-box" style="width: auto; height: 100px">
53 {foreach from=$form.mailing_status item="mailing_status_val"}
54 <div class="{cycle values="odd-row,even-row"}">
55 {$mailing_status_val.html}
56 </div>
6a488035 57 {/foreach}
cbb4cb7b 58 <div class='odd-row'>
f6df2c32 59 {$form.status_unscheduled.html}
cbb4cb7b
PJ
60 </div>
61 </div><br />
62 </td>
63 {/if}
6a488035
TO
64 </tr>
65
66 {* campaign in mailing search *}
67 {include file="CRM/Campaign/Form/addCampaignToComponent.tpl"
68 campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''}
69
70 <tr>
71 <td>{$form.buttons.html}</td><td colspan="2"></td>
72 </tr>
73</table>
74</div>
6ff6d85a
DS
75
76{literal}
77<script type="text/javascript">
78 cj(document).ready( function( ) {
6ff6d85a 79 var archiveOption = cj("input[name^='is_archived']:radio");
6ff6d85a
DS
80 cj('#status_unscheduled').change(function() {
81 if (cj(this).prop('checked') ) {
4a143c04 82 archiveOption.prop({checked: false, disabled: true}).change();
6ff6d85a 83 } else {
4a143c04 84 archiveOption.prop('disabled', false);
6ff6d85a
DS
85 }
86 }).trigger('change');
87 archiveOption.change(function() {
88 if (cj("input[name^='is_archived']:radio:checked").length) {
4a143c04 89 cj('#status_unscheduled').prop({checked: false, disabled: true}).change();
753f3087 90 } else {
4a143c04 91 cj('#status_unscheduled').prop('disabled', false);
6ff6d85a
DS
92 }
93 }).trigger('change');
6ff6d85a 94 });
6ff6d85a
DS
95</script>
96{/literal}