diff --git a/components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.html b/components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.html new file mode 100644 index 000000000..21e6c6704 --- /dev/null +++ b/components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.html @@ -0,0 +1,61 @@ +
+
+

{{ heading }}

+ +

+ +

+
+
+
+ +
+ +
+
+

+ I acknowledge and agree that use of Progress Chef Habitat Builder is governed by and subject to the terms and conditions of the End User License Agreement for + Progress Chef located at Progress Chef EULA +

+
+
+
+
+ +
+
+ + diff --git a/components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.ts b/components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.ts new file mode 100644 index 000000000..3b1da17ca --- /dev/null +++ b/components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.ts @@ -0,0 +1,53 @@ +// Copyright (c) 2016-2017 Chef Software Inc. and/or applicable contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Component, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; + +@Component({ + template: require('./eula-confirm.dialog.html'), +}) +export class EulaConfirmDialog { + isButtonDisabled: boolean = true; + checked: boolean = false; + + constructor( + private ref: MatDialogRef, + @Inject(MAT_DIALOG_DATA) private data: any + ) { } + + get heading() { + return this.data.heading || 'Confirm'; + } + + get action() { + return this.data.action || 'do it'; + } + + get signupUrl() { + return this.data.signupUrl; + } + + ok() { + this.ref.close(true); + } + + checkbox() { + this.checked === true ? this.isButtonDisabled = false : this.isButtonDisabled = true; + } + + cancel() { + this.ref.close(false); + } +} diff --git a/components/builder-web/app/shared/shared.module.ts b/components/builder-web/app/shared/shared.module.ts index 05d962721..b333762b3 100644 --- a/components/builder-web/app/shared/shared.module.ts +++ b/components/builder-web/app/shared/shared.module.ts @@ -45,6 +45,7 @@ import { VisibilitySelectorComponent } from './visibility-selector/visibility-se import { KeysPipe } from './pipes/keys.pipe'; import { SimpleConfirmDialog } from './dialog/simple-confirm/simple-confirm.dialog'; import { PromoteConfirmDialog } from './dialog/promote-confirm/promote-confirm.dialog'; +import { EulaConfirmDialog } from './dialog/eula-confirm/eula-confirm.dialog'; import { BuilderEnabledGuard } from './guards/builder-enabled.guard'; import { VisibilityEnabledGuard } from './guards/visibility-enabled.guard'; import { OriginMemberGuard } from './guards/origin-member.guard'; @@ -91,6 +92,7 @@ import { JobNoticeComponent } from './job-notice/job-notice.component'; VisibilitySelectorComponent, SimpleConfirmDialog, PromoteConfirmDialog, + EulaConfirmDialog, JobNoticeComponent, KeysPipe ], @@ -99,7 +101,8 @@ import { JobNoticeComponent } from './job-notice/job-notice.component'; DockerExportSettingsDialog, JobCancelDialog, SimpleConfirmDialog, - PromoteConfirmDialog + PromoteConfirmDialog, + EulaConfirmDialog ], exports: [ MatMenuModule, diff --git a/components/builder-web/app/sign-in-page/sign-in-page.component.html b/components/builder-web/app/sign-in-page/sign-in-page.component.html index 1075d7c51..fb95a8e3c 100644 --- a/components/builder-web/app/sign-in-page/sign-in-page.component.html +++ b/components/builder-web/app/sign-in-page/sign-in-page.component.html @@ -1,11 +1,11 @@ -
+