handle extension conf parameters of type 'date'

This commit is contained in:
Uwe Steinmann 2023-09-27 11:30:45 +02:00
parent 929c93fdb9
commit 2213ea7e29

View File

@ -59,7 +59,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
$class = 'input-medium';
else
$class = 'input-small';
$html .= '<input '.($type=='password' ? 'type="password"' : ($type=='number' ? 'type="number"' : 'type="text"')).' class="form-control '.$class.'" name="'.$name.'" value="'.$value.'" placeholder="'.$placeholder.'"/>';
$html .= '<input '.($type=='password' ? 'type="password"' : ($type=='number' ? 'type="number"' : ($type=='color' ? 'type="color"' : 'type="text"'))).' class="form-control '.$class.'" name="'.$name.'" value="'.$value.'" placeholder="'.$placeholder.'"/>';
}
return $html;
} /* }}} */
@ -685,6 +685,12 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
case 'hook':
echo $this->callHook('showConfig', $confkey, $extname, $extconf);
break;
case "date":
$this->formField(
null,
$this->getDateChooser((isset($settings->_extensions[$extname][$confkey]) ? getReadableDate($settings->_extensions[$extname][$confkey]) : ''), "extensions[".$extname."][".$confkey."]", $this->params['session']->getLanguage())
);
break;
default:
$this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', isset($conf['type']) ? $conf['type'] : '', isset($conf['placeholder']) ? $conf['placeholder'] : '');
}