mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 16:58:46 -03:30
Adding EULA text for fresh Tower install
The EULA text needed to be added for when a new user needs to input a tower license for the first time.
This commit is contained in:
@@ -38,9 +38,7 @@ angular.module('LicenseUpdateFormDefinition', [])
|
|||||||
label: 'I agree to the End User License Agreement',
|
label: 'I agree to the End User License Agreement',
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
addRequired: true,
|
addRequired: true,
|
||||||
editRequird: true,
|
editRequird: true
|
||||||
trueValue: 'true',
|
|
||||||
falseValue: 'false'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttons: {
|
buttons: {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateF
|
|||||||
|
|
||||||
// Don't do anything when the license is valid
|
// Don't do anything when the license is valid
|
||||||
if (!notify) {
|
if (!notify) {
|
||||||
return true;
|
return true; // if the license is valid it would exit 'test' here, otherwise it moves on to making the modal for the license
|
||||||
}
|
}
|
||||||
|
|
||||||
html = this.getHTML(license);
|
html = this.getHTML(license);
|
||||||
@@ -209,8 +209,14 @@ function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateF
|
|||||||
scope.parseType = 'json';
|
scope.parseType = 'json';
|
||||||
|
|
||||||
scope.removeLicenseDialogReady = scope.$on('LicenseDialogReady', function() {
|
scope.removeLicenseDialogReady = scope.$on('LicenseDialogReady', function() {
|
||||||
|
// scope.eula_agreement = false;
|
||||||
|
$('#license_license_json').attr('ng-required' , 'true' );
|
||||||
|
$('#license_eula_agreement_chbox').attr('ng-required' , 'true' );
|
||||||
|
$('#license-submit-button').attr('ng-disabled' , "license_form.$invalid" );
|
||||||
var e = angular.element(document.getElementById('license-modal-dialog'));
|
var e = angular.element(document.getElementById('license-modal-dialog'));
|
||||||
$compile(e)(scope);
|
$compile(e)(scope);
|
||||||
|
e = angular.element(document.getElementById('license-submit-button'));
|
||||||
|
$compile(e)(scope);
|
||||||
$('#license-modal-dialog').dialog('open');
|
$('#license-modal-dialog').dialog('open');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -245,14 +251,15 @@ function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateF
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
height = (IsAdmin()) ? 600 : 350;
|
height = (IsAdmin()) ? 675 : 350;
|
||||||
|
|
||||||
if (scope.removeLicenseReady) {
|
if (scope.removeLicenseReady) {
|
||||||
scope.removeLicenseReady();
|
scope.removeLicenseReady();
|
||||||
}
|
}
|
||||||
scope.removeLicenseReady = scope.$on('LicenseReady', function(e, data) {
|
scope.removeLicenseReady = scope.$on('LicenseReady', function(e, data) {
|
||||||
|
|
||||||
scope.license_json = " ";
|
scope.license_json = "";
|
||||||
|
scope.eula = data.eula;
|
||||||
if (data.license_info && data.license_info.valid_key !== undefined) {
|
if (data.license_info && data.license_info.valid_key !== undefined) {
|
||||||
scope.license_json = JSON.stringify(data.license_info, null, ' ');
|
scope.license_json = JSON.stringify(data.license_info, null, ' ');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user