mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch 'ent-8486-datos-discovery-sap-al-reves' into 'develop'
patterns for text inputs See merge request artica/pandorafms!4655
This commit is contained in:
commit
cc2685676a
@ -2320,6 +2320,7 @@ function html_print_input_text_extended(
|
|||||||
'autocomplete',
|
'autocomplete',
|
||||||
'form',
|
'form',
|
||||||
'list',
|
'list',
|
||||||
|
'pattern',
|
||||||
];
|
];
|
||||||
|
|
||||||
$output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" autocomplete="'.$autocomplete.'"');
|
$output = '<input '.($password ? 'type="password" autocomplete="'.$autocomplete.'" ' : 'type="text" autocomplete="'.$autocomplete.'"');
|
||||||
@ -2604,13 +2605,16 @@ function html_print_input_password(
|
|||||||
*
|
*
|
||||||
* The element will have an id like: "text-$name"
|
* The element will have an id like: "text-$name"
|
||||||
*
|
*
|
||||||
* @param string $name Input name.
|
* @param string $name Input name.
|
||||||
* @param string $value Input value.
|
* @param string $value Input value.
|
||||||
* @param string $alt Alternative HTML string (invalid - not used).
|
* @param string $alt Alternative HTML string (invalid - not used).
|
||||||
* @param integer $size Size of the input (optional).
|
* @param integer $size Size of the input (optional).
|
||||||
* @param integer $maxlength Maximum length allowed (optional).
|
* @param integer $maxlength Maximum length allowed (optional).
|
||||||
* @param boolean $return Whether to return an output string or echo now (optional, echo by default).
|
* @param boolean $return Whether to return an output string or echo now (optional, echo by default).
|
||||||
* @param boolean $disabled Disable the button (optional, button enabled by default).
|
* @param boolean $disabled Disable the button (optional, button enabled by default).
|
||||||
|
* @param string|null $list Some stuff.
|
||||||
|
* @param string|null $placeholder Some stuff.
|
||||||
|
* @param string|null $pattern Some stuff.
|
||||||
*
|
*
|
||||||
* @return string HTML code if return parameter is true.
|
* @return string HTML code if return parameter is true.
|
||||||
*/
|
*/
|
||||||
@ -2633,7 +2637,8 @@ function html_print_input_text(
|
|||||||
$onKeyUp='',
|
$onKeyUp='',
|
||||||
$disabled=false,
|
$disabled=false,
|
||||||
$list='',
|
$list='',
|
||||||
$placeholder=null
|
$placeholder=null,
|
||||||
|
$pattern=null
|
||||||
) {
|
) {
|
||||||
if ($maxlength == 0) {
|
if ($maxlength == 0) {
|
||||||
$maxlength = 255;
|
$maxlength = 255;
|
||||||
@ -2682,6 +2687,10 @@ function html_print_input_text(
|
|||||||
$attr['placeholder'] = $placeholder;
|
$attr['placeholder'] = $placeholder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($pattern !== null) {
|
||||||
|
$attr['pattern'] = $pattern;
|
||||||
|
}
|
||||||
|
|
||||||
return html_print_input_text_extended(
|
return html_print_input_text_extended(
|
||||||
$name,
|
$name,
|
||||||
$value,
|
$value,
|
||||||
@ -4700,7 +4709,8 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||||||
((isset($data['onKeyUp']) === true) ? $data['onKeyUp'] : ''),
|
((isset($data['onKeyUp']) === true) ? $data['onKeyUp'] : ''),
|
||||||
((isset($data['disabled']) === true) ? $data['disabled'] : false),
|
((isset($data['disabled']) === true) ? $data['disabled'] : false),
|
||||||
((isset($data['list']) === true) ? $data['list'] : ''),
|
((isset($data['list']) === true) ? $data['list'] : ''),
|
||||||
((isset($data['placeholder']) === true) ? $data['placeholder'] : '')
|
((isset($data['placeholder']) === true) ? $data['placeholder'] : ''),
|
||||||
|
((isset($data['pattern']) === true) ? $data['pattern'] : null)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user