Adds "Insert manually" link instead of add ( + ) button
This commit is contained in:
parent
26fa759d81
commit
eb0bf2f003
|
@ -36,9 +36,9 @@
|
||||||
<div *ngIf="isCreateNewFunder" (click)="createFunder()">
|
<div *ngIf="isCreateNewFunder" (click)="createFunder()">
|
||||||
<span class="insert">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-FUNDER' | translate}}</span>
|
<span class="insert">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-FUNDER' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!isCreateNewFunder" (click)="createFunder()">
|
<div *ngIf="!isCreateNewFunder">
|
||||||
<span [ngClass]="isNewVersion?'disabled-toggle':'not-found'">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
|
<span [ngClass]="isNewVersion?'disabled-toggle':'not-found'">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
|
||||||
<span [ngClass]="isNewVersion?'disabled-toggle':'insert'">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
<span [ngClass]="isNewVersion?'disabled-toggle':'insert'" (click)="createFunder()">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -82,9 +82,9 @@
|
||||||
<div *ngIf="isCreateNew" (click)="createGrant()">
|
<div *ngIf="isCreateNew" (click)="createGrant()">
|
||||||
<span class="insert">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-GRANT' | translate}}</span>
|
<span class="insert">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-GRANT' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!isCreateNew" (click)="createGrant()">
|
<div *ngIf="!isCreateNew">
|
||||||
<span [ngClass]="isNewVersion || isGrantDisabled()?'disabled-toggle':'not-found'">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
|
<span [ngClass]="isNewVersion || isGrantDisabled()?'disabled-toggle':'not-found'">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
|
||||||
<span [ngClass]="isNewVersion || isGrantDisabled()?'disabled-toggle':'insert'">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
<span [ngClass]="isNewVersion || isGrantDisabled()?'disabled-toggle':'insert'" (click)="createGrant()">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.not-found {
|
.not-found {
|
||||||
cursor: pointer;
|
// cursor: pointer;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding: 0rem 0.5rem 0rem 0rem;
|
padding: 0rem 0.5rem 0rem 0rem;
|
||||||
|
|
|
@ -52,10 +52,12 @@
|
||||||
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
|
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
|
||||||
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">
|
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">
|
||||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
<button matSuffix class="input-btn" [disabled]="formGroup.get('researchers').disabled" type="button" (click)="addResearcher($event)">
|
<!-- <button matSuffix class="input-btn" [disabled]="formGroup.get('researchers').disabled" type="button" (click)="addResearcher($event)">
|
||||||
<mat-icon class="icon-btn">add_circle</mat-icon>
|
<mat-icon class="icon-btn">add_circle</mat-icon>
|
||||||
</button>
|
</button> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<span *ngIf="!formGroup.get('researchers').disabled" class="not-found">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
|
||||||
|
<span *ngIf="!formGroup.get('researchers').disabled" class="insert-manually" (click)="addResearcher($event)">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,10 +76,14 @@
|
||||||
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
|
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
|
||||||
{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
|
{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
|
||||||
<mat-error *ngIf="formGroup.get('organisations').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
<mat-error *ngIf="formGroup.get('organisations').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||||
<button *ngIf="showOrganizationCreator()" matSuffix class="input-btn" [disabled]="canAddOrganizations()" type="button" (click)="addOrganization($event)">
|
<!-- <button *ngIf="showOrganizationCreator()" matSuffix class="input-btn" [disabled]="cantAddOrganizations()" type="button" (click)="addOrganization($event)">
|
||||||
<mat-icon class="icon-btn">add_circle</mat-icon>
|
<mat-icon class="icon-btn">add_circle</mat-icon>
|
||||||
</button>
|
</button> -->
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
<div *ngIf="showOrganizationCreator()" class="pb-4">
|
||||||
|
<span *ngIf="!cantAddOrganizations()" class="not-found">{{'DMP-EDITOR.FUNDING-INFO.FIND' | translate}}</span>
|
||||||
|
<span *ngIf="!cantAddOrganizations()" class="insert-manually" (click)="addOrganization($event)">{{'DMP-EDITOR.ACTIONS.INSERT-MANUALLY' | translate}}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -58,6 +58,21 @@
|
||||||
.input-btn :hover {
|
.input-btn :hover {
|
||||||
color: #00b29f !important;
|
color: #00b29f !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.insert-manually {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #00b29f;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.not-found {
|
||||||
|
// cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
padding: 0rem 0.5rem 0rem 0rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .title-form .mat-form-field-appearance-outline .mat-form-field-outline {
|
::ng-deep .title-form .mat-form-field-appearance-outline .mat-form-field-outline {
|
||||||
|
|
|
@ -84,10 +84,10 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
this.formGroup.get('extraProperties').get('publicDate').patchValue(new Date());
|
this.formGroup.get('extraProperties').get('publicDate').patchValue(new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
|
// this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(x => {
|
// .subscribe(x => {
|
||||||
this.onFormChanged.emit();
|
// this.onFormChanged.emit();
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Researchers
|
// Researchers
|
||||||
|
@ -126,7 +126,7 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
return this.externalSourcesService.searchDMPOrganizations(value);
|
return this.externalSourcesService.searchDMPOrganizations(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
canAddOrganizations(): boolean {
|
cantAddOrganizations(): boolean {
|
||||||
if (!isNullOrUndefined(this.formGroup.get('organizations'))) {
|
if (!isNullOrUndefined(this.formGroup.get('organizations'))) {
|
||||||
return this.formGroup.get('organiztions').disabled;
|
return this.formGroup.get('organiztions').disabled;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue