diff --git a/Classes/ViewHelpers/Validation/PasswordValidationDataAttributeViewHelper.php b/Classes/ViewHelpers/Validation/PasswordValidationDataAttributeViewHelper.php
index 885c87a77..e5f5608dc 100644
--- a/Classes/ViewHelpers/Validation/PasswordValidationDataAttributeViewHelper.php
+++ b/Classes/ViewHelpers/Validation/PasswordValidationDataAttributeViewHelper.php
@@ -12,6 +12,15 @@
class PasswordValidationDataAttributeViewHelper extends ValidationDataAttributeViewHelper
{
+ /**
+ * @return void
+ */
+ public function initializeArguments()
+ {
+ parent::initializeArguments();
+ $this->registerArgument('ttContentUid', 'int', 'UID of content element', false);
+ }
+
/**
* Returns Data Attribute Array for JS validation with parsley.js
*
@@ -25,7 +34,11 @@ public function render(): array
if ($this->isClientValidationEnabled()) {
/** @var Field $field */
$field = $this->arguments['field'];
+ $ttContentUid = $this->arguments['ttContentUid'];
$additionalAttributes['data-parsley-equalto'] = '#powermail_field_' . $field->getMarker();
+ if ($ttContentUid) {
+ $additionalAttributes['data-parsley-equalto'] = $additionalAttributes['data-parsley-equalto'] . '_' . $ttContentUid;
+ }
$additionalAttributes['data-parsley-equalto-message'] =
LocalizationUtility::translate('validationerror_password');
}
diff --git a/Resources/Private/Partials/Form/Field/Captcha.html b/Resources/Private/Partials/Form/Field/Captcha.html
index 9f35943f2..8348d93f0 100644
--- a/Resources/Private/Partials/Form/Field/Captcha.html
+++ b/Resources/Private/Partials/Form/Field/Captcha.html
@@ -5,7 +5,7 @@
{setting.label}
diff --git a/Resources/Private/Partials/Form/Field/Country.html b/Resources/Private/Partials/Form/Field/Country.html
index fdfcc846e..95cd6c2d6 100644
--- a/Resources/Private/Partials/Form/Field/Country.html
+++ b/Resources/Private/Partials/Form/Field/Country.html
@@ -17,6 +17,6 @@
class="powermail_country {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}"
value="{vh:misc.prefillField(field:field, mail:mail)}"
additionalAttributes="{vh:validation.validationDataAttribute(field:field)}"
- id="powermail_field_{field.marker}" />
+ id="powermail_field_{field.marker}_{ttContentUid}" />
diff --git a/Resources/Private/Partials/Form/Field/Date.html b/Resources/Private/Partials/Form/Field/Date.html
index 339d59801..ef3fa9ecf 100644
--- a/Resources/Private/Partials/Form/Field/Date.html
+++ b/Resources/Private/Partials/Form/Field/Date.html
@@ -6,7 +6,7 @@
diff --git a/Resources/Private/Partials/Form/Field/Hidden.html b/Resources/Private/Partials/Form/Field/Hidden.html
index 162e609e1..8dee24703 100644
--- a/Resources/Private/Partials/Form/Field/Hidden.html
+++ b/Resources/Private/Partials/Form/Field/Hidden.html
@@ -1,6 +1,6 @@
{namespace vh=In2code\Powermail\ViewHelpers}
diff --git a/Resources/Private/Partials/Form/Field/Input.html b/Resources/Private/Partials/Form/Field/Input.html
index 70f39ca37..673f24059 100644
--- a/Resources/Private/Partials/Form/Field/Input.html
+++ b/Resources/Private/Partials/Form/Field/Input.html
@@ -11,6 +11,6 @@
value="{vh:misc.prefillField(field:field, mail:mail)}"
class="powermail_input {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}"
additionalAttributes="{vh:validation.validationDataAttribute(field:field)}"
- id="powermail_field_{field.marker}" />
+ id="powermail_field_{field.marker}_{ttContentUid}" />
diff --git a/Resources/Private/Partials/Form/Field/Location.html b/Resources/Private/Partials/Form/Field/Location.html
index aecf92eb6..1de77dcb9 100644
--- a/Resources/Private/Partials/Form/Field/Location.html
+++ b/Resources/Private/Partials/Form/Field/Location.html
@@ -5,7 +5,7 @@
diff --git a/Resources/Private/Partials/Form/Field/Radio.html b/Resources/Private/Partials/Form/Field/Radio.html
index c1f34fcfa..7d67620da 100644
--- a/Resources/Private/Partials/Form/Field/Radio.html
+++ b/Resources/Private/Partials/Form/Field/Radio.html
@@ -11,7 +11,7 @@
property="{field.marker}"
value="{setting.value}"
checked="{vh:misc.prefillMultiField(field:field, mail:mail, cycle:index.cycle)}"
- id="powermail_field_{field.marker}_{index.cycle}"
+ id="powermail_field_{field.marker}_{ttContentUid}_{index.cycle}"
additionalAttributes="{vh:validation.validationDataAttribute(field:field, iteration:index)}"
class="powermail_radio" />
{setting.label}
diff --git a/Resources/Private/Partials/Form/Field/Select.html b/Resources/Private/Partials/Form/Field/Select.html
index cbaf31a36..4b74d75f1 100644
--- a/Resources/Private/Partials/Form/Field/Select.html
+++ b/Resources/Private/Partials/Form/Field/Select.html
@@ -8,7 +8,7 @@
options="{field.modifiedSettings}"
property="{field.marker}"
class="powermail_select {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}"
- id="powermail_field_{field.marker}"
+ id="powermail_field_{field.marker}_{ttContentUid}"
additionalAttributes="{vh:validation.validationDataAttribute(field:field)}"
multiple="{field.multiselectForField}"
value="{vh:misc.prefillField(field:field, mail:mail)}" />
diff --git a/Resources/Private/Partials/Form/Field/Textarea.html b/Resources/Private/Partials/Form/Field/Textarea.html
index e26003138..4aa76f25a 100644
--- a/Resources/Private/Partials/Form/Field/Textarea.html
+++ b/Resources/Private/Partials/Form/Field/Textarea.html
@@ -7,7 +7,7 @@
-
diff --git a/Resources/Private/Partials/Form/Page.html b/Resources/Private/Partials/Form/Page.html
index 1ea739215..09e84d6ad 100644
--- a/Resources/Private/Partials/Form/Page.html
+++ b/Resources/Private/Partials/Form/Page.html
@@ -6,7 +6,7 @@
-
+