* Updates form modified state. * * Form is considered modified when it has at least one * modified element or child form.
()
| 132 | * modified element or child form. |
| 133 | */ |
| 134 | function updateModifiedState () { |
| 135 | |
| 136 | formCtrl.modifiedCount = formCtrl.modifiedModels.length; |
| 137 | formCtrl.modifiedChildFormsCount = formCtrl.modifiedChildForms.length; |
| 138 | |
| 139 | formCtrl.modified = |
| 140 | (formCtrl.modifiedCount + formCtrl.modifiedChildFormsCount) > 0 |
| 141 | ; |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * Decorates element with proper CSS classes. |