mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
File drag-n-drop
Set validity of 'required' to true and field status to dirty upon successful read of file, otherwise the Save button is never enabled.
This commit is contained in:
parent
5646a8d4fe
commit
bebdcde93b
@ -782,6 +782,11 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
||||
reader.onload = function() {
|
||||
ctrl.$setViewValue(reader.result);
|
||||
ctrl.$render();
|
||||
ctrl.$setValidity('required',true);
|
||||
ctrl.$dirty = true;
|
||||
if (!scope.$$phase) {
|
||||
scope.$digest();
|
||||
}
|
||||
};
|
||||
reader.onerror = function() {
|
||||
Alert('Error','There was an error reading the selected file.');
|
||||
|
Loading…
Reference in New Issue
Block a user