Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
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 | {* This file provides the plugin for the communication preferences in all the three types of contact *} | |
27 | {* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *} | |
28 | ||
29 | <div class="crm-accordion-wrapper crm-commPrefs-accordion collapsed"> | |
30 | <div class="crm-accordion-header"> | |
31 | {$title} | |
32 | </div><!-- /.crm-accordion-header --> | |
33 | <div id="commPrefs" class="crm-accordion-body"> | |
34 | <table class="form-layout-compressed" > | |
aa62b355 OB |
35 | {if !empty($form.communication_style_id)} |
36 | <tr><td colspan='4'> | |
37 | <span class="label">{$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"}</span> | |
38 | <span class="value">{$form.communication_style_id.html}</span> | |
39 | </td><tr> | |
40 | {/if} | |
6a488035 TO |
41 | <tr> |
42 | {if !empty($form.email_greeting_id)} | |
43 | <td>{$form.email_greeting_id.label}</td> | |
44 | {/if} | |
45 | {if !empty($form.postal_greeting_id)} | |
46 | <td>{$form.postal_greeting_id.label}</td> | |
47 | {/if} | |
48 | {if !empty($form.addressee_id)} | |
49 | <td>{$form.addressee_id.label}</td> | |
50 | {/if} | |
51 | {if !empty($form.email_greeting_id) OR !empty($form.postal_greeting_id) OR !empty($form.addressee_id)} | |
52 | <td> {help id="id-greeting" file="CRM/Contact/Form/Contact.hlp"}</td> | |
53 | {/if} | |
54 | </tr> | |
55 | <tr> | |
56 | {if !empty($form.email_greeting_id)} | |
57 | <td> | |
58 | <span id="email_greeting" {if !empty($email_greeting_display) and $action eq 2} class="hiddenElement"{/if}>{$form.email_greeting_id.html|crmAddClass:big}</span> | |
59 | {if !empty($email_greeting_display) and $action eq 2} | |
3f98995a CW |
60 | <div data-id="email_greeting" class="replace-plain" title="{ts}Click to edit{/ts}"> |
61 | {$email_greeting_display} | |
62 | </div> | |
6a488035 TO |
63 | {/if} |
64 | </td> | |
65 | {/if} | |
66 | {if !empty($form.postal_greeting_id)} | |
67 | <td> | |
68 | <span id="postal_greeting" {if !empty($postal_greeting_display) and $action eq 2} class="hiddenElement"{/if}>{$form.postal_greeting_id.html|crmAddClass:big}</span> | |
69 | {if !empty($postal_greeting_display) and $action eq 2} | |
3f98995a CW |
70 | <div data-id="postal_greeting" class="replace-plain" title="{ts}Click to edit{/ts}"> |
71 | {$postal_greeting_display} | |
72 | </div> | |
6a488035 TO |
73 | {/if} |
74 | </td> | |
75 | {/if} | |
76 | {if !empty($form.addressee_id)} | |
77 | <td> | |
78 | <span id="addressee" {if !empty($addressee_display) and $action eq 2} class="hiddenElement"{/if}>{$form.addressee_id.html|crmAddClass:big}</span> | |
79 | {if !empty($addressee_display) and $action eq 2} | |
3f98995a CW |
80 | <div data-id="addressee" class="replace-plain" title="{ts}Click to edit{/ts}"> |
81 | {$addressee_display} | |
82 | </div> | |
6a488035 TO |
83 | {/if} |
84 | </td> | |
85 | {/if} | |
86 | </tr> | |
87 | <tr id="greetings1" class="hiddenElement"> | |
88 | {if !empty($form.email_greeting_custom)} | |
89 | <td><span id="email_greeting_id_label" class="hiddenElement">{$form.email_greeting_custom.label}</span></td> | |
90 | {/if} | |
91 | {if !empty($form.postal_greeting_custom)} | |
92 | <td><span id="postal_greeting_id_label" class="hiddenElement">{$form.postal_greeting_custom.label}</span></td> | |
93 | {/if} | |
94 | {if !empty($form.addressee_custom)} | |
95 | <td><span id="addressee_id_label" class="hiddenElement">{$form.addressee_custom.label}</span></td> | |
96 | {/if} | |
97 | </tr> | |
98 | <tr id="greetings2" class="hiddenElement"> | |
99 | {if !empty($form.email_greeting_custom)} | |
100 | <td><span id="email_greeting_id_html" class="hiddenElement">{$form.email_greeting_custom.html|crmAddClass:big}</span></td> | |
101 | {/if} | |
102 | {if !empty($form.postal_greeting_custom)} | |
103 | <td><span id="postal_greeting_id_html" class="hiddenElement">{$form.postal_greeting_custom.html|crmAddClass:big}</span></td> | |
104 | {/if} | |
105 | {if !empty($form.addressee_custom)} | |
106 | <td><span id="addressee_id_html" class="hiddenElement">{$form.addressee_custom.html|crmAddClass:big}</span></td> | |
107 | {/if} | |
108 | </tr> | |
109 | <tr> | |
110 | {foreach key=key item=item from=$commPreference} | |
111 | <td> | |
112 | <br /><span class="label">{$form.$key.label}</span> {help id="id-$key" file="CRM/Contact/Form/Contact.hlp"} | |
113 | {foreach key=k item=i from=$item} | |
114 | <br />{$form.$key.$k.html} | |
115 | {/foreach} | |
116 | </td> | |
117 | {/foreach} | |
118 | <td> | |
119 | <br /><span class="label">{$form.preferred_language.label}</span> | |
120 | <br />{$form.preferred_language.html} | |
121 | </td> | |
122 | </tr> | |
123 | <tr> | |
124 | <td>{$form.is_opt_out.html} {$form.is_opt_out.label} {help id="id-optOut" file="CRM/Contact/Form/Contact.hlp"}</td> | |
a304f73d ML |
125 | {if !empty($form.preferred_mail_format)} |
126 | <td>{$form.preferred_mail_format.label} | |
127 | {$form.preferred_mail_format.html} {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"} | |
128 | </td> | |
129 | {/if} | |
6a488035 TO |
130 | </tr> |
131 | </table> | |
132 | </div><!-- /.crm-accordion-body --> | |
133 | </div><!-- /.crm-accordion-wrapper --> | |
3f98995a | 134 | {include file="CRM/Contact/Form/Edit/CommunicationPreferences.js.tpl"} |