Commit 081697cd authored by Sven Franck's avatar Sven Franck

fixed textarea field not being form-validated and highlighted

parent afa3558b
html body .ui-input-text.invalid,
html body .ui-select .ui-btn.invalid,
html body .required.invalid ~ label {
border: 1px solid red !important;
}
......
......@@ -271,7 +271,7 @@
"enabled": true,
"editable": true,
"external_validator": null,
"required": null,
"required": true,
"preserve_whitespace": null,
"unicode": null,
"maximum_lines": null,
......@@ -1052,7 +1052,7 @@
"enabled": true,
"editable": true,
"external_validator": null,
"required": null,
"required": true,
"preserve_whitespace": null,
"unicode": null,
"maximum_lines": null,
......
......@@ -869,7 +869,7 @@
config.attributes = {
"data-enhanced": "true",
"type": (prevail.widget.hidden || spec.widget.hidden) === true ?
"hidden" : type
"hidden" : (type || null)
};
config.logic = {
"data-vv-validations": validation_list || undefined,
......@@ -2052,26 +2052,12 @@
// TODO: crap to use both layout and children!
// NOTE: securing ? http://nedbatchelder.com/text/stopbots.html
factory.form = function (spec) {
var i,
j,
k,
layout,
element,
container,
area,
field,
overrides,
position,
doc,
config,
value,
stamp,
sauce,
encode,
secure = spec.property_dict.secure,
safety_box,
noscript,
fragment = factory.util.wrapInForm(spec),
var i, j, k, layout, element, container, area, field, overrides,
position, doc, config, value, stamp, sauce, encode, secure,
safety_box, noscript, fragment, wrap;
secure = spec.property_dict.secure;
fragment = factory.util.wrapInForm(spec);
wrap = function (area, captcha) {
var keys = {};
......@@ -2157,7 +2143,7 @@
for (j = 0; j < layout.fieldlist.length; j += 1) {
field = layout.fieldlist[j];
console.log(field.title)
config = spec.fields[field.title];
overrides = field.overrides;
doc = spec.data || undefined;
......@@ -3381,6 +3367,12 @@
break;
}
}
// clear textarea type=null if set
if (config.type === "textarea") {
delete config.attributes.type;
}
// assemble
container_class_list += " ui-corner-all ui-shadow-inset" +
disabled + readonly + (action || "") + (clear || "") + (theme || "");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment