Commit 3bdfb794 authored by bbaer's avatar bbaer
Browse files

rebase develop

parent b6c52394
......@@ -172,7 +172,14 @@ QfqNS.Element = QfqNS.Element || {};
* @param required
*/
n.FormGroup.prototype.setRequired = function (required) {
this.$element.prop('required', required);
if(this.$element.is('div')) {
if (!!this.$element.find('input')) {
console.log("children found");
this.$element.find('input').prop('required', required);
}
} else {
this.$element.prop('required', required);
}
};
/**
......@@ -181,9 +188,9 @@ QfqNS.Element = QfqNS.Element || {};
*/
n.FormGroup.prototype.setError = function (isError) {
if (isError) {
this.$formGroup.addClass("hullahoop has-error has-danger");
this.$formGroup.addClass("has-error has-danger");
} else {
this.$formGroup.removeClass("hullahoop has-error has-danger");
this.$formGroup.removeClass("has-error has-danger");
}
};
......
......@@ -1261,9 +1261,14 @@ var QfqNS = QfqNS || {};
element.setRequired(configuration.required);
if(element.$element) {
if(element.$element.is("select")) {
element.$element.prop('required', configuration.required);
element.$element.prop('required', configurationItem.required);
element.$element.attr('data-required', 'yes');
}
if(element.$element.is("input[type=hidden]")) {
console.log("Update Hidden");
element.$element.prop("required", configurationItem.required);
}
}
}
} catch (e) {
......
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