Allow disabling toggles, add toggle fieldset component

This commit is contained in:
Râu Cao
2023-03-12 13:41:36 +07:00
committed by Gitea
parent 805733939c
commit e758e258a8
5 changed files with 41 additions and 20 deletions

View File

@@ -15,24 +15,20 @@
<% end %>
<ul role="list" class="mt-2 divide-y divide-gray-200">
<li class="flex items-center justify-between py-6">
<div class="flex flex-col">
<label class="font-bold mb-1">Enable LNDHub integration</label>
<p class="text-gray-500">LNDHub configuration present and wallet features enabled</p>
</div>
<%= f.check_box :lndhub_enabled, checked: Setting.lndhub_enabled?,
disabled: true,
class: "relative ml-4 inline-flex flex-shrink-0" %>
</li>
<li class="flex items-center justify-between py-6">
<div class="flex flex-col">
<label class="font-bold mb-1">Enable LNDHub admin panel</label>
<p class="text-gray-500">LNDHub database configuration present and admin panel enabled</p>
</div>
<%= f.check_box :lndhub_admin_enabled, checked: Setting.lndhub_admin_enabled?,
disabled: true,
class: "relative ml-4 inline-flex flex-shrink-0" %>
</li>
<%= render FormElements::FieldsetToggleComponent.new(
tag: "li",
enabled: Setting.lndhub_enabled?,
input_enabled: false,
title: "Enable LNDHub integration",
description: "LNDHub configuration present and wallet features enabled"
) %>
<%= render FormElements::FieldsetToggleComponent.new(
tag: "li",
enabled: Setting.lndhub_admin_enabled?,
input_enabled: false,
title: "Enable LNDHub admin panel",
description: "LNDHub database configuration present and admin panel enabled"
) %>
</ul>
<% end %>
</section>