From 49ffcdeebd9ad02b5ea3d115d5f6093d554d6ac3 Mon Sep 17 00:00:00 2001 From: Stephan Kasdorf Date: Sat, 5 Sep 2020 16:51:04 +0200 Subject: [PATCH] Version 0.9.5 beta - added opening and closing div to be put anywhere in the form, fixed some configuration bugs, and warnings in the autoloading class, missing file implementation. --- core/f/form.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/core/f/form.php b/core/f/form.php index 7b46bc8..4124bf2 100644 --- a/core/f/form.php +++ b/core/f/form.php @@ -2,6 +2,7 @@ namespace Nibiru\Factory; use Nibiru\Form\TypeButton; use Nibiru\Form\TypeCheckbox; +use Nibiru\Form\TypeCloseDiv; use Nibiru\Form\TypeColor; use Nibiru\Form\TypeDatetime; use Nibiru\Form\TypeEmail; @@ -10,6 +11,7 @@ use Nibiru\Form\TypeHidden; use Nibiru\Form\TypeImageSubmit; use Nibiru\Form\TypeLabel; use Nibiru\Form\TypeNumber; +use Nibiru\Form\TypeOpenDiv; use Nibiru\Form\TypeOption; use Nibiru\Form\TypePassword; use Nibiru\Form\TypeRadio; @@ -485,4 +487,23 @@ class Form self::setElement( new TypeLabel() ); self::assemble( self::getElement()->loadElement( $attributes ) ); } + + /** + * @desc adds an opening div to the form element + * @param $attributes + */ + public static function addOpenDiv( $attributes ) + { + self::setElement( new TypeOpenDiv() ); + self::assemble( self::getElement()->loadElement( $attributes ) ); + } + + /** + * @desc adds a closing div to the form element + */ + public static function addCloseDiv( ) + { + self::setElement( new TypeCloseDiv() ); + self::assemble( self::getElement()->loadElement( false ) ); + } }