Alfresco / alfresco-ng2-components

Alfresco Angular Components
https://www.alfresco.com/abn/adf/docs/
Apache License 2.0
294 stars 265 forks source link

Allow upload button label customization #1551

Closed wabson closed 7 years ago

wabson commented 7 years ago

Type of issue: (check with "[x]")

- [x] New feature request
- [ ] Bug  
- [ ] Support request

Current behavior:

The <label> element output by the upload button component is resolved from an i18n file provided by the component. It can be overridden globally but not on a case-by-base basis which is required for the heathcare app to give the user more context.

Expected behavior:

The component should accept a an input property staticTitle of similar that allows the label to be customised.

In the local component previously used by the healthcare app there was this property on the upload button component which could be provided by the wrapping component and then rendered by the component, e.g.

<label *ngIf="!staticTitle" for="upload-single-file">{{'FILE_UPLOAD.BUTTON.UPLOAD_FILE' | translate}}</label>
<label *ngIf="staticTitle" for="upload-single-file">{{staticTitle}}</label>

and the same for the upload-multiple-file label element.

Steps to reproduce the issue:

Component name and version:

ng2-alfresco-upload

Browser and version:

Node version (for build issues):

New feature request:

DenysVuika commented 7 years ago

See also #510