(OFBIZ-9846) 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: At add ProdCatalog page: https://localhost:8443/catalog/control/EditProdCatalog Dialogs: New Example dialog on Find Example page 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. jleroux: I agree about NewEmployee issue As mentionned Aditya themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl was redundant, removed I also removed commented out code in rainbowstone HtmlMenuMacroLibrary.ftl (left by Aditya while working on the issue I guess) Thanks: Aditya git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832307 13f79535-47bb-0310-9956-ffa450edef68