-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1842 from habitat-sh/Aadesh/Chef-13951
Eula popup added
- Loading branch information
Showing
5 changed files
with
147 additions
and
4 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<div class="dialog"> | ||
<section class="eula-heading"> | ||
<h1>{{ heading }}</h1> | ||
<a class="close-button" (click)="cancel()"> | ||
<h1> | ||
<hab-icon symbol="close"></hab-icon> | ||
</h1> | ||
</a> | ||
</section> | ||
<section class="body"> | ||
<span class="inner-body"> | ||
<div class="checkbox"> | ||
<mat-checkbox (change)="checkbox()" [(ngModel)]="checked"></mat-checkbox> | ||
</div> | ||
<div class="message"> | ||
<p> | ||
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 <a href="https://www.chef.io/end-user-license-agreement" target="_blank">Progress Chef EULA</a> | ||
</p> | ||
</div> | ||
</span> | ||
</section> | ||
<section class="controls"> | ||
<button mat-raised-button color="primary" class="button continue-button" (click)="ok()" disabled={{isButtonDisabled}}> | ||
{{ action }} | ||
</button> | ||
</section> | ||
</div> | ||
|
||
<style> | ||
.eula-heading { | ||
margin: -24px -24px 0px -24px; | ||
border-bottom: #e7ebed 1px solid; | ||
padding-left: 24px; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.close-button { | ||
margin-right: 24px; | ||
} | ||
|
||
.continue-button { | ||
width: 100%; | ||
height: 3rem; | ||
} | ||
|
||
.message { | ||
margin-left: 24px; | ||
margin-top: 3px; | ||
} | ||
|
||
.checkbox { | ||
padding-top: 5px | ||
} | ||
|
||
.inner-body { | ||
display: flex; | ||
} | ||
</style> |
53 changes: 53 additions & 0 deletions
53
components/builder-web/app/shared/dialog/eula-confirm/eula-confirm.dialog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<EulaConfirmDialog>, | ||
@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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
components/builder-web/app/sign-in-page/sign-in-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters