Added variable data fied to Host detail page. Save/edit work -made changes in the Hosts controller for this. Still need to validate text blob is valid JSON.

This commit is contained in:
chouseknecht
2013-05-21 12:57:15 -04:00
parent f5c487aab8
commit c238a85581
6 changed files with 87 additions and 29 deletions

View File

@@ -5,7 +5,7 @@
*
*/
angular.module('JobTemplateHelper', [ 'RestServices', 'Utilities', 'CredentialFormDefinition' ])
.factory('PromptPasswords',['CredentialForm', '$compile', 'Rest', function(JobTemplateForm, $compile, Rest) {
.factory('PromptPasswords',['CredentialForm', '$compile', 'Rest', '$location', function(JobTemplateForm, $compile, Rest, $location) {
return function(params) {
var scope = params.scope;

View File

@@ -50,8 +50,10 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P
if (scope[form.name + '_form'] && form.fields[field] && form.fields[field].sourceModel) {
scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] =
listScope[list.name][i][form.fields[field].sourceField];
scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]
.$setValidity('awlookup',true);
if (scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]) {
scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]
.$setValidity('awlookup',true);
}
}
if (scope[form.name + '_form']) {
scope[form.name + '_form'].$setDirty();
@@ -64,6 +66,7 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P
'and then click the Select button.');
}
else {
console.log('found!');
if (postAction) {
postAction();
}