1
0
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:
Chris Houseknecht 2014-07-31 14:03:30 -04:00
parent 5646a8d4fe
commit bebdcde93b

View File

@ -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.');