Skip to content

Commit

Permalink
Update required flag in form labels on attribute change
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucker committed Feb 27, 2024
1 parent f52e8cf commit 6e3caec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- Update required flag on change of required property

0.49.2 2024-02-20 09:57:55 +0100 Tobias Oetiker <tobi@oetiker.ch>

- Add command `showconfig` to show config documentation form Config.pm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,21 @@ qx.Class.define("callbackery.ui.form.renderer.NoteForm", {
// add the items
var msg = callbackery.ui.MsgBox.getInstance();
var that = this;
for (var i = 0; i < items.length; i++) {
for (let i = 0; i < items.length; i++) {
(function () { // context
let label = that._createLabel(names[i], items[i]);
let item = items[i];
item.set({
marginTop: 2,
marginBottom: 2
});
var labelName = names[i];
let labelName = names[i];

// rerender form to update required flag
item.addListener("changeRequired", (e) => {
that._onChangeLocale(e);
}, that);

// allow form items without label
if (label) {

Expand Down Expand Up @@ -183,6 +189,7 @@ qx.Class.define("callbackery.ui.form.renderer.NoteForm", {
});
}
that._add(item, { row: that._row + 1, column: 1 });

if (itemOptions != null && itemOptions[i] != null) {
if (itemOptions[i].note) {
that._gotNote = true;
Expand Down

0 comments on commit 6e3caec

Please sign in to comment.