Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Classes/Domain/Model/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Field extends AbstractEntity

protected string $placeholder = '';

protected string $placeholderRepeat = '';

protected string $createFromTyposcript = '';

protected int $validation = 0;
Expand Down Expand Up @@ -275,6 +277,16 @@ public function getPlaceholder(): string
return $this->placeholder;
}

public function setPlaceholderRepeat(string $placeholder_repeat): void
{
$this->placeholderRepeat = $placeholder_repeat;
}

public function getPlaceholderRepeat(): string
{
return $this->placeholderRepeat;
}

public function setCreateFromTyposcript(string $createFromTyposcript): void
{
$this->createFromTyposcript = $createFromTyposcript;
Expand Down
17 changes: 17 additions & 0 deletions Configuration/TCA/tx_powermail_domain_model_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
'--div--;LLL:EXT:powermail/Resources/Private/Language/locallang_db.xlf:' . Field::TABLE_NAME . '.sheet1, ' .
'--palette--;LLL:EXT:powermail/Resources/Private/Language/locallang_db.xlf:' .
Field::TABLE_NAME . '.validation_title;21, ' .
'--palette--;LLL:EXT:powermail/Resources/Private/Language/locallang_db.xlf:' .
Field::TABLE_NAME . '.prefill_title;34, ' .
'--palette--;Layout;43, ' .
'description, ' .
'--palette--;LLL:EXT:powermail/Resources/Private/Language/locallang_db.xlf:' .
Expand Down Expand Up @@ -262,6 +264,10 @@
'showitem' => 'feuser_value, create_from_typoscript',
'canNotCollapse' => 1,
],
'34' => [
'showitem' => 'placeholder, placeholder_repeat',
'canNotCollapse' => 1,
],
'4' => [
'showitem' => 'css, multiselect, datepicker_settings',
],
Expand Down Expand Up @@ -815,6 +821,17 @@
'default' => '',
],
],
'placeholder_repeat' => [
'exclude' => true,
'label' => 'LLL:EXT:powermail/Resources/Private/Language/locallang_db.xlf:' .
Field::TABLE_NAME . '.placeholder_repeat',
'config' => [
'type' => 'text',
'cols' => '26',
'rows' => '2',
'default' => '',
],
],
'feuser_value' => [
'l10n_mode' => 'exclude',
'exclude' => true,
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@
<trans-unit id="tx_powermail_domain_model_field.placeholder" resname="tx_powermail_domain_model_field.placeholder">
<source>Placeholder</source>
</trans-unit>
<trans-unit id="tx_powermail_domain_model_field.placeholder_repeat" resname="tx_powermail_domain_model_field.placeholder_repeat">
<source>Placeholder for repeat</source>
</trans-unit>
<trans-unit id="tx_powermail_domain_model_field.create_from_typoscript" resname="tx_powermail_domain_model_field.create_from_typoscript">
<source>Create from TypoScript (e.g. lib.fieldvalues)</source>
</trans-unit>
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Partials/Form/Field/Password.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<f:form.password
id="powermail_field_{field.marker}"
property="{field.marker}"
placeholder="{field.placeholder}"
value=""
additionalAttributes="{vh:validation.validationDataAttribute(field:field)}"
class="powermail_password {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}" />
Expand All @@ -24,6 +25,7 @@
<f:form.password
id="powermail_field_{field.marker}_mirror"
property="{field.marker}_mirror"
placeholder="{field.placeholderRepeat}"
value=""
additionalAttributes="{vh:validation.passwordValidationDataAttribute(field:field)}"
class="powermail_password {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}" />
Expand Down
1 change: 1 addition & 0 deletions ext_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ CREATE TABLE tx_powermail_domain_model_field (
text text NOT NULL,
prefill_value text NOT NULL,
placeholder text NOT NULL,
placeholder_repeat text NOT NULL,
create_from_typoscript text NOT NULL,
validation int(11) DEFAULT '0' NOT NULL,
validation_configuration varchar(255) DEFAULT '' NOT NULL,
Expand Down