commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / templates / CRM / Case / Form / Case.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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 {* Base template for Open Case. May be used for other special activity types at some point ..
27 Note: 1. We will include all the activity fields here however each activity type file may build (via php) only those required by them.
28 2. Each activity type file can include its case fields in its own template, so that they will be included during activity edit.
29 *}
30 <div class="crm-block crm-form-block crm-case-form-block">
31
32 {if $cdType }
33 {include file="CRM/Custom/Form/CustomData.tpl"}
34 {else}
35
36 {if $action neq 8 && $action neq 32768}
37 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
38 {/if}
39
40 <h3>{if $action eq 8}{ts}Delete Case{/ts}{elseif $action eq 32768}{ts}Restore Case{/ts}{/if}</h3>
41 {if $action eq 8 or $action eq 32768 }
42 <div class="messages status no-popup">
43 <div class="icon inform-icon"></div>
44 {if $action eq 8}
45 {ts}Click Delete to move this case and all associated activities to the Trash.{/ts}
46 {else}
47 {ts}Click Restore to retrieve this case and all associated activities from the Trash.{/ts}
48 {/if}
49 </div>
50 {else}
51 <table class="form-layout">
52 {if $activityTypeDescription }
53 <tr>
54 <div id="help">{$activityTypeDescription}</div>
55 </tr>
56 {/if}
57 {if $clientName}
58 <tr class="crm-case-form-block-clientName">
59 <td class="label font-size12pt">{ts}Client{/ts}</td>
60 <td class="font-size12pt bold view-value">{$clientName}</td>
61 </tr>
62 {elseif !$clientName and $action eq 1}
63 {if $context eq 'standalone'}
64 <td class="label">{$form.client_id.label}</td>
65 <td class="view-value">{$form.client_id.html}</td>
66 {/if}
67 {/if}
68 {* activity fields *}
69 {if $form.medium_id.html and $form.activity_location.html}
70 <tr class="crm-case-form-block-medium_id">
71 <td class="label">{$form.medium_id.label}</td>
72 <td class="view-value">{$form.medium_id.html}&nbsp;&nbsp;&nbsp;{$form.activity_location.label} &nbsp;{$form.activity_location.html}</td>
73 </tr>
74 {/if}
75
76 {if $form.activity_details.html}
77 <tr class="crm-case-form-block-activity_details">
78 <td class="label">{$form.activity_details.label}{help id="id-details" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
79 <td class="view-value">{if $defaultWysiwygEditor eq 0}{$form.activity_details.html|crmStripAlternatives|crmAddClass:huge40}{else}{$form.activity_details.html|crmStripAlternatives}{/if}</td>
80 </tr>
81 {/if}
82
83 {* custom data group *}
84 {if $groupTree}
85 <tr>
86 <td colspan="2">{include file="CRM/Custom/Form/CustomData.tpl"}</td>
87 </tr>
88 {/if}
89
90 {if $form.activity_subject.html}
91 <tr class="crm-case-form-block-activity_subject">
92 <td class="label">{$form.activity_subject.label}{help id="id-activity_subject" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
93 <td>{$form.activity_subject.html|crmAddClass:huge}</td>
94 </tr>
95 {/if}
96
97 {* inject activity type-specific form fields *}
98 {if $activityTypeFile}
99 {include file="CRM/Case/Form/Activity/$activityTypeFile.tpl"}
100 {/if}
101
102 {if $form.duration.html}
103 <tr class="crm-case-form-block-duration">
104 <td class="label">{$form.duration.label}</td>
105 <td class="view-value">
106 {$form.duration.html}
107 <span class="description">{ts}minutes{/ts}</span>
108 </td>
109 </tr>
110 {/if}
111
112 {if $form.tag.html}
113 <tr class="crm-case-form-block-tag">
114 <td class="label">{$form.tag.label}</td>
115 <td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
116 </td>
117 </tr>
118 {/if}
119
120 <tr class="crm-case-form-block-custom_data">
121 <td colspan="2">
122 <div id="customData"></div>
123 </td>
124 </tr>
125
126 <tr class="crm-case-form-block-tag_set"><td colspan="2">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</td></tr>
127
128 </table>
129 {/if}
130
131 {if $action eq 1}
132 {*include custom data js file*}
133 {include file="CRM/common/customData.tpl"}
134 {literal}
135 <script type="text/javascript">
136 CRM.$(function($) {
137 var customDataSubType = $('#case_type_id').val();
138 if ( customDataSubType ) {
139 CRM.buildCustomData( {/literal}'{$customDataType}'{literal}, customDataSubType );
140 } else {
141 CRM.buildCustomData( {/literal}'{$customDataType}'{literal} );
142 }
143 });
144 </script>
145 {/literal}
146 {/if}
147
148 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
149
150 {/if}
151 </div>