- Removed /core from URL

- If UDf are not set in DB UDF view will not display them
- Removed placeholder from multiple dropdown widget
- Dropdown widget has null value as placeholder
- Added permission system/udf to checksystem
This commit is contained in:
Paolo
2017-08-01 18:25:23 +02:00
parent bba27f75e0
commit 66de1e18f8
8 changed files with 216 additions and 85 deletions
+22 -4
View File
@@ -781,6 +781,8 @@ class DropdownWidget extends Widget
// The name of the element of the data array given to the view
// this element is used to tell what element of the dropdown is selected
const SELECTED_ELEMENT = 'selectedElement';
//
const HTML_DEFAULT_VALUE = 'null';
const SIZE = 'size'; //
const MULTIPLE = 'multiple'; //
@@ -795,7 +797,7 @@ class DropdownWidget extends Widget
//
if (!isset($this->_args[DropdownWidget::SELECTED_ELEMENT]))
{
$this->_args[DropdownWidget::SELECTED_ELEMENT] = Widget::HTML_DEFAULT_VALUE;
$this->_args[DropdownWidget::SELECTED_ELEMENT] = DropdownWidget::HTML_DEFAULT_VALUE;
}
}
@@ -804,7 +806,23 @@ class DropdownWidget extends Widget
*/
public function setMultiple()
{
$this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] = 'multiple';
$this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] = DropdownWidget::MULTIPLE;
}
/**
*
*/
public function isMultipleDropdown()
{
$isMultipleDropdown = false;
if (isset($this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE])
&& $this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] == DropdownWidget::MULTIPLE)
{
$isMultipleDropdown = true;
}
return $isMultipleDropdown;
}
/**
@@ -835,7 +853,7 @@ class DropdownWidget extends Widget
* @param string $id value of the attribute value of the empty element
*/
protected function setElementsArray(
$elements, $emptyElement = false, $stdDescription = '' , $noDataDescription = 'No data found' , $id = Widget::HTML_DEFAULT_VALUE
$elements, $emptyElement = false, $stdDescription = '' , $noDataDescription = 'No data found' , $id = DropdownWidget::HTML_DEFAULT_VALUE
)
{
$tmpElements = array();
@@ -857,7 +875,7 @@ class DropdownWidget extends Widget
}
else
{
if ($emptyElement === true)
if ($emptyElement === true && $this->isMultipleDropdown() == false)
{
$tmpElements = $this->addElementAtBeginning(
$elements,