mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Support URL fields
This commit is contained in:
parent
78232c2ca2
commit
d77ca8aa3a
@ -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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user