1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 11:36:08 +02:00

GUI styling fixes. Theme thumbnail preview corrected on missing preview images.

This commit is contained in:
Cameron
2017-02-01 08:54:28 -08:00
parent 1a0907368c
commit 30092ef372
10 changed files with 130 additions and 81 deletions

View File

@@ -794,10 +794,10 @@ class e_form
function number($name, $value=0, $maxlength = 200, $options = array())
{
if(is_string($options)) parse_str($options, $options);
if (vartrue($options['maxlength'])) $maxlength = $options['maxlength'];
if (empty($options['maxlength'])) $maxlength = $options['maxlength'];
unset($options['maxlength']);
if(!vartrue($options['size'])) $options['size'] = 15;
if(!vartrue($options['class'])) $options['class'] = 'tbox number e-spinner input-small form-control';
if(empty($options['size'])) $options['size'] = 15;
if(empty($options['class'])) $options['class'] = 'tbox number e-spinner input-small ';
if(!empty($options['size']))
{
@@ -805,6 +805,7 @@ class e_form
unset($options['size']);
}
$options['class'] .= " form-control";
$options['type'] ='number';
$mlength = vartrue($maxlength) ? "maxlength=".$maxlength : "";
@@ -817,7 +818,7 @@ class e_form
//never allow id in format name-value for text fields
if(deftrue('BOOTSTRAP'))
if(THEME_LEGACY === false)
{
return "<input pattern='[0-9]*' type='number' name='{$name}' value='{$value}' {$mlength} {$min} {$max} ".$this->get_attributes($options, $name)." />";
}
@@ -3350,7 +3351,7 @@ class e_form
// 'multiple' => false, - see case 'select'
);
$form_control = (deftrue('BOOTSTRAP') === 3) ? ' form-control' : '';
$form_control = (THEME_LEGACY !== true) ? ' form-control' : '';
switch ($type) {
case 'hidden':
@@ -3362,6 +3363,10 @@ class e_form
unset($def_options['selected'], $def_options['checked']);
break;
case 'number':
$def_options['class'] = 'tbox '.$form_control;
break;
case 'file':
$def_options['class'] = 'tbox file';
unset($def_options['selected'], $def_options['checked']);
@@ -5091,6 +5096,12 @@ class e_form
// Appending needs is performed and customized using function: beforeUpdate($new_data, $old_data, $id)
}
if(empty($parms['size']))
{
$parms['size'] = 'xxlarge';
}
$text .= vartrue($parms['pre']).$this->textarea($key, $value, vartrue($parms['rows'], 5), vartrue($parms['cols'], 40), vartrue($parms['__options'],$parms), varset($parms['counter'], false)).vartrue($parms['post']);
$ret = $text;
break;