Also keep working for previous tag names

This commit is contained in:
nathan 2023-01-05 14:21:38 -07:00
parent f8a8a290ce
commit 10ad1ae7c4
2 changed files with 4 additions and 3 deletions

View File

@ -68,7 +68,7 @@ class Checkbox extends Etemplate\Widget
// defaults for set and unset values
$selected_value = true;
$unselected_value = false;
if(array_key_exists($value_attr, $this->attrs) || array_key_exists('unselectedValue', $this->attrs))
if(array_key_exists($value_attr, $this->attrs) || array_key_exists('unselectedValue', $this->attrs) || array_key_exists('unselected_value', $this->attrs))
{
if(array_key_exists($value_attr, $this->attrs))
{
@ -130,4 +130,5 @@ class Checkbox extends Etemplate\Widget
}
}
Etemplate\Widget::registerWidget(__NAMESPACE__ . '\\Checkbox', array('et2-checkbox', 'et2-radio', 'et2-switch'));
Etemplate\Widget::registerWidget(__NAMESPACE__ . '\\Checkbox', array('et2-checkbox', 'et2-radio', 'et2-switch',
'checkbox', 'radio'));

View File

@ -89,7 +89,7 @@ class Date extends Transformer
*/
public function set_row_value($cname, array $expand, array &$data)
{
if($this->type == 'et2-date-duration')
if(in_array($this->type, ['et2-date-duration', 'date-duration']))
{
return;
}