Merge pull request #5724 from mabashian/canEditOrg-fixes

Users can interact with organization field when adding
This commit is contained in:
Michael Abashian
2017-03-15 10:56:14 -04:00
committed by GitHub
6 changed files with 6 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log,
init(); init();
function init() { function init() {
$scope.canEditOrg = true;
// Load the list of options for Kind // Load the list of options for Kind
GetChoices({ GetChoices({
scope: $scope, scope: $scope,

View File

@@ -314,6 +314,7 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
init(); init();
function init() { function init() {
$scope.canEditOrg = true;
Rest.setUrl(GetBasePath('projects')); Rest.setUrl(GetBasePath('projects'));
Rest.options() Rest.options()
.success(function(data) { .success(function(data) {

View File

@@ -110,6 +110,7 @@ export function TeamsAdd($scope, $rootScope, $stateParams, TeamForm, GenerateFor
init(); init();
function init() { function init() {
$scope.canEditOrg = true;
// apply form definition's default field values // apply form definition's default field values
GenerateForm.applyDefaults(form, $scope); GenerateForm.applyDefaults(form, $scope);

View File

@@ -55,7 +55,7 @@ export default
dataPlacement: 'right', dataPlacement: 'right',
column: 1, column: 1,
ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate) || !canEditOrg', ngDisabled: '!(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate) || !canEditOrg',
awLookupWhen: '(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAdd) && canEditOrg' awLookupWhen: '(workflow_job_template_obj.summary_fields.user_capabilities.edit || canAddWorkflowJobTemplate) && canEditOrg'
}, },
labels: { labels: {
label: i18n._('Labels'), label: i18n._('Labels'),

View File

@@ -39,6 +39,7 @@ function InventoriesAdd($scope, $rootScope, $compile, $location, $log,
init(); init();
function init() { function init() {
$scope.canEditOrg = true;
form.formLabelSize = null; form.formLabelSize = null;
form.formFieldSize = null; form.formFieldSize = null;

View File

@@ -29,6 +29,7 @@
generator = GenerateForm; generator = GenerateForm;
function init() { function init() {
$scope.canEditOrg = true;
$scope.parseType = 'yaml'; $scope.parseType = 'yaml';
$scope.can_edit = true; $scope.can_edit = true;
// apply form definition's default field values // apply form definition's default field values