This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release18.12
in repository
https://gitbox.apache.org/repos/asf/ofbiz-plugins.gitThe following commit(s) were added to refs/heads/release18.12 by this push:
new 918d3e8 Fixed: Error while uploading file in Ecommerce Profile's File Manager (OFBIZ-10746)
918d3e8 is described below
commit 918d3e851864edfe3f517bf30a1237634d9136b5
Author: Jacques Le Roux <
[hidden email]>
AuthorDate: Tue Jun 23 14:35:33 2020 +0200
Fixed: Error while uploading file in Ecommerce Profile's File Manager (OFBIZ-10746)
This is only fixing the UI where you did not see the file to upload you selected
There is still an issue to upload the file
Thanks: Priya Sharma for testing
---
ecommerce/template/customer/ViewProfile.ftl | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/ecommerce/template/customer/ViewProfile.ftl b/ecommerce/template/customer/ViewProfile.ftl
index 6bd3a45..e7211f1 100644
--- a/ecommerce/template/customer/ViewProfile.ftl
+++ b/ecommerce/template/customer/ViewProfile.ftl
@@ -464,10 +464,20 @@ under the License.
<input type="hidden" name="statusId" value="CTNT_PUBLISHED"/>
<input type="hidden" name="roleTypeId" value="OWNER"/>
<label class="mr-2">${uiLabelMap.EcommerceUploadNewFile}</label>
- <label class="custom-file mr-2">
- <input type="file" name="uploadedFile" class="custom-file-input"/>
+ <div class="custom-file mr-2">
+ <input type="file" class="custom-file-input" id="customFile" required/>
<span class="custom-file-control"></span>
- </label>
+ <div class="invalid-feedback">Example invalid custom file feedback</div>
+ </div>
+ <script>
+ $('#customFile').on('change',function(){
+ //get the file name
+ var fileName = $(this).val();
+ fileName = fileName.replace('C:\\fakepath\\', " ");
+ //replace the "Choose a file" label
+ $(this).next('.custom-file-label').html(fileName);
+ })
+ </script>
<select name="partyContentTypeId" class="custom-select mr-2">
<option value="">${uiLabelMap.PartySelectPurpose}</option>
<#list partyContentTypes as partyContentType>