Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-425 (pull request #42)
Browse files Browse the repository at this point in the history
Fixed issue with empty value in contact type dropdown

Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
rmathis committed Mar 30, 2018
2 parents 70df290 + 81e115e commit 5ce26f9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
</span>
</div>
<select [id]="'type-' + i" class="form-control" formControlName="type" aria-label="Contact type dropdown" role="listbox">
<option disabled hidden i18n="@@label--select-contact-type" value>Select Contact Type</option>
<option *ngFor="let opt of contactTypes; let i=index;" [value]="opt" [attr.aria-label]="opt" role="option">
{{ opt }}
</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export class OrganizationInfoFormComponent extends ProviderFormFragmentComponent

getContact(contact: Contact = {} as Contact): FormGroup {
return this.fb.group({
type: [contact.type || null, Validators.required],
name: [contact.name || null, Validators.required],
type: [contact.type || '', Validators.required],
name: [contact.name || '', Validators.required],
emailAddress: [contact.emailAddress || null, [Validators.required, Validators.email]]
});
}
Expand Down
8 changes: 8 additions & 0 deletions ui/src/locale/en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,14 @@
<context context-type="linenumber">45</context>
</context-group>
</trans-unit>
<trans-unit id="label--select-contact-type" datatype="html">
<source>Select Contact Type</source>
<target>Select Contact Type</target>
<context-group purpose="location">
<context context-type="sourcefile">app/metadata-provider/component/forms/organization-info-form.component.ts</context>
<context context-type="linenumber">124</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>
8 changes: 8 additions & 0 deletions ui/src/locale/es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,14 @@
<context context-type="linenumber">45</context>
</context-group>
</trans-unit>
<trans-unit id="label--select-contact-type" datatype="html">
<source>Select Contact Type</source>
<target>Select Contact Type (es)</target>
<context-group purpose="location">
<context context-type="sourcefile">app/metadata-provider/component/forms/organization-info-form.component.ts</context>
<context context-type="linenumber">124</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit 5ce26f9

Please sign in to comment.