mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 19:20:05 -03:30
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:
@@ -782,6 +782,11 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Job
|
|||||||
reader.onload = function() {
|
reader.onload = function() {
|
||||||
ctrl.$setViewValue(reader.result);
|
ctrl.$setViewValue(reader.result);
|
||||||
ctrl.$render();
|
ctrl.$render();
|
||||||
|
ctrl.$setValidity('required',true);
|
||||||
|
ctrl.$dirty = true;
|
||||||
|
if (!scope.$$phase) {
|
||||||
|
scope.$digest();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
reader.onerror = function() {
|
reader.onerror = function() {
|
||||||
Alert('Error','There was an error reading the selected file.');
|
Alert('Error','There was an error reading the selected file.');
|
||||||
|
|||||||
Reference in New Issue
Block a user