From 72b6908899018af70395a8bb0ab047ea58303120 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 3 Sep 2019 18:35:30 +0200 Subject: [PATCH] Custom fields: Boolean type --- bl-kernel/admin/themes/booty/init.php | 9 +++++---- bl-kernel/admin/views/edit-content.php | 14 +++++++++++--- bl-kernel/admin/views/new-content.php | 16 ++++++++++++---- bl-kernel/admin/views/settings.php | 2 +- bl-kernel/boot/site.php | 2 -- bl-kernel/pages.class.php | 15 +++++++++++++-- bl-kernel/site.class.php | 5 +++-- 7 files changed, 45 insertions(+), 18 deletions(-) diff --git a/bl-kernel/admin/themes/booty/init.php b/bl-kernel/admin/themes/booty/init.php index 095cef36..00a3463a 100644 --- a/bl-kernel/admin/themes/booty/init.php +++ b/bl-kernel/admin/themes/booty/init.php @@ -264,7 +264,7 @@ EOF; { $labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:''; $placeholder = isset($args['placeholder'])?$args['placeholder']:''; - $tip = isset($args['tip'])?$args['tip']:' '; + $tip = isset($args['tip'])?''.$args['tip'].'':''; $value = isset($args['value'])?$args['value']:''; $name = $args['name']; $id = 'js'.$name; @@ -273,7 +273,7 @@ EOF; } $disabled = isset($args['disabled'])?'disabled':''; - $class = 'form-group'; + $class = 'form-group m-0'; if (isset($args['class'])) { $class = $class.' '.$args['class']; } @@ -289,14 +289,15 @@ EOF; } $checked = $args['checked']?'checked':''; + $value = $checked?'1':'0'; return << $label
- + - $tip + $tip
EOF; diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index 20bdfca1..0f9419b1 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -89,7 +89,7 @@ echo Bootstrap::formOpen(array( - customFields()!="{}"): ?> + customFields())): ?>