Skip to content

Commit 1005f4d

Browse files
Merge pull request #436 from communitybridge/consent
Consent
2 parents 5b4ac69 + 427629c commit 1005f4d

File tree

14 files changed

+113
-93
lines changed

14 files changed

+113
-93
lines changed

src/app/app.component.html

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,6 @@
44

55
<div class="fix-header-margin">
66
<app-alert></app-alert>
7-
<div *ngIf="!showDashboard" class="wrapper vcenter-item">
8-
<div class="box">
9-
<div class="consent-title">Consent</div>
10-
11-
<app-checkbox [checked]="hasTermAccepted" text="I hereby certify that I am not, and/or the organization I am representing is not"
12-
(checkboxEmitter)="onClickTermAccepted($event)" fontSize="16px" topMargin="5px" bold="true" [required]="true">
13-
</app-checkbox>
14-
<ul class="mt-2" style="width: 800px;">
15-
<li>located in Cuba, Iran, North Korea, Syria, the Crimea Region of Ukraine, or the Russian-controlled areas of the Donetsk or Luhansk regions of Ukraine;
16-
</li>
17-
<li>owned or controlled by, acting for or on behalf of, or an individual or entity that has in the past acted for or on behalf of the Government of Cuba,
18-
Iran, North Korea, Syria, or Venezuela; or</li>
19-
<li>listed as a blocked person by the U.S. Department of the Treasury’s
20-
<a style="color: #0099cc;" href="https://ofac.treasury.gov/sanctions-programs-and-country-information" target="_blank">Office of Foreign Assets Control (OFAC)</a>
21-
or directly or indirectly owned 50 percent or more by such a listed person
22-
</li>
23-
</ul>
24-
<div class="d-flex flex-column">
25-
<button type="button" class="button align-self-center" [ngClass]="{'gray': !hasTermAccepted}" (click)="onClickContinue()">Continue</button>
26-
</div>
27-
</div>
28-
</div>
29-
<div *ngIf="showDashboard">
307
<router-outlet></router-outlet>
31-
</div>
328
</div>
339
<lfx-footer></lfx-footer>

src/app/app.component.scss

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,4 @@
44
margin-top: 35px;
55
padding: 25px 0 0 0;
66
min-height: calc(100vh - 125px);
7-
}
8-
9-
.consent-title{
10-
font-size: 24px;
11-
font-weight: bold;
12-
margin-bottom: 20px;
13-
text-align: center;
14-
}
15-
16-
.vcenter-item{
17-
display: flex;
18-
align-items: center;
19-
justify-content: center;
20-
}
21-
/* Some custom styles to beautify this example */
22-
.wrapper{
23-
font-size: 16px;
24-
min-height: calc(100vh - 250px);
25-
}
26-
27-
.button {
28-
width: 120px;
29-
padding: 5px;
30-
margin-top: 15px;
31-
border-radius: 25px;
32-
color: #fff;
33-
background-color: #0099cc;
34-
font-family: "SourceSansPro";
35-
font-weight: bold;
36-
border: none;
37-
38-
&.gray {
39-
background-color: gray !important;
40-
}
41-
}
7+
}

src/app/app.component.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,18 @@
66

77
import { Component } from '@angular/core';
88
import { environment } from 'src/environments/environment';
9-
import { StorageService } from './shared/services/storage.service';
10-
import { AppSettings } from './config/app-settings';
119

