Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
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 | *} | |
3ad3ccef | 26 | {* Template for adding/editing a CiviCRM Navigation Menu Item *} |
6a488035 | 27 | <div class="crm-block crm-form-block crm-navigation-form-block"> |
3ad3ccef CW |
28 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> |
29 | <table class="form-layout-compressed"> | |
6a488035 | 30 | <tr class="crm-navigation-form-block-label"> |
3ad3ccef | 31 | <td class="label">{$form.label.label}</td><td>{$form.label.html}</td> |
6a488035 TO |
32 | </tr> |
33 | <tr class="crm-navigation-form-block-url"> | |
3ad3ccef CW |
34 | <td class="label">{$form.url.label} {help id="id-menu_url" file="CRM/Admin/Form/Navigation.hlp"}</td> |
35 | <td>{$form.url.html} </td> | |
6a488035 | 36 | </tr> |
4926ede8 O |
37 | <tr class="crm-navigation-form-block-icon"> |
38 | <td class="label">{$form.icon.label} {help id="id-menu_icon" file="CRM/Admin/Form/Navigation.hlp"}</td> | |
39 | <td>{$form.icon.html} </td> | |
40 | </tr> | |
2c8776f0 | 41 | {if $form.parent_id.html} |
3ad3ccef | 42 | <tr class="crm-navigation-form-block-parent_id"> |
2c8776f0 CW |
43 | <td class="label">{$form.parent_id.label} {help id="id-parent" file="CRM/Admin/Form/Navigation.hlp"}</td> |
44 | <td>{$form.parent_id.html}</td> | |
3ad3ccef | 45 | </tr> |
6a488035 TO |
46 | {/if} |
47 | <tr class="crm-navigation-form-block-has_separator"> | |
3ad3ccef CW |
48 | <td class="label">{$form.has_separator.label} {help id="id-has_separator" file="CRM/Admin/Form/Navigation.hlp"}</td> |
49 | <td>{$form.has_separator.html} </td> | |
6a488035 TO |
50 | </tr> |
51 | <tr class="crm-navigation-form-block-permission"> | |
3ad3ccef CW |
52 | <td class="label">{$form.permission.label} {help id="id-menu_permission" file="CRM/Admin/Form/Navigation.hlp"}</td> |
53 | <td>{$form.permission.html} <span class="permission_operator_wrapper">{$form.permission_operator.html} {help id="id-permission_operator" file="CRM/Admin/Form/Navigation.hlp"}</span></td> | |
6a488035 TO |
54 | </tr> |
55 | <tr class="crm-navigation-form-block-is_active"> | |
3ad3ccef | 56 | <td class="label">{$form.is_active.label}</td><td>{$form.is_active.html}</td> |
6a488035 | 57 | </tr> |
3ad3ccef CW |
58 | </table> |
59 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> | |
232624b1 | 60 | </div> |
2c8776f0 CW |
61 | {literal} |
62 | <script type="text/javascript"> | |
3ad3ccef CW |
63 | CRM.$(function($) { |
64 | var $form = $('form.{/literal}{$form.formClass}{literal}'); | |
65 | $('input[name=permission]', $form) | |
66 | .on('change', function() { | |
67 | $('span.permission_operator_wrapper').toggle(CRM._.includes($(this).val(), ',')); | |
68 | }) | |
11b9f280 | 69 | .change(); |
3ad3ccef | 70 | }); |
2c8776f0 CW |
71 | </script> |
72 | {/literal} |