Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
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 | {if $action eq 1 or $action eq 2 or $action eq 4 or $action eq 8} | |
27 | {include file="CRM/Custom/Form/Option.tpl"} | |
28 | {/if} | |
29 | ||
30 | {if $customOption} | |
31 | {if $reusedNames} | |
32 | <div class="message status"> | |
33 | <div class="icon inform-icon"></div> {ts 1=$reusedNames}These Multiple Choice Options are shared by the following custom fields: %1{/ts} | |
34 | </div> | |
35 | {/if} | |
36 | ||
37 | <div id="field_page"> | |
38 | <p></p> | |
39 | <div class="form-item"> | |
40 | {strip} | |
41 | {* handle enable/disable actions*} | |
4d17a233 CW |
42 | {include file="CRM/common/enableDisableApi.tpl"} |
43 | {include file="CRM/common/crmeditable.tpl"} | |
16850d34 | 44 | <table class="selector row-highlight"> |
6a488035 TO |
45 | <tr class="columnheader"> |
46 | <th>{ts}Label{/ts}</th> | |
47 | <th>{ts}Value{/ts}</th> | |
48 | <th>{ts}Default{/ts}</th> | |
49 | <th>{ts}Order{/ts}</th> | |
50 | <th>{ts}Enabled?{/ts}</th> | |
51 | <th> </th> | |
52 | </tr> | |
53 | {foreach from=$customOption item=row key=id} | |
54 | <tr id="OptionValue-{$id}"class="crm-entity {cycle values="odd-row,even-row"} {$row.class} crm-custom_option {if NOT $row.is_active} disabled{/if}"> | |
55 | <td><span class="crm-custom_option-label crm-editable crmf-label">{$row.label}</span></td> | |
65bdfcdc | 56 | <td><span class="crm-custom_option-value disabled-crm-editable" data-field="value" data-action="update">{$row.value}</span></td> |
6a488035 TO |
57 | <td class="crm-custom_option-default_value crmf-value">{$row.default_value}</td> |
58 | <td class="nowrap crm-custom_option-weight crmf-weight">{$row.weight}</td> | |
59 | <td id="row_{$id}_status" class="crm-custom_option-is_active crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
60 | <td>{$row.action|replace:'xx':$id}</td> | |
61 | </tr> | |
62 | {/foreach} | |
63 | </table> | |
64 | {/strip} | |
65 | ||
66 | <div class="action-link"> | |
fa3a5fe2 | 67 | <a href="{crmURL q="reset=1&action=add&fid=$fid&gid=$gid"}" class="button action-item"><span><div class="icon add-icon"></div> {ts 1=$fieldTitle}Add Option for '%1'{/ts}</span></a> |
e5e8ab99 | 68 | <a href="{crmURL p="civicrm/admin/custom/group/field" q="reset=1&action=browse&gid=$gid"}" class="button action-item cancel"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a> |
6a488035 TO |
69 | </div> |
70 | </div> | |
71 | </div> | |
72 | ||
73 | {else} | |
74 | {if $action eq 16} | |
75 | <div class="messages status no-popup"> | |
76 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> | |
fa3a5fe2 | 77 | {capture assign=crmURL}{crmURL p='civicrm/admin/custom/group/field/option' q="action=add&fid=$fid&gid=$gid"}{/capture}{ts 1=$fieldTitle 2=$crmURL}There are no multiple choice options for the custom field '%1', <a href='%2' class="action-item">add one</a>.{/ts} |
6a488035 TO |
78 | </div> |
79 | {/if} | |
80 | {/if} |