Set default select option (#1496)

* #1479 default select option

* #1479 Fix task dropdown default value
This commit is contained in:
Maurizio Vitale
2017-01-18 10:43:31 +00:00
committed by Vito
parent 7ef954139c
commit 4b3c77799e
5 changed files with 5 additions and 4 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -43,7 +43,7 @@ export class ActivitiStartTaskButton {
forms: Form [];
formId: string;
formId: string = null;
name: string;
description: string;

View File

@@ -66,6 +66,7 @@
"DIALOG": {
"TITLE": "Start Task",
"LABEL": {
"NONE": "None",
"NAME": "Name",
"DESCRIPTION": "Description",
"ATTACHFORM" : "Attach a Form"