mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
Merge pull request #608 from jaredevantabor/sprint1-forms
Sprint1 forms
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
@import "breadcrumbs.less";
|
@import "breadcrumbs.less";
|
||||||
@import "stdout.less";
|
@import "stdout.less";
|
||||||
@import "lists.less";
|
@import "lists.less";
|
||||||
|
@import "forms.less";
|
||||||
@import "dashboard.less";
|
@import "dashboard.less";
|
||||||
@import "jPushMenu.less";
|
@import "jPushMenu.less";
|
||||||
@import "survey-maker.less";
|
@import "survey-maker.less";
|
||||||
@@ -594,16 +595,6 @@ dd {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aw-form-well {
|
|
||||||
border: 1px solid @grey;
|
|
||||||
padding: 9px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-cancel {
|
.form-cancel {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|||||||
124
awx/ui/client/legacy-styles/forms.less
Normal file
124
awx/ui/client/legacy-styles/forms.less
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
/*********************************************
|
||||||
|
* Copyright (c) 2016 Ansible, Inc.
|
||||||
|
*
|
||||||
|
* lists.less
|
||||||
|
*
|
||||||
|
* custom styles for generated lists
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import "src/shared/branding/colors.default.less";
|
||||||
|
|
||||||
|
.Form{
|
||||||
|
display:flex;
|
||||||
|
flex-wrap:wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-header{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-title{
|
||||||
|
flex: 1 0 auto;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: @list-header-txt;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-exitHolder{
|
||||||
|
justify-content: flex-end;
|
||||||
|
display:flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-exit{
|
||||||
|
cursor:pointer;
|
||||||
|
padding:0px;
|
||||||
|
border: none;
|
||||||
|
height:20px;
|
||||||
|
font-size: 20px;
|
||||||
|
background-color:@default-bg;
|
||||||
|
color:@default-second-border;
|
||||||
|
transition: color 0.2s;
|
||||||
|
line-height:1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-exit:hover{
|
||||||
|
color:@default-icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-formGroup {
|
||||||
|
flex: 1 0 auto;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
width: 33%;
|
||||||
|
padding-right: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-inputLabel{
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: @default-interface-txt;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-buttons{
|
||||||
|
height: 30px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-saveButton{
|
||||||
|
background-color: @submit-button-bg;
|
||||||
|
margin-right: 20px;
|
||||||
|
color: @submit-button-text;
|
||||||
|
text-transform: uppercase;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
padding-left:15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-saveButton:disabled{
|
||||||
|
background-color: @submit-button-bg-dis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-saveButton:hover{
|
||||||
|
background-color: @submit-button-bg-hov;
|
||||||
|
color: @submit-button-text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-cancelButton{
|
||||||
|
background-color: @default-bg;
|
||||||
|
color: @btn-txt;
|
||||||
|
text-transform: uppercase;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid @btn-bord;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
padding-left:15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Form-cancelButton:hover{
|
||||||
|
background-color: @btn-bg-hov;
|
||||||
|
color: @btn-txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 650px) {
|
||||||
|
.Form-formGroup {
|
||||||
|
flex: 1 0 auto;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 651px) and (max-width: 900px) {
|
||||||
|
.Form-formGroup {
|
||||||
|
flex: 1 0 auto;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
width: 50%;
|
||||||
|
padding-right: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -424,7 +424,7 @@ var tower = angular.module('Tower', [
|
|||||||
|
|
||||||
state('projects.add', {
|
state('projects.add', {
|
||||||
url: '/add',
|
url: '/add',
|
||||||
templateUrl: urlPrefix + 'partials/projects.add.html',
|
templateUrl: urlPrefix + 'partials/projects.html',
|
||||||
controller: ProjectsAdd,
|
controller: ProjectsAdd,
|
||||||
ncyBreadcrumb: {
|
ncyBreadcrumb: {
|
||||||
parent: "projects",
|
parent: "projects",
|
||||||
|
|||||||
@@ -133,9 +133,11 @@ CredentialsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, CredentialForm, GenerateForm, Rest, Alert,
|
export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
|
||||||
ProcessErrors, ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit, LookUpInit, UserList, TeamList,
|
$stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
GetBasePath, GetChoices, Empty, KindChange, OwnerChange, FormSave) {
|
ReturnToCaller, ClearScope, GenerateList, SearchInit, PaginateInit,
|
||||||
|
LookUpInit, UserList, TeamList, GetBasePath, GetChoices, Empty, KindChange,
|
||||||
|
OwnerChange, FormSave, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -248,10 +250,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $s
|
|||||||
OwnerChange({ scope: $scope });
|
OwnerChange({ scope: $scope });
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset defaults
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('credentials');
|
||||||
//DebugForm({ scope: $scope, form: CredentialForm });
|
|
||||||
generator.reset();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Password change
|
// Password change
|
||||||
@@ -296,15 +296,20 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, $s
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'CredentialForm', 'GenerateForm',
|
CredentialsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'SearchInit', 'PaginateInit',
|
'$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'LookUpInit', 'UserList', 'TeamList', 'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'OwnerChange', 'FormSave'
|
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||||
|
'SearchInit', 'PaginateInit', 'LookUpInit', 'UserList', 'TeamList',
|
||||||
|
'GetBasePath', 'GetChoices', 'Empty', 'KindChange', 'OwnerChange',
|
||||||
|
'FormSave', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, CredentialForm, GenerateForm, Rest, Alert,
|
export function CredentialsEdit($scope, $rootScope, $compile, $location, $log,
|
||||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt, GetBasePath, GetChoices,
|
$stateParams, CredentialForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
KindChange, UserList, TeamList, LookUpInit, Empty, OwnerChange, FormSave, Stream, Wait) {
|
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, Prompt,
|
||||||
|
GetBasePath, GetChoices, KindChange, UserList, TeamList, LookUpInit, Empty,
|
||||||
|
OwnerChange, FormSave, Stream, Wait, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -519,15 +524,8 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
KindChange({ scope: $scope, form: form, reset: true });
|
KindChange({ scope: $scope, form: form, reset: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('credentials');
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
setAskCheckboxes();
|
|
||||||
KindChange({ scope: $scope, form: form, reset: false });
|
|
||||||
OwnerChange({ scope: $scope });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Related set: Add button
|
// Related set: Add button
|
||||||
@@ -614,8 +612,10 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CredentialsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'CredentialForm',
|
CredentialsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
'$log', '$stateParams', 'CredentialForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'GetChoices', 'KindChange', 'UserList', 'TeamList', 'LookUpInit',
|
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||||
'Empty', 'OwnerChange', 'FormSave', 'Stream', 'Wait'
|
'ReturnToCaller', 'ClearScope', 'Prompt', 'GetBasePath', 'GetChoices',
|
||||||
|
'KindChange', 'UserList', 'TeamList', 'LookUpInit', 'Empty', 'OwnerChange',
|
||||||
|
'FormSave', 'Stream', 'Wait', '$state'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
import '../job-templates/main';
|
import '../job-templates/main';
|
||||||
|
|
||||||
export function InventoriesList($scope, $rootScope, $location, $log,
|
export function InventoriesList($scope, $rootScope, $location, $log,
|
||||||
$stateParams, $compile, $filter, sanitizeFilter, Rest, Alert, InventoryList, generateList,
|
$stateParams, $compile, $filter, sanitizeFilter, Rest, Alert, InventoryList,
|
||||||
Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
generateList, Prompt, SearchInit, PaginateInit, ReturnToCaller,
|
||||||
ClearScope, ProcessErrors, GetBasePath, Wait, Stream,
|
ClearScope, ProcessErrors, GetBasePath, Wait, Stream,
|
||||||
EditInventoryProperties, Find, Empty, LogViewer, $state) {
|
EditInventoryProperties, Find, Empty, LogViewer, $state) {
|
||||||
|
|
||||||
@@ -371,9 +371,11 @@ InventoriesList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateP
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, GenerateForm, Rest,
|
export function InventoriesAdd($scope, $rootScope, $compile, $location, $log,
|
||||||
Alert, ProcessErrors, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
$stateParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON) {
|
ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit,
|
||||||
|
PaginateInit, LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON,
|
||||||
|
$state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -443,21 +445,24 @@ export function InventoriesAdd($scope, $rootScope, $compile, $location, $log, $s
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('inventories');
|
||||||
generator.reset();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm',
|
InventoriesAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
'$log', '$stateParams', 'InventoryForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON'
|
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||||
|
'OrganizationList', 'SearchInit', 'PaginateInit', 'LookUpInit',
|
||||||
|
'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $stateParams, InventoryForm, GenerateForm, Rest,
|
export function InventoriesEdit($scope, $rootScope, $compile, $location,
|
||||||
Alert, ProcessErrors, ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit, PaginateInit,
|
$log, $stateParams, InventoryForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON, ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit,
|
ReturnToCaller, ClearScope, generateList, OrganizationList, SearchInit,
|
||||||
Prompt, PlaybookRun, CreateDialog, deleteJobTemplate) {
|
PaginateInit, LookUpInit, GetBasePath, ParseTypeChange, Wait, ToJSON,
|
||||||
|
ParseVariableString, Stream, RelatedSearchInit, RelatedPaginateInit,
|
||||||
|
Prompt, PlaybookRun, CreateDialog, deleteJobTemplate, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -588,19 +593,8 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
Stream({ scope: $scope });
|
Stream({ scope: $scope });
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('inventories');
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
$scope.parseType = 'yaml';
|
|
||||||
ParseTypeChange({
|
|
||||||
scope: $scope,
|
|
||||||
variable: 'variables',
|
|
||||||
parse_variable: 'parseType',
|
|
||||||
field_id: 'inventory_variables'
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.addScanJob = function(){
|
$scope.addScanJob = function(){
|
||||||
@@ -775,10 +769,13 @@ export function InventoriesEdit($scope, $rootScope, $compile, $location, $log, $
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'InventoryForm', 'GenerateForm',
|
InventoriesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList', 'OrganizationList', 'SearchInit',
|
'$log', '$stateParams', 'InventoryForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'PaginateInit', 'LookUpInit', 'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString', 'Stream', 'RelatedSearchInit', 'RelatedPaginateInit',
|
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||||
'Prompt', 'PlaybookRun', 'CreateDialog', 'deleteJobTemplate'
|
'OrganizationList', 'SearchInit', 'PaginateInit', 'LookUpInit',
|
||||||
|
'GetBasePath', 'ParseTypeChange', 'Wait', 'ToJSON', 'ParseVariableString',
|
||||||
|
'Stream', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
|
||||||
|
'PlaybookRun', 'CreateDialog', 'deleteJobTemplate', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -245,10 +245,12 @@ JobTemplatesList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
|||||||
'$state'
|
'$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm,
|
export function JobTemplatesAdd($filter, $scope, $rootScope, $compile,
|
||||||
GenerateForm, Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, GetBasePath,
|
$location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert,
|
||||||
InventoryList, CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange, Wait, Empty, ToJSON,
|
ProcessErrors, ReturnToCaller, ClearScope, GetBasePath, InventoryList,
|
||||||
CallbackHelpInit, SurveyControllerInit, Prompt, GetChoices) {
|
CredentialList, ProjectList, LookUpInit, md5Setup, ParseTypeChange, Wait,
|
||||||
|
Empty, ToJSON, CallbackHelpInit, SurveyControllerInit, Prompt, GetChoices,
|
||||||
|
$state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -649,29 +651,28 @@ export function JobTemplatesAdd($filter, $scope, $rootScope, $compile, $location
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('jobTemplates');
|
||||||
// Defaults
|
|
||||||
generator.reset();
|
|
||||||
//$('#forks-slider').slider("option", "value", $scope.forks);
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
JobTemplatesAdd.$inject = ['$filter', '$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobTemplateForm',
|
JobTemplatesAdd.$inject = ['$filter', '$scope', '$rootScope', '$compile',
|
||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope',
|
'$location', '$log', '$stateParams', 'JobTemplateForm', 'GenerateForm',
|
||||||
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
|
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope',
|
||||||
'md5Setup', 'ParseTypeChange', 'Wait', 'Empty', 'ToJSON', 'CallbackHelpInit', 'initSurvey', 'Prompt', 'GetChoices'
|
'GetBasePath', 'InventoryList', 'CredentialList', 'ProjectList',
|
||||||
|
'LookUpInit', 'md5Setup', 'ParseTypeChange', 'Wait', 'Empty', 'ToJSON',
|
||||||
|
'CallbackHelpInit', 'initSurvey', 'Prompt', 'GetChoices', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest,
|
export function JobTemplatesEdit($filter, $scope, $rootScope, $compile,
|
||||||
Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList,
|
$location, $log, $stateParams, JobTemplateForm, GenerateForm, Rest, Alert,
|
||||||
CredentialList, ProjectList, LookUpInit, GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate,
|
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller,
|
||||||
Wait, Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit, JobsControllerInit, JobsListUpdate,
|
ClearScope, InventoryList, CredentialList, ProjectList, LookUpInit,
|
||||||
GetChoices, SchedulesListInit, SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit){
|
GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate, Wait,
|
||||||
|
Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit,
|
||||||
|
JobsControllerInit, JobsListUpdate, GetChoices, SchedulesListInit,
|
||||||
|
SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit, $state){
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -1148,15 +1149,8 @@ export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $locatio
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('jobTemplates');
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
$scope.parseType = 'yaml';
|
|
||||||
ParseTypeChange({ scope: $scope, field_id: 'job_templates_variables', onChange: callback });
|
|
||||||
$('#forks-slider').slider("option", "value", $scope.forks);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Related set: Add button
|
// Related set: Add button
|
||||||
@@ -1232,10 +1226,14 @@ export function JobTemplatesEdit($filter, $scope, $rootScope, $compile, $locatio
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JobTemplatesEdit.$inject = ['$filter', '$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'JobTemplateForm',
|
JobTemplatesEdit.$inject = ['$filter', '$scope', '$rootScope', '$compile',
|
||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
'$location', '$log', '$stateParams', 'JobTemplateForm', 'GenerateForm',
|
||||||
'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
|
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit',
|
||||||
'GetBasePath', 'md5Setup', 'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream', 'Empty', 'Prompt',
|
'RelatedPaginateInit','ReturnToCaller', 'ClearScope', 'InventoryList',
|
||||||
'ParseVariableString', 'ToJSON', 'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate', 'GetChoices',
|
'CredentialList', 'ProjectList', 'LookUpInit', 'GetBasePath', 'md5Setup',
|
||||||
'SchedulesListInit', 'SchedulesList', 'CallbackHelpInit', 'PlaybookRun' , 'initSurvey'
|
'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream',
|
||||||
|
'Empty', 'Prompt', 'ParseVariableString', 'ToJSON',
|
||||||
|
'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate',
|
||||||
|
'GetChoices', 'SchedulesListInit', 'SchedulesList', 'CallbackHelpInit',
|
||||||
|
'PlaybookRun' , 'initSurvey', '$state'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ OrganizationsList.$inject = ['$stateParams', '$scope', '$rootScope',
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, OrganizationForm,
|
export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log,
|
||||||
GenerateForm, Rest, Alert, ProcessErrors, ClearScope, GetBasePath,
|
$stateParams, OrganizationForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
ReturnToCaller, Wait) {
|
ClearScope, GetBasePath, ReturnToCaller, Wait, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -138,20 +138,22 @@ export function OrganizationsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('organizations');
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
OrganizationsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'OrganizationForm',
|
OrganizationsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait'
|
'$log', '$stateParams', 'OrganizationForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
|
'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller', 'Wait',
|
||||||
|
'$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, OrganizationForm, GenerateForm, Rest,
|
export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
||||||
Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath, Wait, Stream) {
|
$stateParams, OrganizationForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
|
RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath,
|
||||||
|
Wait, Stream, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -241,13 +243,8 @@ export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset the form
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('organizations');
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Related set: Add button
|
// Related set: Add button
|
||||||
@@ -291,7 +288,8 @@ export function OrganizationsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
OrganizationsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'OrganizationForm', 'GenerateForm',
|
OrganizationsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope', 'GetBasePath',
|
'$log', '$stateParams', 'OrganizationForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'Wait', 'Stream'
|
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
|
||||||
|
'ClearScope', 'GetBasePath', 'Wait', 'Stream', '$state'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -197,12 +197,10 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.addProject = function () {
|
$scope.addProject = function () {
|
||||||
// $location.path($location.path() + '/add');
|
|
||||||
$state.transitionTo('projects.add');
|
$state.transitionTo('projects.add');
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.editProject = function (id) {
|
$scope.editProject = function (id) {
|
||||||
// $location.path($location.path() + '/' + id);
|
|
||||||
$state.transitionTo('projects.edit', {id: id});
|
$state.transitionTo('projects.edit', {id: id});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -391,16 +389,19 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$stateParams', 'Rest', 'Alert', 'ProjectList', 'generateList',
|
ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
||||||
'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope', 'ProcessErrors', 'GetBasePath',
|
'$stateParams', 'Rest', 'Alert', 'ProjectList', 'generateList', 'Prompt',
|
||||||
'SelectionInit', 'ProjectUpdate', 'Refresh', 'Wait', 'Stream', 'GetChoices', 'Empty', 'Find',
|
'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
|
||||||
|
'ProcessErrors', 'GetBasePath', 'SelectionInit', 'ProjectUpdate',
|
||||||
|
'Refresh', 'Wait', 'Stream', 'GetChoices', 'Empty', 'Find',
|
||||||
'LogViewer', 'GetProjectIcon', 'GetProjectToolTip', '$filter', '$state'
|
'LogViewer', 'GetProjectIcon', 'GetProjectToolTip', '$filter', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
||||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit, OrganizationList,
|
$stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
CredentialList, GetChoices, DebugForm, Wait) {
|
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, LookUpInit,
|
||||||
|
OrganizationList, CredentialList, GetChoices, DebugForm, Wait, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -524,29 +525,25 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stat
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('projects');
|
||||||
var fld;
|
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
for (fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
$scope.scmChange();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'ProjectsForm',
|
ProjectsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'ClearScope', 'GetBasePath',
|
'$stateParams', 'ProjectsForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'ReturnToCaller', 'GetProjectPath', 'LookUpInit', 'OrganizationList', 'CredentialList', 'GetChoices',
|
'ProcessErrors', 'ClearScope', 'GetBasePath', 'ReturnToCaller',
|
||||||
'DebugForm', 'Wait'
|
'GetProjectPath', 'LookUpInit', 'OrganizationList', 'CredentialList',
|
||||||
|
'GetChoices', 'DebugForm', 'Wait', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, ProjectsForm,
|
export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
||||||
GenerateForm, Rest, Alert, ProcessErrors, RelatedSearchInit, RelatedPaginateInit, Prompt,
|
$stateParams, ProjectsForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
ClearScope, GetBasePath, ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit, GetChoices,
|
RelatedSearchInit, RelatedPaginateInit, Prompt, ClearScope, GetBasePath,
|
||||||
Empty, DebugForm, Wait, Stream, SchedulesControllerInit, SchedulesListInit, SchedulesList, ProjectUpdate) {
|
ReturnToCaller, GetProjectPath, Authorization, CredentialList, LookUpInit,
|
||||||
|
GetChoices, Empty, DebugForm, Wait, Stream, SchedulesControllerInit,
|
||||||
|
SchedulesListInit, SchedulesList, ProjectUpdate, $state) {
|
||||||
|
|
||||||
ClearScope('htmlTemplate');
|
ClearScope('htmlTemplate');
|
||||||
|
|
||||||
@@ -829,19 +826,16 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log, $sta
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset the form
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('projects');
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
$scope.scmChange();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'ProjectsForm', 'GenerateForm',
|
ProjectsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt', 'ClearScope',
|
'$stateParams', 'ProjectsForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'GetBasePath', 'ReturnToCaller', 'GetProjectPath', 'Authorization', 'CredentialList', 'LookUpInit', 'GetChoices', 'Empty',
|
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'Prompt',
|
||||||
'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit', 'SchedulesListInit', 'SchedulesList', 'ProjectUpdate'
|
'ClearScope', 'GetBasePath', 'ReturnToCaller', 'GetProjectPath',
|
||||||
|
'Authorization', 'CredentialList', 'LookUpInit', 'GetChoices', 'Empty',
|
||||||
|
'DebugForm', 'Wait', 'Stream', 'SchedulesControllerInit',
|
||||||
|
'SchedulesListInit', 'SchedulesList', 'ProjectUpdate', '$state'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -114,9 +114,10 @@ TeamsList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, TeamForm, GenerateForm,
|
export function TeamsAdd($scope, $rootScope, $compile, $location, $log,
|
||||||
Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, GenerateList,
|
$stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
OrganizationList, SearchInit, PaginateInit, GetBasePath, LookUpInit, Wait) {
|
ReturnToCaller, ClearScope, GenerateList, OrganizationList, SearchInit,
|
||||||
|
PaginateInit, GetBasePath, LookUpInit, Wait, $state) {
|
||||||
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||||
//$scope.
|
//$scope.
|
||||||
|
|
||||||
@@ -161,22 +162,24 @@ export function TeamsAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('teams');
|
||||||
// Defaults
|
|
||||||
generator.reset();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'TeamForm', 'GenerateForm',
|
TeamsAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
'$stateParams', 'TeamForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'OrganizationList', 'SearchInit', 'PaginateInit', 'GetBasePath', 'LookUpInit', 'Wait'
|
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'generateList',
|
||||||
|
'OrganizationList', 'SearchInit', 'PaginateInit', 'GetBasePath',
|
||||||
|
'LookUpInit', 'Wait', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
export function TeamsEdit($scope, $rootScope, $compile, $location, $log,
|
||||||
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, LookUpInit, Prompt, GetBasePath, CheckAccess,
|
$stateParams, TeamForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
OrganizationList, Wait, Stream, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope,
|
||||||
|
LookUpInit, Prompt, GetBasePath, CheckAccess, OrganizationList, Wait,
|
||||||
|
Stream, fieldChoices, fieldLabels, permissionsSearchSelect, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -338,13 +341,8 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('teams');
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Related set: Add button
|
// Related set: Add button
|
||||||
@@ -418,7 +416,10 @@ export function TeamsEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
TeamsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'TeamForm',
|
TeamsEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||||
'GenerateForm', 'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
'$stateParams', 'TeamForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'ReturnToCaller', 'ClearScope', 'LookUpInit', 'Prompt', 'GetBasePath', 'CheckAccess', 'OrganizationList', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect'
|
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||||
|
'ReturnToCaller', 'ClearScope', 'LookUpInit', 'Prompt', 'GetBasePath',
|
||||||
|
'CheckAccess', 'OrganizationList', 'Wait', 'Stream', 'fieldChoices',
|
||||||
|
'fieldLabels', 'permissionsSearchSelect', '$state'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -104,8 +104,10 @@ UsersList.$inject = ['$scope', '$rootScope', '$location', '$log',
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function UsersAdd($scope, $rootScope, $compile, $location, $log, $stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
export function UsersAdd($scope, $rootScope, $compile, $location, $log,
|
||||||
ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList, ResetForm, Wait) {
|
$stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
|
ReturnToCaller, ClearScope, GetBasePath, LookUpInit, OrganizationList,
|
||||||
|
ResetForm, Wait, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -185,11 +187,8 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('users');
|
||||||
// Defaults
|
|
||||||
generator.reset();
|
|
||||||
$scope.ldap_user = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Password change
|
// Password change
|
||||||
@@ -200,15 +199,18 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, $statePa
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
UsersAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'UserForm', 'GenerateForm',
|
UsersAdd.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath', 'LookUpInit',
|
'$stateParams', 'UserForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'OrganizationList', 'ResetForm', 'Wait'
|
'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath',
|
||||||
|
'LookUpInit', 'OrganizationList', 'ResetForm', 'Wait', '$state'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateParams, UserForm, GenerateForm, Rest, Alert,
|
export function UsersEdit($scope, $rootScope, $compile, $location, $log,
|
||||||
ProcessErrors, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, GetBasePath,
|
$stateParams, UserForm, GenerateForm, Rest, Alert, ProcessErrors,
|
||||||
Prompt, CheckAccess, ResetForm, Wait, Stream, fieldChoices, fieldLabels, permissionsSearchSelect) {
|
RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope,
|
||||||
|
GetBasePath, Prompt, CheckAccess, ResetForm, Wait, Stream, fieldChoices,
|
||||||
|
fieldLabels, permissionsSearchSelect, $state) {
|
||||||
|
|
||||||
ClearScope();
|
ClearScope();
|
||||||
|
|
||||||
@@ -377,14 +379,8 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
|||||||
Stream({ scope: $scope });
|
Stream({ scope: $scope });
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
$scope.formCancel = function () {
|
||||||
$scope.formReset = function () {
|
$state.transitionTo('users');
|
||||||
$rootScope.flashMessage = null;
|
|
||||||
generator.reset();
|
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
$scope.password_confirm = $scope.password;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Password change
|
// Password change
|
||||||
@@ -526,7 +522,10 @@ export function UsersEdit($scope, $rootScope, $compile, $location, $log, $stateP
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
UsersEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log', '$stateParams', 'UserForm', 'GenerateForm',
|
UsersEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$log',
|
||||||
'Rest', 'Alert', 'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit', 'ReturnToCaller', 'ClearScope',
|
'$stateParams', 'UserForm', 'GenerateForm', 'Rest', 'Alert',
|
||||||
'GetBasePath', 'Prompt', 'CheckAccess', 'ResetForm', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels', 'permissionsSearchSelect'
|
'ProcessErrors', 'RelatedSearchInit', 'RelatedPaginateInit',
|
||||||
|
'ReturnToCaller', 'ClearScope', 'GetBasePath', 'Prompt', 'CheckAccess',
|
||||||
|
'ResetForm', 'Wait', 'Stream', 'fieldChoices', 'fieldLabels',
|
||||||
|
'permissionsSearchSelect', '$state'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -357,9 +357,8 @@ export default
|
|||||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()',
|
||||||
ngDisabled: true //Disabled when $pristine
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -14,28 +14,14 @@ export default
|
|||||||
angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
angular.module('InventoryFormDefinition', ['ScanJobsListDefinition'])
|
||||||
.value('InventoryFormObject', {
|
.value('InventoryFormObject', {
|
||||||
|
|
||||||
addTitle: 'Create Inventory',
|
addTitle: 'New Inventory',
|
||||||
editTitle: '{{ inventory_name }}',
|
editTitle: '{{ inventory_name }}',
|
||||||
name: 'inventory',
|
name: 'inventory',
|
||||||
well: true,
|
|
||||||
collapse: true,
|
collapse: true,
|
||||||
collapseTitle: "Properties",
|
collapseTitle: "Properties",
|
||||||
collapseMode: 'edit',
|
collapseMode: 'edit',
|
||||||
collapseOpen: true,
|
collapseOpen: true,
|
||||||
|
|
||||||
actions: {
|
|
||||||
stream: {
|
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
|
||||||
ngClick: "showActivity()",
|
|
||||||
awToolTip: "View Activity Stream",
|
|
||||||
awFeature: 'activity_streams',
|
|
||||||
dataPlacement: "top",
|
|
||||||
icon: "icon-comments-alt",
|
|
||||||
mode: 'edit',
|
|
||||||
iconSize: 'large'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
inventory_name: {
|
inventory_name: {
|
||||||
realName: 'name',
|
realName: 'name',
|
||||||
@@ -89,9 +75,8 @@ export default
|
|||||||
ngClick: 'formSave()',
|
ngClick: 'formSave()',
|
||||||
ngDisabled: true
|
ngDisabled: true
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()'
|
||||||
ngDisabled: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -15,36 +15,15 @@ export default
|
|||||||
|
|
||||||
.value ('JobTemplateFormObject', {
|
.value ('JobTemplateFormObject', {
|
||||||
|
|
||||||
addTitle: 'Create Job Templates',
|
addTitle: 'New Job Template',
|
||||||
editTitle: '{{ name }}',
|
editTitle: '{{ name }}',
|
||||||
name: 'job_templates',
|
name: 'job_templates',
|
||||||
twoColumns: true,
|
|
||||||
well: true,
|
|
||||||
base: 'job_templates',
|
base: 'job_templates',
|
||||||
collapse: true,
|
collapse: true,
|
||||||
collapseTitle: "Properties",
|
collapseTitle: "Properties",
|
||||||
collapseMode: 'edit',
|
collapseMode: 'edit',
|
||||||
collapseOpenFirst: true, //Always open first panel
|
collapseOpenFirst: true, //Always open first panel
|
||||||
|
|
||||||
actions: {
|
|
||||||
// submit: {
|
|
||||||
// ngClick: 'launch()',
|
|
||||||
// awToolTip: 'Start a job using this template',
|
|
||||||
// dataPlacement: 'top',
|
|
||||||
// mode: 'edit'
|
|
||||||
// },
|
|
||||||
stream: {
|
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
|
||||||
ngClick: "showActivity()",
|
|
||||||
awToolTip: "View Activity Stream",
|
|
||||||
awFeature: 'activity_streams',
|
|
||||||
dataPlacement: "top",
|
|
||||||
icon: "icon-comments-alt",
|
|
||||||
mode: 'edit',
|
|
||||||
iconSize: 'large'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
@@ -326,9 +305,8 @@ export default
|
|||||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||||
ngDisabled: "job_templates_form.$invalid || can_edit!==true"//true //Disable when $pristine or $invalid, optional and when can_edit = false, for permission reasons
|
ngDisabled: "job_templates_form.$invalid || can_edit!==true"//true //Disable when $pristine or $invalid, optional and when can_edit = false, for permission reasons
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()'
|
||||||
ngDisabled: true //Disabled when $pristine
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -14,28 +14,14 @@ export default
|
|||||||
angular.module('OrganizationFormDefinition', [])
|
angular.module('OrganizationFormDefinition', [])
|
||||||
.value('OrganizationForm', {
|
.value('OrganizationForm', {
|
||||||
|
|
||||||
addTitle: 'Create Organization', //Title in add mode
|
addTitle: 'New Organization', //Title in add mode
|
||||||
editTitle: '{{ name }}', //Title in edit mode
|
editTitle: '{{ name }}', //Title in edit mode
|
||||||
name: 'organization', //entity or model name in singular form
|
name: 'organization', //entity or model name in singular form
|
||||||
well: true,
|
|
||||||
collapse: true,
|
collapse: true,
|
||||||
collapseTitle: "Properties",
|
collapseTitle: "Properties",
|
||||||
collapseMode: 'edit',
|
collapseMode: 'edit',
|
||||||
collapseOpen: true,
|
collapseOpen: true,
|
||||||
|
|
||||||
actions: {
|
|
||||||
stream: {
|
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
|
||||||
ngClick: "showActivity()",
|
|
||||||
awToolTip: "View Activity Stream",
|
|
||||||
awFeature: 'activity_streams',
|
|
||||||
dataPlacement: "top",
|
|
||||||
icon: "icon-comments-alt",
|
|
||||||
mode: 'edit',
|
|
||||||
iconSize: 'large'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
@@ -57,9 +43,8 @@ export default
|
|||||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()'
|
||||||
ngDisabled: true //Disabled when $pristine
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -14,29 +14,15 @@ export default
|
|||||||
angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||||
.value('ProjectsFormObject', {
|
.value('ProjectsFormObject', {
|
||||||
|
|
||||||
addTitle: 'Create Project',
|
addTitle: 'New Project',
|
||||||
editTitle: '{{ name }}',
|
editTitle: '{{ name }}',
|
||||||
name: 'project',
|
name: 'project',
|
||||||
forceListeners: true,
|
forceListeners: true,
|
||||||
well: true,
|
|
||||||
collapse: true,
|
collapse: true,
|
||||||
collapseTitle: "Properties",
|
collapseTitle: "Properties",
|
||||||
collapseMode: 'edit',
|
collapseMode: 'edit',
|
||||||
collapseOpen: true,
|
collapseOpen: true,
|
||||||
|
|
||||||
actions: {
|
|
||||||
stream: {
|
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
|
||||||
ngClick: "showActivity()",
|
|
||||||
awToolTip: "View Activity Stream",
|
|
||||||
awFeature: 'activity_streams',
|
|
||||||
dataPlacement: "top",
|
|
||||||
icon: "icon-comments-alt",
|
|
||||||
mode: 'edit',
|
|
||||||
iconSize: 'large'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
@@ -235,9 +221,8 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
|||||||
ngClick: 'formSave()',
|
ngClick: 'formSave()',
|
||||||
ngDisabled: true
|
ngDisabled: true
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()'
|
||||||
ngDisabled: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -14,28 +14,14 @@ export default
|
|||||||
angular.module('TeamFormDefinition', [])
|
angular.module('TeamFormDefinition', [])
|
||||||
.value('TeamForm', {
|
.value('TeamForm', {
|
||||||
|
|
||||||
addTitle: 'Create Team', //Legend in add mode
|
addTitle: 'New Team', //Legend in add mode
|
||||||
editTitle: '{{ name }}', //Legend in edit mode
|
editTitle: '{{ name }}', //Legend in edit mode
|
||||||
name: 'team',
|
name: 'team',
|
||||||
well: true,
|
|
||||||
collapse: true,
|
collapse: true,
|
||||||
collapseTitle: "Properties",
|
collapseTitle: "Properties",
|
||||||
collapseMode: 'edit',
|
collapseMode: 'edit',
|
||||||
collapseOpen: true,
|
collapseOpen: true,
|
||||||
|
|
||||||
actions: {
|
|
||||||
stream: {
|
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
|
||||||
ngClick: "showActivity()",
|
|
||||||
awToolTip: "View Activity Stream",
|
|
||||||
awFeature: 'activity_streams',
|
|
||||||
dataPlacement: "top",
|
|
||||||
icon: "icon-comments-alt",
|
|
||||||
mode: 'edit',
|
|
||||||
iconSize: 'large'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
name: {
|
||||||
label: 'Name',
|
label: 'Name',
|
||||||
@@ -68,9 +54,8 @@ export default
|
|||||||
ngClick: 'formSave()',
|
ngClick: 'formSave()',
|
||||||
ngDisabled: true
|
ngDisabled: true
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()'
|
||||||
ngDisabled: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -14,29 +14,15 @@ export default
|
|||||||
angular.module('UserFormDefinition', [])
|
angular.module('UserFormDefinition', [])
|
||||||
.value('UserForm', {
|
.value('UserForm', {
|
||||||
|
|
||||||
addTitle: 'Create User',
|
addTitle: 'New User',
|
||||||
editTitle: '{{ username }}',
|
editTitle: '{{ username }}',
|
||||||
name: 'user',
|
name: 'user',
|
||||||
well: true,
|
|
||||||
forceListeners: true,
|
forceListeners: true,
|
||||||
collapse: true,
|
collapse: true,
|
||||||
collapseTitle: "Properties",
|
collapseTitle: "Properties",
|
||||||
collapseMode: 'edit',
|
collapseMode: 'edit',
|
||||||
collapseOpen: true,
|
collapseOpen: true,
|
||||||
|
|
||||||
actions: {
|
|
||||||
stream: {
|
|
||||||
'class': "btn-primary btn-xs activity-btn",
|
|
||||||
ngClick: "showActivity()",
|
|
||||||
awToolTip: "View Activity Stream",
|
|
||||||
awFeature: 'activity_streams',
|
|
||||||
dataPlacement: "top",
|
|
||||||
icon: "icon-comments-alt",
|
|
||||||
mode: 'edit',
|
|
||||||
iconSize: 'large'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
first_name: {
|
first_name: {
|
||||||
label: 'First Name',
|
label: 'First Name',
|
||||||
@@ -123,9 +109,8 @@ export default
|
|||||||
ngClick: 'formSave()',
|
ngClick: 'formSave()',
|
||||||
ngDisabled: true
|
ngDisabled: true
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()'
|
||||||
ngDisabled: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,8 @@ export default
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cancel
|
scope.formCancel = function () {
|
||||||
scope.formReset = function () {
|
$state.transitionTo('inventoryScripts');
|
||||||
generator.reset();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<div class="tab-pane" id="inventory_scripts_add">
|
<div class="tab-pane" id="inventory_scripts_add">
|
||||||
<div ng-cloak id="htmlTemplate"></div>
|
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -89,13 +89,8 @@ export default
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.formReset = function () {
|
$scope.formCancel = function () {
|
||||||
generator.reset();
|
$state.transitionTo('inventoryScripts');
|
||||||
for (var fld in master) {
|
|
||||||
$scope[fld] = master[fld];
|
|
||||||
}
|
|
||||||
$scope.organization_name = master.organization_name;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<div class="tab-pane" id="inventory_scripts_edit">
|
<div class="tab-pane" id="inventory_scripts_edit">
|
||||||
<div ng-cloak id="htmlTemplate"></div>
|
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,10 +13,9 @@
|
|||||||
export default function() {
|
export default function() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
// addTitle: 'Create Custom Inventory',
|
addTitle: 'New Custom Inventory',
|
||||||
// editTitle: '{{ name }}',
|
editTitle: '{{ name }}',
|
||||||
// name: 'custom_inventory',
|
name: 'custom_inventory',
|
||||||
well: true,
|
|
||||||
showActions: true,
|
showActions: true,
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
@@ -66,9 +65,8 @@ export default function() {
|
|||||||
ngClick: 'formSave()', //$scope.function to call on click, optional
|
ngClick: 'formSave()', //$scope.function to call on click, optional
|
||||||
ngDisabled: true //Disable when $pristine or $invalid, optional
|
ngDisabled: true //Disable when $pristine or $invalid, optional
|
||||||
},
|
},
|
||||||
reset: {
|
cancel: {
|
||||||
ngClick: 'formReset()',
|
ngClick: 'formCancel()',
|
||||||
ngDisabled: true //Disabled when $pristine
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="tab-pane" id="inventory_scripts">
|
<div class="tab-pane" id="inventory_scripts">
|
||||||
<div ui-view></div>
|
<div ui-view></div>
|
||||||
<div ng-cloak id="htmlTemplate"></div>
|
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="tab-pane" id="organizations">
|
<div class="tab-pane" id="organizations">
|
||||||
<div ui-view></div>
|
<div ui-view></div>
|
||||||
<div ng-cloak id="htmlTemplate"></div>
|
<div ng-cloak id="htmlTemplate" class="Panel"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<div ng-cloak id="htmlTemplate"></div>
|
|
||||||
@@ -82,6 +82,7 @@
|
|||||||
@submit-button-text: @default-bg;
|
@submit-button-text: @default-bg;
|
||||||
@submit-button-bg: @default-succ;
|
@submit-button-bg: @default-succ;
|
||||||
@submit-button-bg-hov: @default-succ-hov;
|
@submit-button-bg-hov: @default-succ-hov;
|
||||||
|
@submit-button-bg-dis: @default-second-border;
|
||||||
|
|
||||||
// footer
|
// footer
|
||||||
@copyright-text: @default-interface-txt;
|
@copyright-text: @default-interface-txt;
|
||||||
|
|||||||
@@ -730,9 +730,9 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "for=\"" + fld + '">\n';
|
html += "for=\"" + fld + '">\n';
|
||||||
html += (field.icon) ? Icon(field.icon) : "";
|
html += (field.icon) ? Icon(field.icon) : "";
|
||||||
if (field.labelBind) {
|
if (field.labelBind) {
|
||||||
html += "\t\t<span class=\"label-text\" ng-bind=\"" + field.labelBind + "\">\n\t\t</span>";
|
html += "\t\t<span class=\"Form-inputLabel\" ng-bind=\"" + field.labelBind + "\">\n\t\t</span>";
|
||||||
} else {
|
} else {
|
||||||
html += "\t\t<span class=\"label-text\">\n\t\t\t" + field.label + "\n\t\t</span>";
|
html += "\t\t<span class=\"Form-inputLabel\">\n\t\t\t" + field.label + "\n\t\t</span>";
|
||||||
}
|
}
|
||||||
html += (field.awPopOver && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
|
html += (field.awPopOver && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
|
||||||
html += (field.hintText) ? "\n\t\t<span class=\"label-hint-text\">\n\t\t\t<i class=\"fa fa-info-circle\">\n\t\t\t</i>\n\t\t\tHint: " + field.hintText + "\n\t\t</span>" : "";
|
html += (field.hintText) ? "\n\t\t<span class=\"label-hint-text\">\n\t\t\t<i class=\"fa fa-info-circle\">\n\t\t\t</i>\n\t\t\tHint: " + field.hintText + "\n\t\t</span>" : "";
|
||||||
@@ -769,7 +769,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((!field.readonly) || (field.readonly && options.mode === 'edit')) {
|
if ((!field.readonly) || (field.readonly && options.mode === 'edit')) {
|
||||||
html += "<div class='form-group ";
|
html += "<div class='form-group Form-formGroup";
|
||||||
html += (field['class']) ? (field['class']) : "";
|
html += (field['class']) ? (field['class']) : "";
|
||||||
html += "'";
|
html += "'";
|
||||||
html += (field.ngShow) ? this.attr(field, 'ngShow') : "";
|
html += (field.ngShow) ? this.attr(field, 'ngShow') : "";
|
||||||
@@ -1241,7 +1241,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += ">";
|
html += ">";
|
||||||
html += buildCheckbox(this.form, field, fld, undefined, false);
|
html += buildCheckbox(this.form, field, fld, undefined, false);
|
||||||
html += (field.icon) ? Icon(field.icon) : "";
|
html += (field.icon) ? Icon(field.icon) : "";
|
||||||
html += '<span class=\"label-text\">' + field.label + "</span>";
|
html += '<span class=\"Form-inputLabel\">' + field.label + "</span>";
|
||||||
html += (field.awPopOver) ? this.attr(field, 'awPopOver', fld) : "";
|
html += (field.awPopOver) ? this.attr(field, 'awPopOver', fld) : "";
|
||||||
html += "</label>\n";
|
html += "</label>\n";
|
||||||
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" +
|
html += "<div class=\"error api-error\" id=\"" + this.form.name + "-" + fld + "-api-error\" ng-bind=\"" +
|
||||||
@@ -1396,19 +1396,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
|
|
||||||
getActions: function (options) {
|
|
||||||
// Use to add things like Activity Stream to a detail page
|
|
||||||
var html = "<div class=\"list-actions\">\n", action;
|
|
||||||
for (action in this.form.actions) {
|
|
||||||
if (this.form.actions[action].mode === 'all' || this.form.actions[action].mode === options.mode) {
|
|
||||||
html += this.button({ btn: this.form.actions[action], iconName: action, toolbar: true });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
html += "</div>\n";
|
|
||||||
return html;
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
build: function (options) {
|
build: function (options) {
|
||||||
//
|
//
|
||||||
// Generate HTML. Do NOT call this function directly. Called by inject(). Returns an HTML
|
// Generate HTML. Do NOT call this function directly. Called by inject(). Returns an HTML
|
||||||
@@ -1427,62 +1414,27 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
options.collapseAlreadyStarted = true;
|
options.collapseAlreadyStarted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the well
|
|
||||||
if (!this.modal && this.form.well) {
|
|
||||||
if ( !(this.form.collapse && this.form.collapseMode === options.mode)) {
|
|
||||||
html += "<div class=\"aw-form-well\">\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((options.showActions === undefined || options.showActions === true) && !this.modal && this.form.actions) {
|
// title and exit button
|
||||||
html += this.getActions(options);
|
html += "<div class=\"Form-header\">";
|
||||||
}
|
html += "<div class=\"Form-title\">";
|
||||||
|
html += (options.mode === 'edit') ? this.form.editTitle : this.form.addTitle;
|
||||||
|
html += "</div>\n";
|
||||||
|
|
||||||
// Add a title and optionally a close button (used on Inventory->Groups)
|
html += "<div class=\"Form-exitHolder\">";
|
||||||
/*if ((!options.modal) && this.form.showTitle) {
|
html += "<button class=\"Form-exit\" ng-click=\"formCancel()\">";
|
||||||
html += "<div class=\"form-title\">";
|
html += "<i class=\"fa fa-times-circle\"></i>";
|
||||||
html += (options.mode === 'edit') ? this.form.editTitle : this.form.addTitle;
|
html += "</button></div>\n";
|
||||||
if (this.has('titleActions')) {
|
|
||||||
html += "<div class=\"title-actions pull-right\">\n";
|
|
||||||
for (btn in this.form.titleActions) {
|
|
||||||
html += this.button({
|
|
||||||
btn: this.form.titleActions[btn],
|
|
||||||
action: btn,
|
|
||||||
toolbar: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
html += "</div>\n";
|
|
||||||
}
|
|
||||||
html += "</div>\n";
|
|
||||||
html += "<hr class=\"form-title-hr\">\n";
|
|
||||||
}*/
|
|
||||||
|
|
||||||
html += "<form class=\"";
|
html += "</div>\n"; //end of Form-header
|
||||||
|
|
||||||
|
html += "<form class=\"Form";
|
||||||
html += (this.form.horizontal) ? "form-horizontal" : "";
|
html += (this.form.horizontal) ? "form-horizontal" : "";
|
||||||
html += (this.form['class']) ? ' ' + this.form['class'] : '';
|
html += (this.form['class']) ? ' ' + this.form['class'] : '';
|
||||||
html += "\" name=\"" + this.form.name + "_form\" id=\"" + this.form.name + "_form\" autocomplete=\"off\" novalidate>\n";
|
html += "\" name=\"" + this.form.name + "_form\" id=\"" + this.form.name + "_form\" autocomplete=\"off\" novalidate>\n";
|
||||||
html += "<div ng-show=\"flashMessage != null && flashMessage != undefined\" class=\"alert alert-info\">{{ flashMessage }}</div>\n";
|
html += "<div ng-show=\"flashMessage != null && flashMessage != undefined\" class=\"alert alert-info\">{{ flashMessage }}</div>\n";
|
||||||
|
|
||||||
if (this.form.twoColumns) {
|
if (this.form.tabs) {
|
||||||
html += "<div class=\"row\">\n";
|
|
||||||
html += "<div class=\"col-lg-6\">\n";
|
|
||||||
for (fld in this.form.fields) {
|
|
||||||
field = this.form.fields[fld];
|
|
||||||
if (field.column === 1) {
|
|
||||||
html += this.buildField(fld, field, options, this.form);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
html += "</div><!-- column 1 -->\n";
|
|
||||||
html += "<div class=\"col-lg-6\">\n";
|
|
||||||
for (fld in this.form.fields) {
|
|
||||||
field = this.form.fields[fld];
|
|
||||||
if (field.column === 2) {
|
|
||||||
html += this.buildField(fld, field, options, this.form);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
html += "</div><!-- column 2 -->\n";
|
|
||||||
html += "</div>\n";
|
|
||||||
} else if (this.form.tabs) {
|
|
||||||
html += "<ul id=\"" + this.form.name + "_tabs\" class=\"nav nav-tabs\">\n";
|
html += "<ul id=\"" + this.form.name + "_tabs\" class=\"nav nav-tabs\">\n";
|
||||||
for (i = 0; i < this.form.tabs.length; i++) {
|
for (i = 0; i < this.form.tabs.length; i++) {
|
||||||
tab = this.form.tabs[i];
|
tab = this.form.tabs[i];
|
||||||
@@ -1548,17 +1500,13 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html += "</form>\n";
|
||||||
|
|
||||||
//buttons
|
//buttons
|
||||||
if ((options.showButtons === undefined || options.showButtons === true) && !this.modal) {
|
if ((options.showButtons === undefined || options.showButtons === true) && !this.modal) {
|
||||||
if (this.has('buttons')) {
|
if (this.has('buttons')) {
|
||||||
|
|
||||||
if (this.form.twoColumns) {
|
html += "<div class=\"buttons Form-buttons\" ";
|
||||||
html += "<div class=\"row\">\n";
|
|
||||||
html += "<div class=\"col-lg-12\">\n";
|
|
||||||
html += "<hr />\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
html += "<div class=\"buttons\" ";
|
|
||||||
html += "id=\"" + this.form.name + "_controls\" ";
|
html += "id=\"" + this.form.name + "_controls\" ";
|
||||||
|
|
||||||
html += ">\n";
|
html += ">\n";
|
||||||
@@ -1579,11 +1527,11 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
// Set default color and label for Save and Reset
|
// Set default color and label for Save and Reset
|
||||||
if (btn === 'save') {
|
if (btn === 'save') {
|
||||||
button.label = 'Save';
|
button.label = 'Save';
|
||||||
button['class'] = 'btn-primary';
|
button['class'] = 'Form-saveButton';
|
||||||
}
|
}
|
||||||
if (btn === 'reset') {
|
if (btn === 'cancel') {
|
||||||
button.label = 'Reset';
|
button.label = 'Cancel';
|
||||||
button['class'] = 'btn-default';
|
button['class'] = 'Form-cancelButton';
|
||||||
}
|
}
|
||||||
if (btn === 'launch') {
|
if (btn === 'launch') {
|
||||||
button.label = 'Launch';
|
button.label = 'Launch';
|
||||||
@@ -1617,9 +1565,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
html += ">";
|
html += ">";
|
||||||
html += SelectIcon({
|
|
||||||
action: btn
|
|
||||||
});
|
|
||||||
html += " " + button.label + "</button>\n";
|
html += " " + button.label + "</button>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1629,17 +1574,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form.twoColumns) {
|
|
||||||
html += "</div>\n";
|
|
||||||
html += "</div>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
html += "</form>\n";
|
|
||||||
|
|
||||||
if (!this.modal && this.form.well) {
|
|
||||||
if ( !(this.form.collapse && this.form.collapseMode === options.mode)) {
|
|
||||||
html += "</div>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,9 +134,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
case 'scm_update':
|
case 'scm_update':
|
||||||
icon = 'fa-cloud-download';
|
icon = 'fa-cloud-download';
|
||||||
break;
|
break;
|
||||||
case 'cancel':
|
|
||||||
icon = 'fa-minus-circle';
|
|
||||||
break;
|
|
||||||
case 'run':
|
case 'run':
|
||||||
case 'rerun':
|
case 'rerun':
|
||||||
case 'submit':
|
case 'submit':
|
||||||
@@ -157,7 +154,6 @@ angular.module('GeneratorHelpers', [systemStatus.name])
|
|||||||
case 'close':
|
case 'close':
|
||||||
icon = 'fa-arrow-left';
|
icon = 'fa-arrow-left';
|
||||||
break;
|
break;
|
||||||
case 'save':
|
|
||||||
case 'form_submit':
|
case 'form_submit':
|
||||||
icon = 'fa-check-square-o';
|
icon = 'fa-check-square-o';
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user