NEW formconfirm can support field with format datetime
This commit is contained in:
parent
9f02bd2350
commit
b8b1eb6035
@ -5001,7 +5001,7 @@ class Form
|
||||
* @param string $question Question
|
||||
* @param string $action Action
|
||||
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
|
||||
* 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss',
|
||||
* 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'datetime', 'select', 'multiselect', 'morecss',
|
||||
* 'other', 'onecolumn' or 'hidden'...
|
||||
* @param int|string $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0
|
||||
* @param int|string $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
|
||||
@ -5132,11 +5132,11 @@ class Form
|
||||
$more .= '</div></div>'."\n";
|
||||
$i++;
|
||||
}
|
||||
} elseif ($input['type'] == 'date') {
|
||||
} elseif ($input['type'] == 'date' || $input['type'] == 'datetime') {
|
||||
$more .= '<div class="tagtr"><div class="tagtd'.(empty($input['tdclass']) ? '' : (' '.$input['tdclass'])).'">'.$input['label'].'</div>';
|
||||
$more .= '<div class="tagtd">';
|
||||
$addnowlink = (empty($input['datenow']) ? 0 : 1);
|
||||
$more .= $this->selectDate($input['value'], $input['name'], 0, 0, 0, '', 1, $addnowlink);
|
||||
$more .= $this->selectDate($input['value'], $input['name'], ($input['type'] == 'datetime' ? 1 : 0), ($input['type'] == 'datetime' ? 1 : 0), 0, '', 1, $addnowlink);
|
||||
$more .= '</div></div>'."\n";
|
||||
$formquestion[] = array('name'=>$input['name'].'day');
|
||||
$formquestion[] = array('name'=>$input['name'].'month');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user