mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-584] [ADF-3561] Validation error summary for error component (#3795)
* emit Forms error * add demo * add documentation remove old form tag deprecated in 1.x fix translation outcome * remove prevent default validation * fix lint
This commit is contained in:
@@ -29,7 +29,11 @@ import {
|
||||
Output
|
||||
} from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ProcessInstanceFilterRepresentation, Pagination, UserProcessInstanceFilterRepresentation } from 'alfresco-js-api';
|
||||
import {
|
||||
ProcessInstanceFilterRepresentation,
|
||||
Pagination,
|
||||
UserProcessInstanceFilterRepresentation
|
||||
} from 'alfresco-js-api';
|
||||
import {
|
||||
FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService, FormService,
|
||||
DynamicTableRow, ValidateDynamicTableRowEvent, AppConfigService, PaginationComponent, UserPreferenceValues
|
||||
@@ -53,7 +57,7 @@ import {
|
||||
TaskListComponent
|
||||
} from '@alfresco/adf-process-services';
|
||||
import { LogService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, UserPreferencesService, ValidateFormEvent } from '@alfresco/adf-core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { /*CustomEditorComponent*/ CustomStencil01 } from './custom-editor/custom-editor.component';
|
||||
import { DemoFieldValidator } from './demo-field-validator';
|
||||
@@ -198,6 +202,10 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
|
||||
formService.formContentClicked.subscribe(content => {
|
||||
this.showContentPreview(content);
|
||||
}),
|
||||
|
||||
formService.validateForm.subscribe((validateFormEvent: ValidateFormEvent) => {
|
||||
this.logService.log('Error form:' + validateFormEvent.errorsField);
|
||||
})
|
||||
);
|
||||
|
||||
@@ -257,7 +265,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.showTaskTab = event.index === this.tabs.tasks;
|
||||
this.relocateLocationToTask();
|
||||
} else if (index === PROCESS_ROUTE) {
|
||||
this.showProcessTab = event.index === this.tabs.processes;
|
||||
this.showProcessTab = event.index === this.tabs.processes;
|
||||
this.relocateLocationToProcess();
|
||||
} else if (index === REPORT_ROUTE) {
|
||||
this.relocateLocationToReport();
|
||||
|
Reference in New Issue
Block a user