1210
@Component({
1311
selector: 'app-root',
1412
templateUrl: './app.component.html',
1513
styleUrls: ['./app.component.scss'],
1614
})
1715
export class AppComponent {
18-
hasTermAccepted: boolean;
19-
showDashboard: boolean;
20-
21-
constructor(private storageService: StorageService) {
22-
this.showDashboard = false;
23-
this.hasTermAccepted = false;
24-
}
2516

2617
ngOnInit() {
2718
this.mountHeader();
2819
}
2920

30-
onClickTermAccepted(event:boolean) {
31-
this.hasTermAccepted = event
32-
this.storageService.setItem(AppSettings.ACCEPTED_TERMS, this.hasTermAccepted);
33-
}
34-
35-
onClickContinue() {
36-
if(this.hasTermAccepted) {
37-
this.storageService.setItem(AppSettings.ACCEPTED_TERMS, true);
38-
this.showDashboard = true;
39-
}
40-
}
41-
4221
private mountHeader(): void {
4322
const script = document.createElement('script');
4423
script.setAttribute('src', environment.lfxHeader + '/lfx-header-v2.js');

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,14 @@
102102
</div>
103103
</div>
104104
</div>
105+
106+
<div class="row justify-content-center" style="margin: 30px 0 30px 0;">
107+
<div class="col-12">
108+
<app-consent (termAccepted)="hasTermAccepted = $event"></app-consent>
109+
</div>
110+
</div>
105111

106-
<div class="col-12 buttons" [ngClass]="{ 'mt-30': selectedCompany }">
112+
<div class="col-12 buttons">
107113
<div class="row justify-content-center align-items-center">
108114
<div class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
109115
<button
@@ -119,9 +125,9 @@
119125
<button
120126
tabindex="-1"
121127
type="button"
122-
[disabled]="selectedCompany === ''"
128+
[disabled]="selectedCompany === '' || !hasTermAccepted"
123129
class="btn inactive"
124-
[ngClass]="{ active: selectedCompany !== '' }"
130+
[ngClass]="{ active: selectedCompany !== '' && hasTermAccepted }"
125131
(click)="onClickProceed()"
126132
>
127133
Proceed

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
position: relative;
3838
}
3939

40-
.mt-30 {
41-
margin-top: 30px !important;
42-
}
43-
4440
.building-icon {
4541
float: right;
4642
margin-top: -32px;
@@ -109,7 +105,6 @@
109105
}
110106

111107
.buttons {
112-
margin-top: 100px;
113108
.btn {
114109
text-align: center;
115110
background: #ffffff;

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
5858
mySubscription: Subscription;
5959
proccedWithExistingOrganization: Subscription;
6060
attempt: boolean;
61+
hasTermAccepted = false;
6162

6263
constructor(
6364
private route: ActivatedRoute,

src/app/modules/dashboard/container/cla-dashboard/cla-dashboard.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
</div>
5050
</div>
5151
</div>
52-
5352
<div class="deskop-view">
5453
<div class="row">
5554
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">

src/app/modules/individual-contributor/component/docusign-signature-model/docusign-signature-model.component.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,21 @@
3333
</div>
3434
</div>
3535

36+
<div class="row justify-content-center" style="margin: 30px 0 30px 0;">
37+
<div class="col-12">
38+
<app-consent (termAccepted)="hasTermAccepted = $event"></app-consent>
39+
</div>
40+
</div>
41+
3642
<div class="row buttons justify-content-center align-items-center">
3743
<div class="col-xs-6 col-sm-6 col-md-5 col-lg-5">
3844
<button tabindex="-1" type="button" class="btn" (click)="onClickBack()">
3945
GO BACK
4046
</button>
4147
</div>
4248
<div class="col-xs-6 col-sm-6 col-md-5 col-lg-5">
43-
<button tabindex="-1" type="button" [disabled]="status!=='Completed'"
44-
[ngClass]="{'blue':status==='Completed'}" class="btn gray" (click)="onClickSignCLA()">
49+
<button tabindex="-1" type="button" [disabled]="status!=='Completed' || !hasTermAccepted"
50+
[ngClass]="{'blue':status==='Completed' && hasTermAccepted}" class="btn gray" (click)="onClickSignCLA()">
4551
SIGN CLA</button>
4652
</div>
4753
</div>

src/app/modules/individual-contributor/component/docusign-signature-model/docusign-signature-model.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export class DocusignSignatureModelComponent {
1919

2020
title: string;
2121
message: string;
22+
hasTermAccepted = false;
2223

2324
constructor(
2425
private storageService: StorageService,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Copyright The Linux Foundation and each contributor to CommunityBridge.
2+
SPDX-License-Identifier: MIT -->
3+
4+
<div class="wrapper">
5+
<div class="box">
6+
<div class="consent-title">Consent </div>
7+
<app-checkbox [checked]="hasTermAccepted" text="I hereby certify that I am not, and/or the organization I am representing is not"
8+
(checkboxEmitter)="onClickTermAccepted($event)" fontSize="16px" topMargin="5px" bold="true" [required]="true">
9+
</app-checkbox>
10+
<ul class="mt-2">
11+
<li>located in Cuba, Iran, North Korea, Syria, the Crimea Region of Ukraine, or the Russian-controlled areas of the Donetsk or Luhansk regions of Ukraine;
12+
</li>
13+
<li>owned or controlled by, acting for or on behalf of, or an individual or entity that has in the past acted for or on behalf of the Government of Cuba,
14+
Iran, North Korea, Syria, or Venezuela; or</li>
15+
<li>listed as a blocked person by the U.S. Department of the Treasury’s
16+
<a style="color: #0099cc;" href="https://ofac.treasury.gov/sanctions-programs-and-country-information" target="_blank">Office of Foreign Assets Control (OFAC)</a>
17+
or directly or indirectly owned 50 percent or more by such a listed person
18+
</li>
19+
</ul>
20+
</div>
21+
</div>

0 commit comments

Comments
 (0)