mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* [AAE-7072] - added utc time for date time widget to avoid changing time on different timezones * [AAE-7072] - fixed parsing when override is not added
111 lines
5.8 KiB
HTML
111 lines
5.8 KiB
HTML
<mat-card>
|
|
<mat-card-header fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="10px"
|
|
class="adf-cloud-start-task-heading">
|
|
<mat-card-title>{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.TITLE' | translate}}</mat-card-title>
|
|
</mat-card-header>
|
|
<form [formGroup]="taskForm" fxLayout="column" (ngSubmit)="saveTask()">
|
|
|
|
<mat-card-content>
|
|
<div class="adf-task-name">
|
|
<mat-form-field fxFlex>
|
|
<mat-label>{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.NAME' | translate }}</mat-label>
|
|
<input
|
|
matInput
|
|
id="name_id"
|
|
class="form-control"
|
|
formControlName="name">
|
|
<mat-error *ngIf="nameController.hasError('required')">
|
|
{{ 'ADF_CLOUD_START_TASK.ERROR.REQUIRED' | translate }}
|
|
</mat-error>
|
|
<mat-error *ngIf="nameController.hasError('maxlength')">
|
|
{{ 'ADF_CLOUD_START_TASK.ERROR.MAXIMUM_LENGTH' | translate : {characters: maxNameLength} }}
|
|
</mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
|
|
<mat-form-field fxFlex>
|
|
<mat-label>{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.DESCRIPTION' | translate}}</mat-label>
|
|
<textarea
|
|
matInput
|
|
class="form-control"
|
|
id="description_id"
|
|
formControlName="description">
|
|
</textarea>
|
|
</mat-form-field>
|
|
|
|
<mat-form-field fxFlex class="adf-cloud-priority-container">
|
|
<mat-label>{{ 'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.PRIORITY' | translate }}</mat-label>
|
|
<mat-select formControlName="priority">
|
|
<mat-option *ngFor="let priorityOption of priorities" [value]="priorityOption.value">{{ priorityOption.label | translate }}</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
|
|
<mat-form-field fxFlex>
|
|
<input matInput
|
|
[matDatepicker]="taskDatePicker"
|
|
(focusout)="onDateChanged($any($event).srcElement.value)"
|
|
placeholder="{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.DATE'|translate}}"
|
|
[(ngModel)]="dueDate"
|
|
[ngModelOptions]="{standalone: true}"
|
|
id="date_id">
|
|
<mat-datepicker-toggle matSuffix [for]="taskDatePicker"></mat-datepicker-toggle>
|
|
<mat-datepicker #taskDatePicker
|
|
[touchUi]="true"
|
|
(dateChanged)="onDateChanged($event)">
|
|
</mat-datepicker>
|
|
<div class="adf-cloud-date-error-container">
|
|
<div *ngIf="dateError">
|
|
<div class="adf-error-text">{{'ADF_CLOUD_START_TASK.ERROR.DATE' | translate}}</div>
|
|
<mat-icon class="adf-error-icon">warning</mat-icon>
|
|
</div>
|
|
</div>
|
|
</mat-form-field>
|
|
<adf-cloud-people fxFlex #peopleInput *ngIf="currentUser"
|
|
[appName]="appName"
|
|
[preSelectUsers]="[currentUser]"
|
|
[searchUserCtrl]="assigneeFormControl"
|
|
(selectUser)="onAssigneeSelect($event)"
|
|
[title]="'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.ASSIGNEE'"
|
|
(removeUser)="onAssigneeRemove()"></adf-cloud-people>
|
|
</div>
|
|
|
|
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
|
|
<adf-cloud-group fxFlex #groupInput *ngIf="currentUser"
|
|
[mode]="'multiple'"
|
|
[title]="'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.CANDIDATE_GROUP'"
|
|
[appName]="appName"
|
|
[searchGroupsControl]="candidateUserFormControl"
|
|
(selectGroup)="onCandidateGroupSelect($event)"
|
|
(removeGroup)="onCandidateGroupRemove($event)">
|
|
</adf-cloud-group>
|
|
<adf-cloud-form-definition-selector *ngIf="appName"
|
|
fxFlex
|
|
[appName]="appName"
|
|
(selectForm)="onFormSelect($event)">
|
|
</adf-cloud-form-definition-selector>
|
|
</div>
|
|
</mat-card-content>
|
|
|
|
<mat-card-actions>
|
|
<div class="adf-cloud-start-task-footer" fxLayout="row" fxLayoutAlign="end end">
|
|
<button
|
|
mat-button
|
|
type="button"
|
|
(click)="onCancel()"
|
|
id="button-cancel">
|
|
{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.ACTION.CANCEL'|translate}}
|
|
</button>
|
|
<button
|
|
color="primary"
|
|
type="submit"
|
|
[disabled]="!canStartTask()"
|
|
mat-button
|
|
id="button-start">
|
|
{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.ACTION.START'|translate}}
|
|
</button>
|
|
</div>
|
|
</mat-card-actions>
|
|
</form>
|
|
</mat-card>
|