[
https://issues.apache.org/jira/browse/OFBIZ-9846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472964#comment-16472964
]
Jacques Le Roux edited comment on OFBIZ-9846 at 5/26/18 7:57 AM:
-----------------------------------------------------------------
Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the
form.
Used attribute selector to find elements and set focus on the particular field.
Added "requireValidation" class to all the forms with required fields.
Used the class selector to find such forms & attached Validator plugin to it.
Steps to verify:
Add ProdCatalog page: https://localhost:8443/catalog/control/EditProdCatalog
Dialogs:
New Example dialog on Find Example page
https://localhost:8443/example/control/FindExample
# Go to Find Example page https://localhost:8443/example/control/FindExample
# Click on New Example button
# Validations should work in dialog on form submit.
Additional Changes:
Link for dialog in HtmlMenuMacroLibrary still had the inline code. Replaced the
code with external js code.
Validations on forms rendered with renderSubmitField macro from
HtmlFormMacroLibrary.ftl seems not working
https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee, will create a
separate ticket for it.
I observed that HtmlMenuMacroLibrary.ftl for rainbowstone is redundant at path
themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl and
themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl. The file at is
themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl is not used and can be
removed.
was (Author: aditya.sharma):
Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the
form.
Used attribute selector to find elements and set focus on the particular field.
Added "requireValidation" class to all the forms with required fields.
Used the class selector to find such forms & attached Validator plugin to it.
Steps to verify:
Add ProdCatalog page:
[https://localhost:8443/catalog/control/EditProdCatalog|http://example.com/]
Dialogs:
New Example dialog on Find Example page
[https://localhost:8443/example/control/FindExample]
# Go to Find Example page
([https://localhost:8443/example/control/FindExample])
# Click on New Example button
# Validations should work in dialog on form submit.
Additional Changes:
Link for dialog in HtmlMenuMacroLibrary still had the inline code. Replaced the
code with external js code.
Validations on forms rendered with renderSubmitField macro from
HtmlFormMacroLibrary.ftl seems not working
[https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee|http://example.com],
will create a separate ticket for it.
I observed that HtmlMenuMacroLibrary.ftl for rainbowstone is redundant at path
themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl and
themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl. The file at is
themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl is not used and can be
removed.
> Replace Inline js with External js in renderFormClose macro
> -----------------------------------------------------------
>
> Key: OFBIZ-9846
> URL: https://issues.apache.org/jira/browse/OFBIZ-9846
> Project: OFBiz
> Issue Type: Sub-task
> Affects Versions: Trunk
> Reporter: Aditya Sharma
> Assignee: Jacques Le Roux
> Priority: Minor
> Attachments: OFBIZ-9846.patch
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)