Skip to content

Commit ef4b5d4

Browse files
committed
CLOUDSTACK-7647: Fix 'isReverse' checkboxes which are checked by default
1 parent 055fdd5 commit ef4b5d4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ui/scripts/ui/dialog.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,11 @@
225225
if ($dependsOn.is('[type=checkbox]')) {
226226

227227
var isReverse = false;
228-
if (args.form.fields[dependsOn])
228+
if (args.form.fields[dependsOn]) {
229229
isReverse = args.form.fields[dependsOn].isReverse;
230+
isChecked = args.form.fields[dependsOn].isChecked;
231+
}
232+
230233

231234
// Checkbox
232235
$dependsOn.bind('click', function(event) {
@@ -260,6 +263,10 @@
260263
// Show fields by default if it is reverse checkbox
261264
if (isReverse) {
262265
$dependsOn.click();
266+
267+
if (isChecked) {
268+
$dependsOn.attr('checked', true);
269+
}
263270
}
264271
}
265272
}

0 commit comments

Comments
 (0)