[
https://issues.apache.org/jira/browse/OFBIZ-10437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529522#comment-16529522 ]
Aditya Sharma edited comment on OFBIZ-10437 at 7/2/18 8:46 AM:
---------------------------------------------------------------
Yes Jacques, when we were using *inline* javascript we need to pass element *id* to *identify* the *element*.
{quote}<#if containerId?has_content && hasRequiredField?has_content>
<script type="text/javascript">
jQuery("#${containerId}").validate({
submitHandler:
function(form) {
form.submit();
}
});
</script>
</#if>
{quote}
but when we applied .*requireValidation* class and used *query selector* in external javascript to find it
{quote}jQuery(bind_element).find(".requireValidation").each(function()
Unknown macro: \{ var element = jQuery(this); element.validate(); }
);
{quote}
we *no longer need id* as we have the *element in* *"this"* variable.
was (Author: aditya.sharma):
Yes Jacques, when we were using *inline* javascript we need to pass element *id* to *identify* the *element*.
{quote}<#if containerId?has_content && hasRequiredField?has_content>
<script type="text/javascript">
jQuery("#${containerId}").validate({
submitHandler: - function(form) { - form.submit();
}
});
</script>
</#if>
{quote}
but when we applied .*requireValidation* class and used *query selector* in external javascript to find it
{quote}jQuery(bind_element).find(".requireValidation").each(function(){
var element = jQuery(this);
element.validate();
});
{quote}
we *no longer need id* as we have the *element in* *"this"* variable.
> <#if containerId?has_content> id="${containerId}"</#if> is missed in renderFormOpen
> -----------------------------------------------------------------------------------
>
> Key: OFBIZ-10437
> URL:
https://issues.apache.org/jira/browse/OFBIZ-10437> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Trunk
> Reporter: Wei Zhang
> Assignee: Aditya Sharma
> Priority: Minor
> Fix For: Upcoming Branch
>
>
> <#if containerId?has_content> id="${containerId}"</#if> is missed for renderFormOpen in revision 1832307. And there is no id for html form in rendered html.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)