mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-04 20:36:03 +01:00
fix for admin plugin toggle showing in admin (issue #9)
This commit is contained in:
@@ -11,17 +11,6 @@ keywords: admin, plugin, manager, panel
|
||||
form:
|
||||
validation: strict
|
||||
fields:
|
||||
enabled:
|
||||
type: toggle
|
||||
label: Plugin status
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: Enabled
|
||||
0: Disabled
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
route:
|
||||
type: text
|
||||
label: Administrator path
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
<span class="gpm-version">v{{ plugin.version }}</span>
|
||||
</td>
|
||||
<td class="gpm-actions">
|
||||
{% if (plugin.form.fields.enabled) %}
|
||||
<a class="{{ data.get('enabled') ? 'enabled' : 'disabled' }}" href="{{ base_url_relative }}/plugins/{{ slug }}/task:{{ data.get('enabled') ? 'disable' : 'enable' }}">
|
||||
<i class="fa fa-fw fa-toggle-{{ data.get('enabled') ? 'on' : 'off' }}"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user