Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | <div class="crm-block crm-form-block crm-search-form-block"> | |
6de4fe34 | 11 | <table class="form-layout"> |
6a488035 | 12 | <tr> |
6de4fe34 SL |
13 | <td>{$form.mailing_name.label} {help id="id-mailing_name"}<br /> |
14 | {$form.mailing_name.html|crmAddClass:big} | |
15 | </td> | |
6a488035 TO |
16 | </tr> |
17 | <tr> | |
6de4fe34 | 18 | {include file="CRM/Core/DatePickerRangeWrapper.tpl" fieldName="mailing" colspan='2'} |
6a488035 TO |
19 | </tr> |
20 | <tr> | |
6de4fe34 SL |
21 | <td colspan="1">{$form.sort_name.label} {help id="id-create_sort_name"}<br /> |
22 | {$form.sort_name.html|crmAddClass:big} | |
23 | <br/><br/> | |
24 | <div class="crm-search-form-block-is_archive"> | |
25 | {$form.is_archived.label} {help id="is_archived"}<br/> | |
26 | {$form.is_archived.html} | |
27 | </div> | |
28 | </td> | |
29 | {if $form.mailing_status} | |
30 | <td width="100%"><label>{if $sms eq 1}{ts}SMS Status{/ts}{else}{ts}Mailing Status{/ts}{/if}</label><br /> | |
7a019389 | 31 | <div class="listing-box" style="height: auto"> |
cbb4cb7b | 32 | {foreach from=$form.mailing_status item="mailing_status_val"} |
6de4fe34 SL |
33 | <div class="{cycle values="odd-row,even-row"}"> |
34 | {$mailing_status_val.html} | |
35 | </div> | |
6a488035 | 36 | {/foreach} |
7a019389 | 37 | <div class="{cycle values="odd-row,even-row"}"> |
f6df2c32 | 38 | {$form.status_unscheduled.html} |
cbb4cb7b | 39 | </div> |
6de4fe34 SL |
40 | </div><br /> |
41 | </td> | |
42 | {/if} | |
6a488035 TO |
43 | </tr> |
44 | ||
c00b95ef ML |
45 | {* language *} |
46 | {if $form.language} | |
47 | <tr> | |
48 | <td>{$form.language.label} {help id="id-language"}<br /> | |
6de4fe34 | 49 | {$form.language.html|crmAddClass:big} |
c00b95ef ML |
50 | </td> |
51 | </tr> | |
52 | {/if} | |
53 | ||
6a488035 TO |
54 | {* campaign in mailing search *} |
55 | {include file="CRM/Campaign/Form/addCampaignToComponent.tpl" | |
6de4fe34 | 56 | campaignContext="componentSearch" campaignTrClass='' campaignTdClass=''} |
6a488035 TO |
57 | |
58 | <tr> | |
6de4fe34 | 59 | <td>{$form.buttons.html}</td><td colspan="2"></td> |
6a488035 | 60 | </tr> |
6de4fe34 | 61 | </table> |
6a488035 | 62 | </div> |
6ff6d85a DS |
63 | |
64 | {literal} | |
65 | <script type="text/javascript"> | |
32678ccb CW |
66 | CRM.$(function($) { |
67 | var archiveOption = $("input[name^='is_archived']:radio"); | |
68 | $('#status_unscheduled').change(function() { | |
69 | if ($(this).prop('checked') ) { | |
4a143c04 | 70 | archiveOption.prop({checked: false, disabled: true}).change(); |
6ff6d85a | 71 | } else { |
4a143c04 | 72 | archiveOption.prop('disabled', false); |
6ff6d85a DS |
73 | } |
74 | }).trigger('change'); | |
75 | archiveOption.change(function() { | |
32678ccb CW |
76 | if ($("input[name^='is_archived']:radio:checked").length) { |
77 | $('#status_unscheduled').prop({checked: false, disabled: true}).change(); | |
753f3087 | 78 | } else { |
32678ccb | 79 | $('#status_unscheduled').prop('disabled', false); |
6ff6d85a DS |
80 | } |
81 | }).trigger('change'); | |
6ff6d85a | 82 | }); |
6ff6d85a DS |
83 | </script> |
84 | {/literal} |