Merge pull request #11881 from yashodha/CRM-21854
[civicrm-core.git] / templates / CRM / Mailing / Form / Search.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
8c9251b3 5 | Copyright CiviCRM LLC (c) 2004-2018 |
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-search-form-block">
27<table class="form-layout">
28 <tr>
7a019389
CW
29 <td>{$form.mailing_name.label} {help id="id-mailing_name"}<br />
30 {$form.mailing_name.html|crmAddClass:big}
6a488035
TO
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>
7a019389
CW
42 <td colspan="1">{$form.sort_name.label} {help id="id-create_sort_name"}<br />
43 {$form.sort_name.html|crmAddClass:big}
f6df2c32 44 <br/><br/>
6ff6d85a 45 <div class="crm-search-form-block-is_archive">
7a019389 46 {$form.is_archived.label} {help id="is_archived"}<br/>
f6df2c32 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 />
7a019389 52 <div class="listing-box" style="height: auto">
cbb4cb7b
PJ
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}
7a019389 58 <div class="{cycle values="odd-row,even-row"}">
f6df2c32 59 {$form.status_unscheduled.html}
cbb4cb7b
PJ
60 </div>
61 </div><br />
62 </td>
63 {/if}
6a488035
TO
64 </tr>
65
c00b95ef
ML
66 {* language *}
67 {if $form.language}
68 <tr>
69 <td>{$form.language.label} {help id="id-language"}<br />
70 {$form.language.html|crmAddClass:big}
71 </td>
72 </tr>
73 {/if}
74
6a488035
TO
75 {* campaign in mailing search *}
76 {include file="CRM/Campaign/Form/addCampaignToComponent.tpl"
77 campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''}
78
79 <tr>
80 <td>{$form.buttons.html}</td><td colspan="2"></td>
81 </tr>
82</table>
83</div>
6ff6d85a
DS
84
85{literal}
86<script type="text/javascript">
32678ccb
CW
87 CRM.$(function($) {
88 var archiveOption = $("input[name^='is_archived']:radio");
89 $('#status_unscheduled').change(function() {
90 if ($(this).prop('checked') ) {
4a143c04 91 archiveOption.prop({checked: false, disabled: true}).change();
6ff6d85a 92 } else {
4a143c04 93 archiveOption.prop('disabled', false);
6ff6d85a
DS
94 }
95 }).trigger('change');
96 archiveOption.change(function() {
32678ccb
CW
97 if ($("input[name^='is_archived']:radio:checked").length) {
98 $('#status_unscheduled').prop({checked: false, disabled: true}).change();
753f3087 99 } else {
32678ccb 100 $('#status_unscheduled').prop('disabled', false);
6ff6d85a
DS
101 }
102 }).trigger('change');
6ff6d85a 103 });
6ff6d85a
DS
104</script>
105{/literal}