From eed87dae937735464af7b9b9330fbb6dbaa72507 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 13 Nov 2014 17:02:54 +0100 Subject: [PATCH] Update markup to use pat-inlinevalidation. See Products.CMFPlone issues 282 and 299 --- plone/app/z3cform/templates/multi_input.pt | 3 ++- plone/app/z3cform/templates/object_input.pt | 3 ++- plone/app/z3cform/templates/singlecheckbox.pt | 3 ++- plone/app/z3cform/templates/widget.pt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plone/app/z3cform/templates/multi_input.pt b/plone/app/z3cform/templates/multi_input.pt index 5f4e7873..a553ba2f 100644 --- a/plone/app/z3cform/templates/multi_input.pt +++ b/plone/app/z3cform/templates/multi_input.pt @@ -9,7 +9,8 @@ key_error key_widget/error|nothing; error_class python:(error or key_error) and ' error' or ''; fieldname_class string:kssattr-fieldname-${widget/name};" - tal:attributes="class string:multi-widget-field field z3cformInlineValidation ${fieldname_class}${error_class}; + data-pat-inlinevalidation='{"type":"z3c.form"}' + tal:attributes="class string:multi-widget-field field pat-inlinevalidation ${fieldname_class}${error_class}; id string:formfield-${widget/id};"> diff --git a/plone/app/z3cform/templates/singlecheckbox.pt b/plone/app/z3cform/templates/singlecheckbox.pt index d890837e..84e51f47 100644 --- a/plone/app/z3cform/templates/singlecheckbox.pt +++ b/plone/app/z3cform/templates/singlecheckbox.pt @@ -5,7 +5,8 @@ error widget/error; error_class python:error and ' error' or ''; fieldname_class string:kssattr-fieldname-${widget/name};" - tal:attributes="class string:field z3cformInlineValidation ${fieldname_class}${error_class}; + data-pat-inlinevalidation='{"type":"z3c.form"}' + tal:attributes="class string:field pat-inlinevalidation ${fieldname_class}${error_class}; data-fieldname widget/name; id string:formfield-${widget/id};"> diff --git a/plone/app/z3cform/templates/widget.pt b/plone/app/z3cform/templates/widget.pt index 07199eae..bbed5337 100644 --- a/plone/app/z3cform/templates/widget.pt +++ b/plone/app/z3cform/templates/widget.pt @@ -8,7 +8,8 @@ empty_values python: (None, '', [], ('', '', '', '00', '00', ''), ('', '', '')); empty_class python: (widget.value in empty_values) and ' empty' or ''; fieldname_class string:kssattr-fieldname-${widget/name};" - tal:attributes="class string:field z3cformInlineValidation ${fieldname_class}${error_class}${empty_class}; + data-pat-inlinevalidation='{"type":"z3c.form"}' + tal:attributes="class string:field pat-inlinevalidation ${fieldname_class}${error_class}${empty_class}; data-fieldname widget/name; id string:formfield-${widget/id};">