Merge pull request #14669 from civicrm/5.15
[civicrm-core.git] / templates / CRM / Admin / Form / Navigation.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 {* Template for adding/editing a CiviCRM Navigation Menu Item *}
27 <div class="crm-block crm-form-block crm-navigation-form-block">
28 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
29 <table class="form-layout-compressed">
30 <tr class="crm-navigation-form-block-label">
31 <td class="label">{$form.label.label}</td><td>{$form.label.html}</td>
32 </tr>
33 <tr class="crm-navigation-form-block-url">
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>
36 </tr>
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>
41 {if $form.parent_id.html}
42 <tr class="crm-navigation-form-block-parent_id">
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>
45 </tr>
46 {/if}
47 <tr class="crm-navigation-form-block-has_separator">
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>
50 </tr>
51 <tr class="crm-navigation-form-block-permission">
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>
54 </tr>
55 <tr class="crm-navigation-form-block-is_active">
56 <td class="label">{$form.is_active.label}</td><td>{$form.is_active.html}</td>
57 </tr>
58 </table>
59 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
60 </div>
61 {literal}
62 <script type="text/javascript">
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 })
69 .change();
70 });
71 </script>
72 {/literal}