mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
AC-435 enable/disable/require User fields based on LDAP settings.
This commit is contained in:
@@ -33,21 +33,23 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
scope.projectsPostRefresh();
|
scope.projectsPostRefresh();
|
||||||
}
|
}
|
||||||
scope.projectsPostRefresh = scope.$on('PostRefresh', function() {
|
scope.projectsPostRefresh = scope.$on('PostRefresh', function() {
|
||||||
for (var i=0; i < scope.projects.length; i++) {
|
if (scope.projects) {
|
||||||
switch(scope.projects[i].status) {
|
for (var i=0; i < scope.projects.length; i++) {
|
||||||
case 'updating':
|
switch(scope.projects[i].status) {
|
||||||
case 'successful':
|
case 'updating':
|
||||||
case 'ok':
|
case 'successful':
|
||||||
scope.projects[i].badge = 'false';
|
case 'ok':
|
||||||
break;
|
scope.projects[i].badge = 'false';
|
||||||
case 'never updated':
|
break;
|
||||||
case 'failed':
|
case 'never updated':
|
||||||
case 'missing':
|
case 'failed':
|
||||||
scope.projects[i].badge = 'true';
|
case 'missing':
|
||||||
break;
|
scope.projects[i].badge = 'true';
|
||||||
}
|
break;
|
||||||
scope.projects[i].last_updated = (scope.projects[i].last_updated !== null) ?
|
}
|
||||||
FormatDate(new Date(scope.projects[i].last_updated)) : null;
|
scope.projects[i].last_updated = (scope.projects[i].last_updated !== null) ?
|
||||||
|
FormatDate(new Date(scope.projects[i].last_updated)) : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,10 @@ function TeamsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Ale
|
|||||||
}
|
}
|
||||||
scope.PostRefershRemove = scope.$on('PostRefresh', function() {
|
scope.PostRefershRemove = scope.$on('PostRefresh', function() {
|
||||||
// After a refresh, populate the organization name on each row
|
// After a refresh, populate the organization name on each row
|
||||||
for( var i=0; i < scope.teams.length; i++) {
|
if (scope.teams) {
|
||||||
scope.teams[i].organization_name = scope.teams[i].summary_fields.organization.name;
|
for ( var i=0; i < scope.teams.length; i++) {
|
||||||
|
scope.teams[i].organization_name = scope.teams[i].summary_fields.organization.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -83,8 +83,22 @@ function UsersAdd ($scope, $rootScope, $compile, $location, $log, $routeParams,
|
|||||||
// Inject dynamic view
|
// Inject dynamic view
|
||||||
var defaultUrl = GetBasePath('organizations');
|
var defaultUrl = GetBasePath('organizations');
|
||||||
var form = UserForm;
|
var form = UserForm;
|
||||||
|
|
||||||
|
// Restore form to default condition. It may have been modified during edit of an LDAP user
|
||||||
|
form.fields['first_name'].readonly = false;
|
||||||
|
form.fields['first_name'].editRequired = true;
|
||||||
|
form.fields['last_name'].readonly = false;
|
||||||
|
form.fields['last_name'].editRequired = true;
|
||||||
|
form.fields['email'].readonly = false;
|
||||||
|
form.fields['email'].editRequired = true;
|
||||||
|
form.fields['organization'].awRequiredWhen = { variable: "orgrequired", init: true};
|
||||||
|
|
||||||
var generator = GenerateForm;
|
var generator = GenerateForm;
|
||||||
var scope = generator.inject(form, {mode: 'add', related: false});
|
var scope = generator.inject(form, {mode: 'add', related: false});
|
||||||
|
|
||||||
|
scope.not_ldap_user = true;
|
||||||
|
scope.ldap_dn = null;
|
||||||
|
|
||||||
generator.reset();
|
generator.reset();
|
||||||
|
|
||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
@@ -176,171 +190,205 @@ function UsersEdit ($scope, $rootScope, $compile, $location, $log, $routeParams,
|
|||||||
var generator = GenerateForm;
|
var generator = GenerateForm;
|
||||||
var form = UserForm;
|
var form = UserForm;
|
||||||
var base = $location.path().replace(/^\//,'').split('/')[0];
|
var base = $location.path().replace(/^\//,'').split('/')[0];
|
||||||
var scope = generator.inject(form, {mode: 'edit', related: true});
|
|
||||||
generator.reset();
|
|
||||||
var master = {};
|
|
||||||
var id = $routeParams.user_id;
|
|
||||||
var relatedSets = {};
|
|
||||||
|
|
||||||
scope.PermissionAddAllowed = false;
|
|
||||||
|
|
||||||
// After the Organization is loaded, retrieve each related set
|
|
||||||
scope.$on('userLoaded', function() {
|
|
||||||
for (var set in relatedSets) {
|
|
||||||
scope.search(relatedSets[set].iterator);
|
|
||||||
}
|
|
||||||
CheckAccess({ scope: scope }); //Does the user have access add Permissions?
|
|
||||||
});
|
|
||||||
|
|
||||||
// Retrieve detail record and prepopulate the form
|
|
||||||
Rest.setUrl(defaultUrl + ':id/');
|
|
||||||
Rest.get({ params: {id: id} })
|
|
||||||
.success( function(data, status, headers, config) {
|
|
||||||
LoadBreadCrumbs({ path: '/users/' + id, title: data.username });
|
|
||||||
for (var fld in form.fields) {
|
|
||||||
if (data[fld]) {
|
|
||||||
if (fld == 'is_superuser') {
|
|
||||||
scope[fld] = (data[fld] == 'true' || data[fld] == true) ? 'true' : 'false';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
scope[fld] = data[fld];
|
|
||||||
}
|
|
||||||
master[fld] = scope[fld];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var related = data.related;
|
|
||||||
for (var set in form.related) {
|
|
||||||
if (related[set]) {
|
|
||||||
relatedSets[set] = { url: related[set], iterator: form.related[set].iterator };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.
|
|
||||||
RelatedSearchInit({ scope: scope, form: form, relatedSets: relatedSets });
|
|
||||||
RelatedPaginateInit({ scope: scope, relatedSets: relatedSets });
|
|
||||||
scope.$emit('userLoaded');
|
|
||||||
})
|
|
||||||
.error( function(data, status, headers, config) {
|
|
||||||
ProcessErrors(scope, data, status, form,
|
|
||||||
{ hdr: 'Error!', msg: 'Failed to retrieve user: ' + $routeParams.id + '. GET status: ' + status });
|
|
||||||
});
|
|
||||||
|
|
||||||
// Save changes to the parent
|
$scope.$on('formReady', function() {
|
||||||
scope.formSave = function() {
|
var scope = generator.inject(form, {mode: 'edit', related: true});
|
||||||
$rootScope.flashMessage = null;
|
generator.reset();
|
||||||
Rest.setUrl(defaultUrl + id + '/');
|
var master = {};
|
||||||
var data = {}
|
var id = $routeParams.user_id;
|
||||||
for (var fld in form.fields) {
|
var relatedSets = {};
|
||||||
data[fld] = scope[fld];
|
|
||||||
}
|
|
||||||
Rest.put(data)
|
|
||||||
.success( function(data, status, headers, config) {
|
|
||||||
var base = $location.path().replace(/^\//,'').split('/')[0];
|
|
||||||
(base == 'users') ? ReturnToCaller() : ReturnToCaller(1);
|
|
||||||
})
|
|
||||||
.error( function(data, status, headers, config) {
|
|
||||||
ProcessErrors(scope, data, status, form,
|
|
||||||
{ hdr: 'Error!', msg: 'Failed to update users: ' + $routeParams.id + '. PUT status: ' + status });
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Cancel
|
scope.PermissionAddAllowed = false;
|
||||||
scope.formReset = function() {
|
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Password change
|
// After the Organization is loaded, retrieve each related set
|
||||||
scope.clearPWConfirm = function(fld) {
|
scope.$on('userLoaded', function() {
|
||||||
// If password value changes, make sure password_confirm must be re-entered
|
for (var set in relatedSets) {
|
||||||
scope[fld] = '';
|
scope.search(relatedSets[set].iterator);
|
||||||
scope[form.name + '_form'][fld].$setValidity('awpassmatch', false);
|
}
|
||||||
$rootScope.flashMessage = null;
|
CheckAccess({ scope: scope }); //Does the user have access add Permissions?
|
||||||
}
|
});
|
||||||
|
|
||||||
|
// Retrieve detail record and prepopulate the form
|
||||||
|
Rest.setUrl(defaultUrl + ':id/');
|
||||||
|
Rest.get({ params: {id: id} })
|
||||||
|
.success( function(data, status, headers, config) {
|
||||||
|
LoadBreadCrumbs({ path: '/users/' + id, title: data.username });
|
||||||
|
for (var fld in form.fields) {
|
||||||
|
if (data[fld]) {
|
||||||
|
if (fld == 'is_superuser') {
|
||||||
|
scope[fld] = (data[fld] == 'true' || data[fld] == true) ? 'true' : 'false';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
scope[fld] = data[fld];
|
||||||
|
}
|
||||||
|
master[fld] = scope[fld];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var related = data.related;
|
||||||
|
for (var set in form.related) {
|
||||||
|
if (related[set]) {
|
||||||
|
relatedSets[set] = { url: related[set], iterator: form.related[set].iterator };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scope.not_ldap_user = (scope.ldap_dn) ? false : true;
|
||||||
|
|
||||||
|
// Initialize related search functions. Doing it here to make sure relatedSets object is populated.
|
||||||
|
RelatedSearchInit({ scope: scope, form: form, relatedSets: relatedSets });
|
||||||
|
RelatedPaginateInit({ scope: scope, relatedSets: relatedSets });
|
||||||
|
scope.$emit('userLoaded');
|
||||||
|
})
|
||||||
|
.error( function(data, status, headers, config) {
|
||||||
|
ProcessErrors(scope, data, status, form,
|
||||||
|
{ hdr: 'Error!', msg: 'Failed to retrieve user: ' + $routeParams.id + '. GET status: ' + status });
|
||||||
|
});
|
||||||
|
|
||||||
|
// Save changes to the parent
|
||||||
|
scope.formSave = function() {
|
||||||
|
$rootScope.flashMessage = null;
|
||||||
|
Rest.setUrl(defaultUrl + id + '/');
|
||||||
|
var data = {}
|
||||||
|
for (var fld in form.fields) {
|
||||||
|
data[fld] = scope[fld];
|
||||||
|
}
|
||||||
|
Rest.put(data)
|
||||||
|
.success( function(data, status, headers, config) {
|
||||||
|
var base = $location.path().replace(/^\//,'').split('/')[0];
|
||||||
|
(base == 'users') ? ReturnToCaller() : ReturnToCaller(1);
|
||||||
|
})
|
||||||
|
.error( function(data, status, headers, config) {
|
||||||
|
ProcessErrors(scope, data, status, form,
|
||||||
|
{ hdr: 'Error!', msg: 'Failed to update users: ' + $routeParams.id + '. PUT status: ' + status });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// Cancel
|
||||||
|
scope.formReset = function() {
|
||||||
|
$rootScope.flashMessage = null;
|
||||||
|
generator.reset();
|
||||||
|
for (var fld in master) {
|
||||||
|
scope[fld] = master[fld];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Password change
|
||||||
|
scope.clearPWConfirm = function(fld) {
|
||||||
|
// If password value changes, make sure password_confirm must be re-entered
|
||||||
|
scope[fld] = '';
|
||||||
|
scope[form.name + '_form'][fld].$setValidity('awpassmatch', false);
|
||||||
|
$rootScope.flashMessage = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Related set: Add button
|
// Related set: Add button
|
||||||
scope.add = function(set) {
|
scope.add = function(set) {
|
||||||
$rootScope.flashMessage = null;
|
$rootScope.flashMessage = null;
|
||||||
if (set == 'permissions') {
|
|
||||||
if (scope.PermissionAddAllowed) {
|
|
||||||
$location.path('/' + base + '/' + $routeParams.user_id + '/' + set + '/add');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Alert('Access Denied', 'You do not have access to this function. Please contact your system administrator.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$location.path('/' + base + '/' + $routeParams.user_id + '/' + set);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Related set: Edit button
|
|
||||||
scope.edit = function(set, id, name) {
|
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
if (set == 'permissions') {
|
|
||||||
if (scope.PermissionAddAllowed) {
|
|
||||||
$location.path('/users/' + $routeParams.user_id + '/permissions/' + id);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Alert('Access Denied', 'You do not have access to this function. Please contact your system administrator.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$location.path('/' + set + '/' + id);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Related set: Delete button
|
|
||||||
scope['delete'] = function(set, itm_id, name, title) {
|
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
|
|
||||||
var action = function() {
|
|
||||||
var url;
|
|
||||||
if (set == 'permissions') {
|
if (set == 'permissions') {
|
||||||
if (scope.PermissionAddAllowed) {
|
if (scope.PermissionAddAllowed) {
|
||||||
url = GetBasePath('base') + 'permissions/' + itm_id + '/';
|
$location.path('/' + base + '/' + $routeParams.user_id + '/' + set + '/add');
|
||||||
Rest.setUrl(url);
|
}
|
||||||
Rest.destroy()
|
else {
|
||||||
.success( function(data, status, headers, config) {
|
Alert('Access Denied', 'You do not have access to this function. Please contact your system administrator.');
|
||||||
$('#prompt-modal').modal('hide');
|
}
|
||||||
scope.search(form.related[set].iterator);
|
|
||||||
})
|
|
||||||
.error( function(data, status, headers, config) {
|
|
||||||
$('#prompt-modal').modal('hide');
|
|
||||||
ProcessErrors(scope, data, status, null,
|
|
||||||
{ hdr: 'Error!', msg: 'Call to ' + url + ' failed. DELETE returned status: ' + status });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Alert('Access Denied', 'You do not have access to this function. Please contact your system administrator.');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
url = defaultUrl + $routeParams.user_id + '/' + set + '/';
|
$location.path('/' + base + '/' + $routeParams.user_id + '/' + set);
|
||||||
Rest.setUrl(url);
|
|
||||||
Rest.post({ id: itm_id, disassociate: 1 })
|
|
||||||
.success( function(data, status, headers, config) {
|
|
||||||
$('#prompt-modal').modal('hide');
|
|
||||||
scope.search(form.related[set].iterator);
|
|
||||||
})
|
|
||||||
.error( function(data, status, headers, config) {
|
|
||||||
$('#prompt-modal').modal('hide');
|
|
||||||
ProcessErrors(scope, data, status, null,
|
|
||||||
{ hdr: 'Error!', msg: 'Call to ' + url + ' failed. POST returned status: ' + status });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Related set: Edit button
|
||||||
|
scope.edit = function(set, id, name) {
|
||||||
|
$rootScope.flashMessage = null;
|
||||||
|
if (set == 'permissions') {
|
||||||
|
if (scope.PermissionAddAllowed) {
|
||||||
|
$location.path('/users/' + $routeParams.user_id + '/permissions/' + id);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Alert('Access Denied', 'You do not have access to this function. Please contact your system administrator.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$location.path('/' + set + '/' + id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Related set: Delete button
|
||||||
|
scope['delete'] = function(set, itm_id, name, title) {
|
||||||
|
$rootScope.flashMessage = null;
|
||||||
|
|
||||||
|
var action = function() {
|
||||||
|
var url;
|
||||||
|
if (set == 'permissions') {
|
||||||
|
if (scope.PermissionAddAllowed) {
|
||||||
|
url = GetBasePath('base') + 'permissions/' + itm_id + '/';
|
||||||
|
Rest.setUrl(url);
|
||||||
|
Rest.destroy()
|
||||||
|
.success( function(data, status, headers, config) {
|
||||||
|
$('#prompt-modal').modal('hide');
|
||||||
|
scope.search(form.related[set].iterator);
|
||||||
|
})
|
||||||
|
.error( function(data, status, headers, config) {
|
||||||
|
$('#prompt-modal').modal('hide');
|
||||||
|
ProcessErrors(scope, data, status, null,
|
||||||
|
{ hdr: 'Error!', msg: 'Call to ' + url + ' failed. DELETE returned status: ' + status });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Alert('Access Denied', 'You do not have access to this function. Please contact your system administrator.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
url = defaultUrl + $routeParams.user_id + '/' + set + '/';
|
||||||
|
Rest.setUrl(url);
|
||||||
|
Rest.post({ id: itm_id, disassociate: 1 })
|
||||||
|
.success( function(data, status, headers, config) {
|
||||||
|
$('#prompt-modal').modal('hide');
|
||||||
|
scope.search(form.related[set].iterator);
|
||||||
|
})
|
||||||
|
.error( function(data, status, headers, config) {
|
||||||
|
$('#prompt-modal').modal('hide');
|
||||||
|
ProcessErrors(scope, data, status, null,
|
||||||
|
{ hdr: 'Error!', msg: 'Call to ' + url + ' failed. POST returned status: ' + status });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Prompt({ hdr: 'Delete',
|
||||||
|
body: 'Are you sure you want to remove ' + name + ' from ' + scope.username + ' ' + title + '?',
|
||||||
|
action: action
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Prompt({ hdr: 'Delete',
|
}); // $scope.$on
|
||||||
body: 'Are you sure you want to remove ' + name + ' from ' + scope.username + ' ' + title + '?',
|
|
||||||
action: action
|
// Restore form to default condition
|
||||||
});
|
form.fields['first_name'].readonly = false;
|
||||||
}
|
form.fields['first_name'].editRequired = true;
|
||||||
|
form.fields['last_name'].readonly = false;
|
||||||
|
form.fields['last_name'].editRequired = true;
|
||||||
|
form.fields['email'].readonly = false;
|
||||||
|
form.fields['email'].editRequired = true;
|
||||||
|
form.fields['organization'].awRequiredWhen = { variable: "orgrequired", init: true};
|
||||||
|
|
||||||
|
// Modify form based on LDAP settings
|
||||||
|
Rest.setUrl(GetBasePath('config'));
|
||||||
|
Rest.get()
|
||||||
|
.success( function(data, status, headers, config) {
|
||||||
|
if (data['user_ldap_fields']) {
|
||||||
|
for (var fld in data['user_ldap_fields']) {
|
||||||
|
form.fields[fld]['readonly'] = true;
|
||||||
|
form.fields[fld]['editRequired'] = false;
|
||||||
|
if (form.fields[fld].awRequiredWhen) {
|
||||||
|
delete form.fields[fld].awRequiredWhen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$scope.$emit('formReady');
|
||||||
|
})
|
||||||
|
.error( function(data, status, headers, config) {
|
||||||
|
ProcessErrors(scope, data, status, null,
|
||||||
|
{ hdr: 'Error!', msg: 'Failed to retrieve application config. GET status: ' + status });
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
UsersEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'UserForm',
|
UsersEdit.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'UserForm',
|
||||||
|
|||||||
@@ -46,24 +46,26 @@ angular.module('UserFormDefinition', [])
|
|||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
sourceModel: 'organization',
|
sourceModel: 'organization',
|
||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
addRequired: true,
|
|
||||||
editRequired: true,
|
|
||||||
ngClick: 'lookUpOrganization()',
|
ngClick: 'lookUpOrganization()',
|
||||||
excludeMode: 'edit',
|
excludeMode: 'edit',
|
||||||
awRequiredWhen: {variable: "orgrequired", init: "true" }
|
awRequiredWhen: { variable: "orgrequired", init: true}
|
||||||
},
|
},
|
||||||
username: {
|
username: {
|
||||||
label: 'Username',
|
label: 'Username',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
addRequired: true,
|
awRequiredWhen: { variable: "not_ldap_user", init: true },
|
||||||
editRequired: true,
|
|
||||||
autocomplete: false
|
autocomplete: false
|
||||||
},
|
},
|
||||||
|
ldap_dn: {
|
||||||
|
label: 'Created by LDAP?',
|
||||||
|
type: 'checkbox',
|
||||||
|
readonly: true
|
||||||
|
},
|
||||||
password: {
|
password: {
|
||||||
label: 'Password',
|
label: 'Password',
|
||||||
type: 'password',
|
type: 'password',
|
||||||
addRequired: true,
|
ngShow: 'not_ldap_user == true',
|
||||||
editRequired: false,
|
awRequiredWhen: { variable: "not_ldap_user", init: true},
|
||||||
ngChange: "clearPWConfirm('password_confirm')",
|
ngChange: "clearPWConfirm('password_confirm')",
|
||||||
autocomplete: false,
|
autocomplete: false,
|
||||||
chkPass: true
|
chkPass: true
|
||||||
@@ -71,6 +73,7 @@ angular.module('UserFormDefinition', [])
|
|||||||
password_confirm: {
|
password_confirm: {
|
||||||
label: 'Confirm Password',
|
label: 'Confirm Password',
|
||||||
type: 'password',
|
type: 'password',
|
||||||
|
ngShow: 'not_ldap_user == true',
|
||||||
addRequired: false,
|
addRequired: false,
|
||||||
editRequired: false,
|
editRequired: false,
|
||||||
awPassMatch: true,
|
awPassMatch: true,
|
||||||
|
|||||||
@@ -131,8 +131,10 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos
|
|||||||
ctrl.$setValidity('required', validity);
|
ctrl.$setValidity('required', validity);
|
||||||
}
|
}
|
||||||
|
|
||||||
scope[attrs.awRequiredWhen] = attrs.awrequiredInit;
|
if (attrs.awrequiredInit !== undefined && attrs.awrequiredInit !== null) {
|
||||||
checkIt();
|
scope[attrs.awRequiredWhen] = attrs.awrequiredInit;
|
||||||
|
checkIt();
|
||||||
|
}
|
||||||
|
|
||||||
scope.$watch(attrs.awRequiredWhen, function() {
|
scope.$watch(attrs.awRequiredWhen, function() {
|
||||||
// watch for the aw-required-when expression to change value
|
// watch for the aw-required-when expression to change value
|
||||||
|
|||||||
1
awx/ui/static/lib/jquery/jquery-1.10.2.min.map
Normal file
1
awx/ui/static/lib/jquery/jquery-1.10.2.min.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user