Merge pull request #13427 from chamilwijesooriya/issue-652
[civicrm-core.git] / templates / CRM / Case / Form / Case.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2019 |
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 $action neq 8 && $action neq 32768}
33 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
34 {/if}
35
36 <h3>{if $action eq 8}{ts}Delete Case{/ts}{elseif $action eq 32768}{ts}Restore Case{/ts}{/if}</h3>
37 {if $action eq 8 or $action eq 32768 }
38 <div class="messages status no-popup">
39 <div class="icon inform-icon"></div>
40 {if $action eq 8}
41 {ts}Click Delete to move this case and all associated activities to the Trash.{/ts}
42 {else}
43 {ts}Click Restore to retrieve this case and all associated activities from the Trash.{/ts}
44 {/if}
45 </div>
46 {else}
47 <table class="form-layout">
48 {if $activityTypeDescription }
49 <tr>
50 <div class="help">{$activityTypeDescription}</div>
51 </tr>
52 {/if}
53 {if $clientName}
54 <tr class="crm-case-form-block-clientName">
55 <td class="label font-size12pt">{ts}Client{/ts}</td>
56 <td class="font-size12pt bold view-value">{$clientName}</td>
57 </tr>
58 {elseif !$clientName and $action eq 1}
59 {if $context eq 'standalone'}
60 <td class="label">{$form.client_id.label}</td>
61 <td class="view-value">{$form.client_id.html}</td>
62 {/if}
63 {/if}
64 {* activity fields *}
65 {if $form.medium_id.html and $form.activity_location.html}
66 <tr class="crm-case-form-block-medium_id">
67 <td class="label">{$form.medium_id.label}</td>
68 <td class="view-value">{$form.medium_id.html}&nbsp;&nbsp;&nbsp;{$form.activity_location.label} &nbsp;{$form.activity_location.html}</td>
69 </tr>
70 {/if}
71
72 {if $form.activity_details.html}
73 <tr class="crm-case-form-block-activity_details">
74 <td class="label">{$form.activity_details.label}{help id="id-details" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
75 <td class="view-value">{$form.activity_details.html|crmStripAlternatives}</td>
76 </tr>
77 {/if}
78
79 {* custom data group *}
80 {if $groupTree}
81 <tr>
82 <td colspan="2">{include file="CRM/Custom/Form/CustomData.tpl"}</td>
83 </tr>
84 {/if}
85
86 {if $form.activity_subject.html}
87 <tr class="crm-case-form-block-activity_subject">
88 <td class="label">{$form.activity_subject.label}{help id="id-activity_subject" activityTypeFile=$activityTypeFile file="CRM/Case/Form/Case.hlp"}</td>
89 <td>{$form.activity_subject.html|crmAddClass:huge}</td>
90 </tr>
91 {/if}
92
93 {* inject activity type-specific form fields *}
94 {if $activityTypeFile}
95 {include file="CRM/Case/Form/Activity/$activityTypeFile.tpl"}
96 {/if}
97
98 {if $form.duration.html}
99 <tr class="crm-case-form-block-duration">
100 <td class="label">{$form.duration.label}</td>
101 <td class="view-value">
102 {$form.duration.html}
103 <span class="description">{ts}minutes{/ts}</span>
104 </td>
105 </tr>
106 {/if}
107
108 {if $form.tag.html}
109 <tr class="crm-case-form-block-tag">
110 <td class="label">{$form.tag.label}</td>
111 <td class="view-value"><div class="crm-select-container">{$form.tag.html}</div>
112 </td>
113 </tr>
114 {/if}
115
116 <tr class="crm-case-form-block-custom_data">
117 <td colspan="2">
118 {include file="CRM/common/customDataBlock.tpl"}
119 </td>
120 </tr>
121
122 <tr class="crm-case-form-block-tag_set"><td colspan="2">{include file="CRM/common/Tagset.tpl" tagsetType='case'}</td></tr>
123
124 </table>
125 {/if}
126
127 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
128
129 </div>