diff --git a/awx/ui/static/js/forms/LicenseUpdate.js b/awx/ui/static/js/forms/LicenseUpdate.js index 38b55dd46b..55e18791fa 100644 --- a/awx/ui/static/js/forms/LicenseUpdate.js +++ b/awx/ui/static/js/forms/LicenseUpdate.js @@ -25,15 +25,30 @@ angular.module('LicenseUpdateFormDefinition', []) editRequird: true, rows: 10, 'default': '---' + }, + eula: { + label: 'End User License Agreement', + type: 'textarea', + addRequired: true, + editRequird: true, + rows: 5, + readonly: true + }, + eula_agreement: { + label: 'I agree to the End User License Agreement', + type: 'checkbox', + addRequired: true, + editRequird: true, + trueValue: 'true', + falseValue: 'false' } }, - buttons: { form_submit: { label: "Submit", "class": "pull-right btn-primary", ngClick: "submitLicenseKey()", - ngDisabled: true + // ngDisabled: "true" } }, diff --git a/awx/ui/static/js/helpers/License.js b/awx/ui/static/js/helpers/License.js index 26c411bdf2..c148713c2f 100644 --- a/awx/ui/static/js/helpers/License.js +++ b/awx/ui/static/js/helpers/License.js @@ -1,4 +1,3 @@ - /****************************************************** * Copyright (c) 2014 AnsibleWorks, Inc. * @@ -157,6 +156,7 @@ function($rootScope, $compile, CreateDialog, Store, LicenseUpdateForm, GenerateF scope = (in_scope) ? in_scope : self.scope; json_data = ToJSON('json', license_key); + json_data.eula_accepted = (scope.eula_agreement === "true") ? true : false; if (typeof json_data === 'object' && Object.keys(json_data).length > 0) { Rest.setUrl(url); Rest.post(json_data) @@ -359,6 +359,8 @@ function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, G scope.parseType = 'json'; scope.license_json = JSON.stringify(self.license, null, ' '); + scope.eula = self.eula; + scope.eula_agreement = false; h = CheckLicense.getHTML(self.getLicense(),true).body; $('#license-modal-dialog #license_tabs').append("
To purchase a license or extend an existing license ' + 'visit the Ansible online store, ' + 'or visit support.ansible.com for assistance.
'; - if (license && !Authorization.licenseTested()) { // This is our first time evaluating the license license.tested = true; @@ -619,3 +630,4 @@ function ($location, $rootScope, $compile, $filter, GenerateForm, Rest, Alert, G } ]); */ + diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index e8e005a691..bc741ca16a 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -360,6 +360,10 @@ textarea.allowresize { color: @grey-txt; } +#license_eula{ + white-space: nowrap; +} + .modal-dialog .ui-accordion .ui-accordion-content { overflow: hidden; }