Make extra vars read-only for users without edit role on some forms. Fixes console error thrown in launch modal if survey tab missing.

This commit is contained in:
mabashian
2019-06-11 15:42:44 -04:00
parent d4ad674899
commit 302d8589c9
7 changed files with 15 additions and 4 deletions

View File

@@ -147,11 +147,13 @@ export default ['Rest', 'Wait',
if (!$scope.headers) {
$scope.headers = "{\n}";
}
ParseTypeChange({
scope: $scope,
parse_variable: 'parse_type',
variable: 'headers',
field_id: 'notification_template_headers',
readOnly: !$scope.notification_template.summary_fields.user_capabilities.edit
});
Wait('stop');
})
@@ -221,6 +223,7 @@ export default ['Rest', 'Wait',
parse_variable: 'parse_type',
variable: 'headers',
field_id: 'notification_template_headers',
readOnly: !$scope.notification_template.summary_fields.user_capabilities.edit
});
};