mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
Fixed license checkbox style
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
<ds-form *ngIf="formModel" #formRef="formComponent"
|
||||
[formId]="formId"
|
||||
[formModel]="formModel"
|
||||
[formLayout]="formLayout"
|
||||
[displaySubmit]="displaySubmit"
|
||||
(dfChange)="onChange($event)"></ds-form>
|
||||
|
@@ -2,7 +2,12 @@ import { ChangeDetectorRef, Component, Inject, ViewChild } from '@angular/core';
|
||||
|
||||
import { Observable, Subscription } from 'rxjs';
|
||||
import { distinctUntilChanged, filter, flatMap, map, take } from 'rxjs/operators';
|
||||
import { DynamicCheckboxModel, DynamicFormControlEvent, DynamicFormControlModel } from '@ng-dynamic-forms/core';
|
||||
import {
|
||||
DynamicCheckboxModel,
|
||||
DynamicFormControlEvent,
|
||||
DynamicFormControlModel,
|
||||
DynamicFormLayout
|
||||
} from '@ng-dynamic-forms/core';
|
||||
|
||||
import { SectionModelComponent } from '../models/section.model';
|
||||
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
|
||||
@@ -11,7 +16,7 @@ import { hasValue, isNotEmpty, isNotNull, isNotUndefined } from '../../../shared
|
||||
import { License } from '../../../core/shared/license.model';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { Collection } from '../../../core/shared/collection.model';
|
||||
import { SECTION_LICENSE_FORM_MODEL } from './section-license.model';
|
||||
import { SECTION_LICENSE_FORM_LAYOUT, SECTION_LICENSE_FORM_MODEL } from './section-license.model';
|
||||
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
|
||||
import { FormService } from '../../../shared/form/form.service';
|
||||
import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder/json-patch-operation-path-combiner';
|
||||
@@ -34,6 +39,7 @@ export class LicenseSectionComponent extends SectionModelComponent {
|
||||
|
||||
public formId;
|
||||
public formModel: DynamicFormControlModel[];
|
||||
public formLayout: DynamicFormLayout = SECTION_LICENSE_FORM_LAYOUT;
|
||||
public displaySubmit = false;
|
||||
public licenseText: string;
|
||||
|
||||
|
@@ -1,4 +1,15 @@
|
||||
|
||||
export const SECTION_LICENSE_FORM_LAYOUT = {
|
||||
|
||||
granted: {
|
||||
element: {
|
||||
container: 'custom-control custom-checkbox pl-1',
|
||||
control: 'custom-control-input',
|
||||
label: 'custom-control-label pt-1'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const SECTION_LICENSE_FORM_MODEL = [
|
||||
{
|
||||
id: 'granted',
|
||||
|
Reference in New Issue
Block a user