Support URL fields

This commit is contained in:
Oliver 2021-06-23 23:23:28 +10:00
parent 78232c2ca2
commit d77ca8aa3a

View File

@ -303,7 +303,7 @@ function constructInput(name, parameters, options={}) {
func = constructTextInput; func = constructTextInput;
break; break;
case 'url': case 'url':
// TODO - url input func = constructTextInput;
break; break;
case 'email': case 'email':
// TODO - email input // TODO - email input
@ -401,10 +401,24 @@ function constructCheckboxInput(name, parameters, options={}) {
// Construct a "text" input // Construct a "text" input
function constructTextInput(name, parameters, options={}) { function constructTextInput(name, parameters, options={}) {
var classes = '';
var type = '';
switch (parameters.type) {
default:
classes = 'textinput textInput form-control';
type = 'text';
break;
case 'url':
classes = 'urlinput form-control';
type = 'url';
break;
}
return constructInputOptions( return constructInputOptions(
name, name,
'textinput textInput form-control', classes,
'text', type,
parameters parameters
); );
} }