mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Set default select option (#1496)
* #1479 default select option * #1479 Fix task dropdown default value
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<label class="dropdown-widget__label" [attr.for]="field.id">{{field.nameKey | translate}}</label>
|
||||
<select [formControlName]="controllerName" [attr.id]="'select-' + field.id" class="dropdown-widget__select"
|
||||
[(ngModel)]="field.value" (ngModelChange)="changeValue($event)">
|
||||
<option *ngIf="showDefaultOption" value="">{{defaultOptionText}}</option>
|
||||
<option *ngIf="showDefaultOption" value="null">{{defaultOptionText}}</option>
|
||||
<option *ngFor="let opt of field.options" [value]="opt.id">{{opt.label}}</option>
|
||||
</select>
|
||||
</div>
|
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<div class="mdl-textfield mdl-js-textfield alf-mdl-selectfield">
|
||||
<select name="processDefinition" [(ngModel)]="currentProcessDef.id" (ngModelChange)="onProcessDefChange($event)" id="processDefinition" required>
|
||||
<option value="" selected="selected">{{'START_PROCESS.DIALOG.TYPE_PLACEHOLDER'|translate}}</option>
|
||||
<option value="null">{{'START_PROCESS.DIALOG.TYPE_PLACEHOLDER'|translate}}</option>
|
||||
<option *ngFor="let processDef of processDefinitions" [value]="processDef.id">
|
||||
{{processDef.name}}
|
||||
</option>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="mdl-textfield mdl-js-textfield alf-mdl-selectfield">
|
||||
<select name="taskForm" [(ngModel)]="formId" >
|
||||
<option value="" selected="selected" selected>None</option>
|
||||
<option value="null">{{'START_TASK.DIALOG.LABEL.NONE'|translate}}</option>
|
||||
<option *ngFor="let form of forms" [value]="form.id">
|
||||
{{form.name}}
|
||||
</option>
|
||||
|
@@ -43,7 +43,7 @@ export class ActivitiStartTaskButton {
|
||||
|
||||
forms: Form [];
|
||||
|
||||
formId: string;
|
||||
formId: string = null;
|
||||
|
||||
name: string;
|
||||
description: string;
|
||||
|
@@ -66,6 +66,7 @@
|
||||
"DIALOG": {
|
||||
"TITLE": "Start Task",
|
||||
"LABEL": {
|
||||
"NONE": "None",
|
||||
"NAME": "Name",
|
||||
"DESCRIPTION": "Description",
|
||||
"ATTACHFORM" : "Attach a Form"
|
||||
|
Reference in New Issue
Block a user