Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Handle readonly mode for forms
- * @param form the form we're managing
- * @param readOnlyReference which readonly value we're using
- * @param componentIdList list of ids that are handled differently than readonly
- */
- static handleReadOnlyForm(form, readOnlyReference : boolean, componentIdList : Array<String>) {
- if (readOnlyReference) {
- form.eachWidget((widget) => {
- if (widget.type === 'threestatecheckbox') {
- widget.checkbox.readOnly = readOnlyReference;
- }
- componentIdList.forEach(value => {
- if (widget.id === value) {
- widget.hidden = readOnlyReference;
- }
- })
- widget.readOnly = readOnlyReference;
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment