Commit b6722dcb authored by cazenave's avatar cazenave
Browse files

Merge branch 'feature/setting' into 'master'

ffds title in setting

See merge request !1
parents c9cb766a f00f48cb
......@@ -4,6 +4,7 @@ import { environment } from 'src/environments/environment.prod';
@Injectable()
export class AppConfiguration {
title: string;
fdpurl: string;
fdpemail: string;
fdppassword: string;
......
......@@ -6,7 +6,7 @@
<a routerLink="/" routerLinkActive="active">
<img width="80"alt="Angular Logo" src="assets/images/logo.png"/>
</a>
<h3 style="width: 100%;text-align: center;"> <strong>EOSC-Pillar Federated FAIR Data Space</strong></h3>
<h3 style="width: 100%;text-align: center;"> <strong>{{settingtitle}}</strong></h3>
<nb-user style="white-space: pre;" name="Paulo Pimenta"
......
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { NbMenuItem, NbSidebarService } from '@nebular/theme';
import { AppConfiguration } from './AppConfiguration';
@Component({
......@@ -10,7 +11,9 @@ import { NbMenuItem, NbSidebarService } from '@nebular/theme';
})
export class AppComponent {
title = 'register-front';
settingtitle = this.appConfig.title ;
items: NbMenuItem[] = [
{
title: 'Home',
......@@ -67,8 +70,10 @@ export class AppComponent {
},
];
constructor(private readonly sidebarService: NbSidebarService) {
}
constructor(
private readonly sidebarService: NbSidebarService,
private appConfig: AppConfiguration
) {}
toggleSidebar(): boolean {
this.sidebarService.toggle(true);
......
......@@ -2,6 +2,9 @@
<form [formGroup]="Form" (ngSubmit)="SaveFdpSetting()">
<div class="form-group">
<label>FFDS Title
<input matInput placeholder="FFDS title" type="text" class="form-control" formControlName="title" required>
</label>
<label>FAIR data point Url
<input matInput placeholder="fdp url http://" type="text" class="form-control" formControlName="fdpurl" required>
</label>
......
......@@ -16,6 +16,7 @@ import { environment } from 'src/environments/environment.prod';
export class SettingfdpComponent implements OnInit {
Form = new FormGroup({
title: new FormControl(),
fdpurl: new FormControl(),
fdpemail: new FormControl(),
fdppassword: new FormControl(),
......@@ -29,6 +30,7 @@ export class SettingfdpComponent implements OnInit {
ngOnInit() {
this.Form.setValue({
title: this.appConfig.title ,
fdpurl: this.appConfig.fdpurl ,
fdpemail: this.appConfig.fdpemail ,
fdppassword: this.appConfig.fdppassword
......@@ -40,6 +42,7 @@ export class SettingfdpComponent implements OnInit {
let data: string;
data ='\
{\n\
"title": "'+ this.Form.value.title + '", \n\
"fdpurl": "'+ this.Form.value.fdpurl + '", \n\
"fdpemail": "'+ this.Form.value.fdpemail + '", \n\
"fdppassword": "'+ this.Form.value.fdppassword + '", \n\
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment