OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Successful happy path; WIP: error handling
Inga Mai739419799840
diff --git a/app/assets/stylesheets/content/_enterprise.sass b/app/assets/stylesheets/content/_enterprise.sassindex 8bb30195be6..02439a5b045 100644--- a/app/assets/stylesheets/content/_enterprise.sass+++ b/app/assets/stylesheets/content/_enterprise.sass@@ -14,3 +14,24 @@.token-form textareafont-family: "Lucida Console", Monaco, monospacemax-width: 560px++.upsale-benefits+ list-style: none+ display: flex+ margin: 0+ li+ margin: 15px++#enterprise-trial-form+ .form--field-instructions+ color: $content-form-danger-zone-bg-color+ margin-left: 0++#resend-link+ float: right++.status--confirmed+ color: $button--alt-highlight-background-color+.status--waiting+ color: orange+diff --git a/app/helpers/augur_helper.rb b/app/helpers/augur_helper.rbnew file mode 100644index 00000000000..12f736eb85d--- /dev/null+++ b/app/helpers/augur_helper.rb@@ -0,0 +1,7 @@+module AugurHelper+ def augur_content_security_policy+ controller.append_content_security_policy_directives(+ connect_src: %w(augur.openproject-edge.com)+ )+ end+end\ No newline at end of filediff --git a/app/views/enterprises/_info.html.erb b/app/views/enterprises/_info.html.erbindex 36c98b6d027..02c14281dc1 100644--- a/app/views/enterprises/_info.html.erb+++ b/app/views/enterprises/_info.html.erb@@ -26,18 +26,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>+<span hidden><%= augur_content_security_policy %></span><p>- <b><%= t('homescreen.blocks.upsale.become_hero') %></b> <%= t('homescreen.blocks.upsale.you_contribute') %>+ <b><%= t('js.admin.enterprise.upsale.become_hero') %></b> <%= t('js.admin.enterprise.upsale.you_contribute') %></p><enterprise></enterprise>-<ul class="">+<ul class="upsale-benefits"><li>- <%= t('homescreen.blocks.upsale.additional_features') %>+ <p>+ <b><%= t('js.admin.enterprise.upsale.benefits.installation') %></b>+ </p>+ <p><%= t('js.admin.enterprise.upsale.benefits.installation_text') %></p></li><li>- <%= t('homescreen.blocks.upsale.professional_support') %>+ <p>+ <b><%= t('js.admin.enterprise.upsale.benefits.professional_support') %></b>+ </p>+ <p><%= t('js.admin.enterprise.upsale.benefits.professional_support_text') %></p>+ </li>+ <li>+ <p>+ <b><%= t('js.admin.enterprise.upsale.benefits.premium_features') %></b>+ </p>+ <p><%= t('js.admin.enterprise.upsale.benefits.premium_features_text') %></p>+ </li>+ <li>+ <p>+ <b><%= t('js.admin.enterprise.upsale.benefits.high_security') %></b>+ </p>+ <p><%= t('js.admin.enterprise.upsale.benefits.high_security_text') %></p></li></ul>diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex 1a288e8b9ac..4f688c4cd32 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -182,14 +182,30 @@ en:new_group: 'New group'reset_to_defaults: 'Reset to defaults'enterprise:- start_trial: 'Start free trial'- test_ee: 'Test the Enterprise Edition 30 days for free'- label_company: 'Company'- label_first_name: 'First name'- label_last_name: 'Last name'- label_email: 'Email'- label_domain: 'Domain'- next_step: 'In the next step we will send you an email to the email-address provided.'+ trial:+ label_company: 'Company'+ label_first_name: 'First name'+ label_last_name: 'Last name'+ label_email: 'Email'+ label_domain: 'Domain'+ next_step: 'In the next step we will send you an email to the email-address provided.'+ resend_link: 'Resend'+ test_ee: 'Test the Enterprise Edition 30 days for free'+ upsale:+ button_start_trial: 'Start free trial'+ button_book_now: 'Book now'+ button_quote: 'Get a quote'+ become_hero: "Become a hero!"+ benefits:+ high_security: "High security features"+ high_security_text: "Our security features ensure a secure and enterprise-class business application."+ installation: "Installation and alerts"+ installation_text: "Let the OpenProject experts do the installation for you and rely on our fast and secure service."+ premium_features: "Premium features"+ premium_features_text: "Enjoy additional powerful premium features which make your OpenProject even better."+ professional_support: "Professional support"+ professional_support_text: "Our professional support service engineers guarantee quick and friendly issue solving."+ you_contribute: "Developers need to pay their bills, too. With Enterprise Edition you substantially contribute to this Open-Source community effort."custom_actions:date:diff --git a/frontend/src/app/angular4-modules.ts b/frontend/src/app/angular4-modules.tsindex 032c8c097de..ff9b92bfa7e 100644--- a/frontend/src/app/angular4-modules.ts+++ b/frontend/src/app/angular4-modules.ts@@ -27,6 +27,7 @@// ++import {APP_INITIALIZER, ApplicationRef, Injector, NgModule} from '@angular/core';+import {ReactiveFormsModule} from '@angular/forms';import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module';import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive';@@ -39,7 +40,6 @@ import {ConfirmDialogModal} from "core-components/modals/confirm-dialog/confirm-import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service";import {DynamicContentModal} from "core-components/modals/modal-wrapper/dynamic-content.modal";import {PasswordConfirmationModal} from "core-components/modals/request-for-confirmation/password-confirmation.modal";-import {EnterpriseComponent} from "core-components/enterprise/enterprise.component";import {EnterpriseTrialModal} from "core-components/enterprise/enterprise-modal/enterprise-trial.modal";import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module";import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";@@ -129,6 +129,9 @@ import {OpenprojectMembersModule} from "core-app/modules/members/members.module"// MembersOpenprojectMembersModule,++ // Angular Forms+ ReactiveFormsModule],providers: [{provide: States, useValue: new States()},diff --git a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.html b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.htmlindex b811bcf40ee..e7c8e2769d1 100644--- a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.html+++ b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.html@@ -2,108 +2,158 @@<div class="op-modal--modal-container"data-indicator-name="modal"tabindex="0">- <div class="op-modal--modal-header">- <h3> {{ text.label_test_ee }}</h3>- <a class="op-modal--modal-close-button" *ngIf="showClose">- <i- class="icon-close"- (click)="closeMe($event)"- [attr.title]="text.close_popup">- </i>- </a>- </div>+ <div class="op-modal--modal-header">+ <h3 *ngIf="!status"> {{ text.label_test_ee }}</h3>+ <h3 *ngIf="status === 'mailSubmitted'">Confirmation of email-address</h3>+ <h3 *ngIf="status === 'startTrial'">Next steps</h3>+ <a class="op-modal--modal-close-button" *ngIf="showClose">+ <i+ class="icon-close"+ (click)="closeModal($event)"+ [attr.title]="text.close_popup">+ </i>+ </a>+ </div>- <div class="ngdialog-body op-modal--modal-body">- <form class="form">- <div class="form--field">- <label class="form--label">{{ text.label_company }}</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">+ <div class="op-modal--modal-body">+ <div *ngIf="!status">+ <form id="enterprise-trial-form" class="form" [formGroup]="enterpriseTrialForm">+ <div class="form--field -required">+ <label class="form--label">{{ text.label_company }}</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text"+ class="form--text-field"+ formControlName="company"+ required>+ </div>+ </div></div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">{{ text.label_first_name }}</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">+ <div class="form--field -required">+ <label class="form--label">{{ text.label_first_name }}</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text"+ class="form--text-field"+ formControlName="first_name"+ required>+ </div>+ </div></div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">{{ text.label_last_name }}</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">+ <div class="form--field -required">+ <label class="form--label">{{ text.label_last_name }}</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text"+ class="form--text-field"+ formControlName="last_name"+ required>+ </div>+ </div></div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">{{ text.label_email }}</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">+ <div class="form--field -required">+ <label class="form--label">{{ text.label_email }}</label>+ <div class="form--field-container" [ngClass]="{ '-required-highlighting': this.errorMsg }">+ <div class="form--text-field-container">+ <input type="email" class="form--text-field" formControlName="email" (blur)="checkMailField()">+ </div>+ </div>+ <div *ngIf="this.errorMsg" class="form--field-instructions">{{ this.errorMsg }}</div></div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">{{ text.label_domain }}</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">+ <div class="form--field -required">+ <label class="form--label">{{ text.label_domain }}</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" formControlName="domain">+ </div>+ </div></div>- </div>+ <div class="form--field -required -trailing-label">+ <label class="form--label -visible-overflow" for="check-terms-of-service">+ <span>I agree with the+ <a href="https://www.openproject.com/terms-of-service/" target="_blank">+ terms of service</a> and the+ <a href="https://www.openproject.com/legal-notice/" target="_blank">privacy policy</a>.+ </span>+ <span class="tooltip--right"+ data-tooltip="You already confirmed the terms of service when you created your OpenProject trial.">+ <i class="icon icon-info1"></i>+ </span>+ </label>+ <div class="form--field-container">+ <div class="form--check-box-container">+ <input class="form--check-box"+ id="check-terms-of-service"+ required type="checkbox"+ formControlName="general_consent">+ </div>+ </div>+ </div>+ <div class="form--field -trailing-label">+ <label class="form--label"+ for="receive_newsletter">+ <span>I want to receive the OpenProject+ <a href="https://www.openproject.com/newsletter/" target="_blank">+ newsletter</a>.+ </span>+ </label>+ <div class="form--field-container">+ <div class="form--check-box-container">+ <input type="checkbox"+ id="receive_newsletter"+ name="receive_newsletter"+ formControlName="newsletter_consent">+ </div>+ </div>+ </div>+ </form>+ <p>{{ text.next_step }}</p></div>-- <div class="form--field -required -trailing-label">- <label class="form--label -visible-overflow" for="check-terms-of-service">- <span>I agree with the- <a href="https://www.openproject.com/terms-of-service/" target="_blank">- terms of service</a> and the- <a href="https://www.openproject.com/legal-notice/" target="_blank">privacy policy</a>.- </span>- <span class="tooltip--right" data-tooltip="You already confirmed the terms of service when you created your OpenProject trial.">- <i class="icon icon-info1"></i>+ <div *ngIf="status === 'mailSubmitted'">+ <p>We sent you an email. Please click the confirmation link provided in this email.</p>+ <p>+ <span>Status: </span>+ <span *ngIf="!confirmed; else confirmedStatus" class="status--waiting">+ email sent - waiting for confirmation+ <a id="resend-link" href="{{ baseUrl + resendLink }}" target="_blank">{{ text.resend }}</a></span>- </label>- <div class="form--field-container">- <div class="form--check-box-container">- <input class="form--check-box" id="check-terms-of-service" required="" type="checkbox">- </div>- </div>+ <ng-template #confirmedStatus>+ <span class="status--confirmed">confirmed ✓</span>+ </ng-template>+ </p>+ <p *ngIf="confirmed">Enterprise token: {{ this.token }}</p></div>- <div class="form--field -trailing-label">- <label class="form--label"- for="receive_newsletter">- <span>I want to receive the OpenProject- <a href="https://www.openproject.com/newsletter/" target="_blank">- newsletter</a>.- </span>- </label>- <div class="form--field-container">- <div class="form--check-box-container">- <input type="checkbox"- id="receive_newsletter"- name="receive_newsletter">- </div>- </div>++ <div *ngIf="status === 'startTrial'">+ <p>Onboarding</p></div>- </form>- <p>text.next_step</p>- </div>- <div class="op-modal--modal-footer">- <button class="confirm-form-submit--continue button -highlight"- (click)="submit($event)"- [textContent]="text.button_submit"- [attr.title]="text.button_submit">- </button>- <button class="confirm-form-submit--cancel button"- (click)="closeMe($event)"- [textContent]="text.button_cancel"- [attr.title]="text.button_cancel">- </button>+ </div>++ <div class="op-modal--modal-footer">+ <div *ngIf="!status; else mailSubmitted">+ <button class="confirm-form-submit--continue button -highlight"+ (click)="onSubmit()"+ [disabled]="!enterpriseTrialForm.valid"+ [textContent]="text.button_submit"+ [attr.title]="text.button_submit"+ [hidden]="status === 'mailSubmitted'">+ </button>+ <button class="confirm-form-submit--cancel button"+ (click)="closeModal($event)"+ [textContent]="text.button_cancel"+ [attr.title]="text.button_cancel">+ </button>+ </div>+ <ng-template #mailSubmitted>+ <button class="confirm-form-submit--continue button -highlight"+ (click)="startEnterpriseTrial()"+ [textContent]="text.button_continue"+ [attr.title]="text.button_continue"+ [disabled]="!confirmed">+ </button>+ </ng-template>+ </div>+</div>- </div>-</div>\ No newline at end of file+ </div>\ No newline at end of filediff --git a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.tsindex 0960c88ab04..2515e3d9e3f 100644--- a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts+++ b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts@@ -26,12 +26,18 @@// See docs/COPYRIGHT.rdoc for more details.// +++import {ChangeDetectorRef, Component, ElementRef, Inject, Input} from "@angular/core";+import {HttpClient, HttpErrorResponse} from "@angular/common/http";+import {FormBuilder, FormControl, FormGroup, Validators} from "@angular/forms";import {OpModalComponent} from "app/components/op-modals/op-modal.component";import {OpModalLocalsToken} from "app/components/op-modals/op-modal.service";-import {ChangeDetectorRef, Component, ElementRef, Inject} from "@angular/core";import {OpModalLocalsMap} from "app/components/op-modals/op-modal.types";import {I18nService} from "app/modules/common/i18n/i18n.service";+import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service";+import {enterpriseEditionUrl} from "core-app/globals/constants.const";+import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service";+export interface EnterpriseTrialOptions {text:{title:string;@@ -48,35 +54,60 @@ export interface EnterpriseTrialOptions {templateUrl: './enterprise-trial.modal.html'})export class EnterpriseTrialModal extends OpModalComponent {+ @Input() public opReferrer:string;- public showClose:boolean;+ // enterprise form+ enterpriseTrialForm = this.formBuilder.group({+ company: ['', Validators.required],+ first_name: ['', Validators.required],+ last_name: ['', Validators.required],+ email: ['', [Validators.required, Validators.email]],+ domain: ['', Validators.required],+ general_consent: [null, Validators.required],+ newsletter_consent: null,+ });+ public baseUrl = 'https://augur.openproject-edge.com';+ public trialLink:string;+ public resendLink:string;+ public token:string;++ public showClose:boolean;public confirmed = false;+ public cancelled = false;+ public status:string;+ public errorMsg:string|undefined;private options:EnterpriseTrialOptions;- public text:any = {- title: this.I18n.t('js.modals.form_submit.title'),- text: this.I18n.t('js.modals.form_submit.text'),+ public text = {button_submit: this.I18n.t('js.modals.button_submit'),button_cancel: this.I18n.t('js.modals.button_cancel'),+ button_continue: this.I18n.t('js.button_continue'),close_popup: this.I18n.t('js.close_popup_title'),- label_test_ee: this.I18n.t('js.admin.enterprise.test_ee'),- label_company: this.I18n.t('js.admin.enterprise.label_company'),- label_first_name: this.I18n.t('js.admin.enterprise.label_first_name'),- label_last_name: this.I18n.t('js.admin.enterprise.label_last_name'),- label_email: this.I18n.t('js.admin.enterprise.label_email'),- label_domain: this.I18n.t('js.admin.enterprise.label_domain'),- next_step: this.I18n.t('js.admin.enterprise.next_step')+ label_test_ee: this.I18n.t('js.admin.enterprise.trial.test_ee'),+ label_company: this.I18n.t('js.admin.enterprise.trial.label_company'),+ label_first_name: this.I18n.t('js.admin.enterprise.trial.label_first_name'),+ label_last_name: this.I18n.t('js.admin.enterprise.trial.label_last_name'),+ label_email: this.I18n.t('js.admin.enterprise.trial.label_email'),+ label_domain: this.I18n.t('js.admin.enterprise.trial.label_domain'),+ next_step: this.I18n.t('js.admin.enterprise.trial.next_step'),+ resend: this.I18n.t('js.admin.enterprise.trial.resend_link'),+ title: this.I18n.t('js.modals.form_submit.title'),+ text: this.I18n.t('js.modals.form_submit.text'),};constructor(readonly elementRef:ElementRef,@Inject(OpModalLocalsToken) public locals:OpModalLocalsMap,readonly cdRef:ChangeDetectorRef,- readonly I18n:I18nService) {-+ readonly I18n:I18nService,+ protected http:HttpClient,+ readonly pathHelper:PathHelperService,+ protected halNotification:HalResourceNotificationService,+ private formBuilder:FormBuilder) {super(locals, cdRef, elementRef);+ // modal configurationthis.options = locals.options || {};this.closeOnEscape = _.defaultTo(this.options.closeByEscape, true);this.closeOnOutsideClick = _.defaultTo(this.options.closeByDocument, true);@@ -86,16 +117,113 @@ export class EnterpriseTrialModal extends OpModalComponent {this.text = _.defaults(this.options.text, this.text);}- public submit(evt:JQuery.TriggeredEvent) {- // open next window- // this.confirmMailAddress();- // waiting -> show status and btn "Check status"- // confirmed -> show confirmed, enable btn "Continue"- // onclick of continue: this.closeMe(evt);+ public onSubmit() {+ // check if form is valid and handle input errors+ if (this.enterpriseTrialForm.valid) {+ this.enterpriseTrialForm.addControl('_type', new FormControl('enterprise-trial'));++ this.sendForm(this.enterpriseTrialForm.value);+ }+ }++ public sendForm(form:FormGroup) {+ const trialPath = 'https://augur.openproject-edge.com/public/v1/trials';+ // POST /public/v1/trials/ (send POST with form object)+ this.http.post(trialPath, form)+ .toPromise()+ .then((enterpriseTrial:any) => {+ this.trialLink = enterpriseTrial._links.self.href;++ this.confirmMailAddress();+ })+ .catch((error:HttpErrorResponse) => {+ // TODO: on error -> use notificationService? or show other msg+ if (error.status === 422 || error.status === 400) { // user already created a trial+ this.errorMsg = error.error.description;+ } else {+ console.log('sendForm: Error in else', error.error.description);+ // 500 -> internal error occured+ }+ });}public confirmMailAddress() {- this.confirmed = true;+ // 2) GET /public/v1/trials/:id+ this.http+ .get<any>(this.baseUrl + this.trialLink)+ .toPromise()+ .then((res:any) => {+ // returns token if mail was confirmed+ // show confirmed status and enable continue btn+ this.confirmed = true;++ // save token in backend+ this.token = res.token;+ this.saveToken(this.token);+ })+ .catch((error:HttpErrorResponse) => {+ let message:undefined|string;+ // 2.1) returns error 422 while waiting of confirmation+ if (error.status === 422 && error.error.identifier === 'waiting_for_email_verification') {+ console.log('comfirmMailaddress: Error 422: ', error.error.identifier);+ // open next modal window+ // status waiting+ this.status = 'mailSubmitted';++ // get resend button link+ // TODO: does not work yet+ this.resendLink = error.error._links.resend.href;++ // TODO add limit for retrying+ setTimeout( () => {+ // retry as long as modal is open and action is not cancelled+ if (!this.cancelled) {+ this.confirmMailAddress();+ }+ }, 10000);+ } else if (_.get(error, 'error._type') === 'Error') {+ message = error.error.message;+ } else {+ // The backend returned an unsuccessful response code.+ message = error.error;+ }++ this.halNotification.handleRawError(message);+ return message || I18n.t('js.error.internal');+ });+ }++ // TODO+ private saveToken(token:string) {+ // POST /admin/enterprise (params[:enterprise_token][:encoded_token])+ // -> if token is new (token_retrieved: false) save token in ruby controller+ this.http.post(this.pathHelper.api.v3.appBasePath + '/admin/enterprise', { enterprise_token: { encoded_token: token } }, { withCredentials: true })+ .toPromise()+ .then((res:any) => {+ // TODO show token to copy?+ })+ .catch((error:HttpErrorResponse) => {+ });+ }++ public startEnterpriseTrial() {+ // open onboarding modal+ this.status = 'startTrial';+ console.log("Start enterprise trial!", this.status);+ }++ public checkMailField() {+ if (this.enterpriseTrialForm.value.email !== '' && this.enterpriseTrialForm.controls.email.errors) {+ this.errorMsg = 'Invalid e-mail address';+ } else {+ this.errorMsg = undefined;+ }+ }++ public closeModal(event:any) {+ // cancel all actions (e.g. an already send request)+ this.cancelled = true;+ this.closeMe(event);}}diff --git a/frontend/src/app/components/enterprise/enterprise.component.html b/frontend/src/app/components/enterprise/enterprise.component.htmlindex 032a2a9e3d0..dddda5edfa2 100644--- a/frontend/src/app/components/enterprise/enterprise.component.html+++ b/frontend/src/app/components/enterprise/enterprise.component.html@@ -1,5 +1,5 @@<div class='upsale--actions'>- <button class="button -alt-highlight" (click)="openTrialModal()">Start free trial</button>- <button class="button -highlight">Book now</button>- <button class="button">Get a quote</button>+ <button class="button -alt-highlight" (click)="openTrialModal()">{{ text.button_trial }}</button>+ <button class="button -highlight">{{ text.button_book }}</button>+ <button class="button">{{ text.button_quote }}</button></div>\ No newline at end of filediff --git a/frontend/src/app/components/enterprise/enterprise.component.sass b/frontend/src/app/components/enterprise/enterprise.component.sassnew file mode 100644index 00000000000..4df2e322e98--- /dev/null+++ b/frontend/src/app/components/enterprise/enterprise.component.sass@@ -0,0 +1 @@+@import 'helpers'\ No newline at end of filediff --git a/frontend/src/app/components/enterprise/enterprise.component.ts b/frontend/src/app/components/enterprise/enterprise.component.tsindex c98c966fe84..2a5ab9021f2 100644--- a/frontend/src/app/components/enterprise/enterprise.component.ts+++ b/frontend/src/app/components/enterprise/enterprise.component.ts@@ -26,27 +26,22 @@// See doc/COPYRIGHT.rdoc for more details.// ++-import {Component, Input} from "@angular/core";-import {enterpriseEditionUrl} from "core-app/globals/constants.const";+import {Component, Injector} from "@angular/core";import {I18nService} from "core-app/modules/common/i18n/i18n.service";import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";import {EnterpriseTrialModal} from "core-components/enterprise/enterprise-modal/enterprise-trial.modal";import {OpModalService} from "core-components/op-modals/op-modal.service";-import {Injector} from "@angular/core";-@Component({selector: 'enterprise',- templateUrl: '/app/components/enterprise/enterprise.component.html'+ templateUrl: './enterprise.component.html',+ styleUrls: ['./enterprise.component.sass']})export class EnterpriseComponent {- @Input() public leftMargin:boolean = false;- @Input() public textMessage:string;- @Input() public linkMessage:string;- @Input() public opReferrer:string;-- public text:any = {- enterpriseFeature: this.I18n.t('js.upsale.ee_only'),+ public text = {+ button_trial: this.I18n.t('js.admin.enterprise.upsale.button_start_trial'),+ button_book: this.I18n.t('js.admin.enterprise.upsale.button_book_now'),+ button_quote: this.I18n.t('js.admin.enterprise.upsale.button_quote')};constructor(protected I18n:I18nService,@@ -57,14 +52,6 @@ export class EnterpriseComponent {public openTrialModal() {this.opModalService.show(EnterpriseTrialModal, this.injector);}-- public eeLink() {- if (this.opReferrer) {- return enterpriseEditionUrl + '&op_referrer=' + this.opReferrer;- } else {- return enterpriseEditionUrl;- }- }}DynamicBootstrapper.register({diff --git a/lib/open_project/configuration.rb b/lib/open_project/configuration.rbindex e0a7ed4ed3b..8d44b920446 100644--- a/lib/open_project/configuration.rb+++ b/lib/open_project/configuration.rb@@ -167,7 +167,10 @@ module OpenProject'sentry_dsn' => nil,# Allow error reporting for frontend errors'sentry_report_js' => false,- 'sentry_host' => 'https://sentry.openproject.com'+ 'sentry_host' => 'https://sentry.openproject.com',++ # Allow connection to Augur+ 'enterprise_trial_creation_host' => 'https://augur.openproject.com'}@config = nil