Commit cf2f200e authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

ElementUpdate.js: when updating a `value` attribute, use `$().val()`.

QfqForm.js: When handling responses to `save`, handle `element-update` independently from `form-update`
parent 4186d647
......@@ -78,6 +78,9 @@ var QfqNS = QfqNS || {};
n.ElementUpdate.setAttribute = function ($element, attributeName, attributeValue) {
$element.attr(attributeName, attributeValue);
if (attributeName.toLowerCase() === "value") {
$element.val(attributeValue);
}
};
n.ElementUpdate.deleteAttribute = function ($element, attributeName) {
......
......@@ -895,6 +895,9 @@ var QfqNS = QfqNS || {};
// do we have to update the HTML Form?
if (data['form-update']) {
this.applyFormConfiguration(data['form-update']);
}
if (data['element-update']) {
this.applyElementConfiguration(data['element-update']);
}
......
......@@ -168,6 +168,7 @@
</div>
</div>
<input type="hidden" id="hidden" value="bla"/>
</form>
</div>
......
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