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

This commit is contained in:
Stephan Kasdorf
2020-09-05 16:46:24 +02:00
parent 0fdb5f8121
commit 9366948b0b
6 changed files with 82 additions and 9 deletions

View File

@@ -31,7 +31,6 @@ class formsController extends Controller
'class' => 'input-text'
)
);
Form::addTypeLabel(
array(
'value' => 'Email',
@@ -39,7 +38,6 @@ class formsController extends Controller
'class' => 'contacts-label'
)
);
Form::addInputTypeText(
array(
'name' => 'email',
@@ -55,7 +53,7 @@ class formsController extends Controller
Form::addTypeButton(
array(
'class' => 'btn-block btn-info',
'name' => 'Send Message'
'value' => 'Send Message'
)
);

View File

@@ -30,6 +30,7 @@ dbmodel = "/../../application/model/"
module = "/../../application/module/[NAME]"
interfaces = "/../../application/module/[NAME]/interfaces/"
traits = "/../../application/module/[NAME]/traits/"
plugins = "/../../application/module/[NAME]/plugins/"
entriesperpage = 4
background.img[] = "public/img/nibiru3.jpg"
smarty.css[] = "public/css/v3/roboto.css"

View File

@@ -334,13 +334,16 @@ class Autoloader
{
foreach ($iterator as $item)
{
if(strstr($item->getFilename(), $pluginName))
if(!empty($pluginName))
{
if ($item->getFileName() != self::MY_FILE_NAME && $item->getFileName() != "." && $item->getFileName() != ".." && strstr($item->getFileName(), self::PHP_FILE_EXTENSION)) {
$plugins[] = array(
'nfilename' => str_replace('.php', '', $item->getFileName()),
'filepathname' => $item->getPath() . '/' . $item->getFileName()
);
if(strstr($item->getFilename(), $pluginName))
{
if ($item->getFileName() != self::MY_FILE_NAME && $item->getFileName() != "." && $item->getFileName() != ".." && strstr($item->getFileName(), self::PHP_FILE_EXTENSION)) {
$plugins[] = array(
'nfilename' => str_replace('.php', '', $item->getFileName()),
'filepathname' => $item->getPath() . '/' . $item->getFileName()
);
}
}
}
}

31
core/c/typeclosediv.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace Nibiru\Form;
use Nibiru\Adapter;
/**
* Copyright 2020 Nibiru Framework
* Licence: BSD 4-Old License
* Author: Stephan Kasdorf
* File: typeclosediv.php
* Date: 05.09.20
*/
class TypeCloseDiv extends FormAttributes implements IForm
{
/**
* @param $attributes
* @return mixed
*/
public function loadElement($attributes)
{
parent::__construct( );
$this->_setElement();
return $this->getElement();
}
/**
* just a closing div element
*/
private function _setElement( )
{
$this->_element = '</div>' . "\n";
}
}

38
core/c/typeopendiv.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
namespace Nibiru\Form;
use Nibiru\Adapter;
/**
* Copyright 2020 Nibiru Framework
* Licence: BSD 4-Old License
* Author: Stephan Kasdorf
* File: typeopendiv.php
* Date: 05.09.20
*/
class TypeOpenDiv extends FormAttributes implements IForm
{
private $_attributes = array(
self::FORM_VALUE => '',
self::FORM_ATTRIBUTE_ID => '',
self::FORM_ATTRIBUTE_CLASS => ''
);
/**
* @param $attributes
* @return mixed
*/
public function loadElement($attributes)
{
parent::__construct( $this->_attributes );
$this->_setElement();
$this->_setAttributes( self::loadAttributeValues( $attributes ) );
return $this->getElement();
}
/**
* just the opening div element
*/
private function _setElement( )
{
$this->_element = '<div ID CLASS>' . "\n";
}
}

View File

@@ -81,6 +81,8 @@ require_once __DIR__ . '/c/typeselect.php';
require_once __DIR__ . '/c/typerange.php';
require_once __DIR__ . '/c/typeurl.php';
require_once __DIR__ . '/c/typelabel.php';
require_once __DIR__ . '/c/typeopendiv.php';
require_once __DIR__ . '/c/typeclosediv.php';
require_once __DIR__ . '/i/view.php';
require_once __DIR__ . '/c/view.php';
require_once __DIR__ . '/i/controller.php';