How to configure the file upload and photo widget - kwantu/platformconfiguration GitHub Wiki
Created by Rob Worthington on Oct 10, 2017. Copied from Kwantu Wiki on 2018-12-12.
This capability has to be in the app-config-file because it is an optional UI (user interface) feature. It is part of the <element>
tag which contains the fields of a form. The tags inside the <elements>
tag relate to the nature of the fields on the form and the <elUpload>
tag specifically defines this kind of field.
Example:
<elUpload id="uploadwid">
<displays>
<display show="true" mode="edit" widget="upload">
<label show="true">
<i18n xml:lang="en">Upload attachment</i18n>
<i18n xml:lang="pt"/>
</label>
</display>
<display show="true" mode="readonly" widget="preview">
<label show="true">
<i18n xml:lang="en">Upload attachment</i18n>
<i18n xml:lang="pt"/>
</label>
</display>
</displays>
<fieldData dataType="string"/>
<!--<validations>
<validation seq="1">
<simple type="required" dataType="boolean" value="true"/>
<errorMessage>
<i18n xml:lang="en">Please upload attachment</i18n>
<i18n xml:lang="pt">Por favor, insira algum texto</i18n>
</errorMessage>
</validation>
</validations>-->
</elUpload>
Additional config to incorporate:
buttonLabel or label - For camera text downloadLabel - For download button uploadLabel - for Upload button removeLabel - for removeButton
in the display section with i18n tags as under
<display show="true">
<label>
<i18n xml:lang="en">Member(s) / shareholder(s) details. Please upload the ID document copies</i18n>
</label>
<uploadLabel>
<i18n xml:lang="en">Member(s) / shareholder(s) details. Please upload the ID document copies</i18n>
</uploadLabel>
</display>