Add "Adresscheck" form to extension
This commit is contained in:
+172
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'label' => 'name',
|
||||
'label_alt' => 'email',
|
||||
'default_sortby' => 'ORDER BY last_name, first_name',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'prependAtCopy' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy',
|
||||
'delete' => 'deleted',
|
||||
'title' => 'Adresscheck',
|
||||
'versioningWS' => true,
|
||||
'origUid' => 't3_origuid',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden'
|
||||
],
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
'searchFields' => 'name, first_name, last_name, email',
|
||||
'dividers2tabs' => 1,
|
||||
],
|
||||
'interface' => [
|
||||
'showRecordFieldList' => 'first_name,last_name,address,city,zip,country,email,title'
|
||||
],
|
||||
'columns' => [
|
||||
'pid' => [
|
||||
'label' => 'pid',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
],
|
||||
'crdate' => [
|
||||
'label' => 'crdate',
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
]
|
||||
],
|
||||
'cruser_id' => [
|
||||
'label' => 'cruser_id',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
],
|
||||
'tstamp' => [
|
||||
'label' => 'tstamp',
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
]
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Versteckt',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'customer_id' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Kundennummer',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '8',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Anrede',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '8',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'first_name' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Vorname',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'last_name' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Name',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'address' => [
|
||||
'label' => 'Strasse / Nr.',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => '20',
|
||||
'rows' => '3'
|
||||
]
|
||||
],
|
||||
'email' => [
|
||||
'label' => 'E-Mail',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255',
|
||||
'softref' => 'email'
|
||||
]
|
||||
],
|
||||
'city' => [
|
||||
'label' => 'Stadt',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'zip' => [
|
||||
'label' => 'PLZ',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => 'trim',
|
||||
'size' => '10',
|
||||
'max' => '20'
|
||||
]
|
||||
],
|
||||
'country' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Land',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '128'
|
||||
]
|
||||
],
|
||||
'no_postal' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Keine Postalische Werbung',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'no_email' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Keine E-Mails mehr',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'address_current' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Adresse ist aktuell',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
],
|
||||
'types' => [
|
||||
'0' => ['showitem' =>
|
||||
'hidden,
|
||||
title,first_name,last_name,address,zip,city,country,email,no_postal,no_email,address_current,
|
||||
']
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,132 @@
|
||||
|
||||
renderingOptions:
|
||||
submitButtonLabel: Absenden
|
||||
type: Form
|
||||
identifier: adresscheck
|
||||
label: Adresscheck
|
||||
prototypeName: standard
|
||||
finishers:
|
||||
#-
|
||||
# options:
|
||||
# subject: Adresscheck
|
||||
# recipientAddress: ' [email protected]'
|
||||
# recipientName: 'Pascal Heim'
|
||||
# senderAddress: [email protected]
|
||||
# senderName: 'E&P Reisen'
|
||||
# replyToAddress: ''
|
||||
# carbonCopyAddress: ''
|
||||
# blindCarbonCopyAddress: ''
|
||||
# format: html
|
||||
# attachUploads: false
|
||||
# translation:
|
||||
# language: ''
|
||||
# identifier: EmailToReceiver
|
||||
-
|
||||
identifier: SaveToDatabase
|
||||
options:
|
||||
table: 'tx_eptheme_domain_model_addresscheck'
|
||||
mode: insert
|
||||
databaseColumnMappings:
|
||||
pid:
|
||||
value: 1
|
||||
elements:
|
||||
customer-id:
|
||||
mapOnDatabaseColumn: 'customer_id'
|
||||
title:
|
||||
mapOnDatabaseColumn: 'title'
|
||||
first-name:
|
||||
mapOnDatabaseColumn: 'first_name'
|
||||
last-name:
|
||||
mapOnDatabaseColumn: 'last_name'
|
||||
address:
|
||||
mapOnDatabaseColumn: 'address'
|
||||
zip:
|
||||
mapOnDatabaseColumn: 'zip'
|
||||
city:
|
||||
mapOnDatabaseColumn: 'city'
|
||||
country:
|
||||
mapOnDatabaseColumn: 'country'
|
||||
email:
|
||||
mapOnDatabaseColumn: 'email'
|
||||
no-postal:
|
||||
mapOnDatabaseColumn: 'no_postal'
|
||||
no-email:
|
||||
mapOnDatabaseColumn: 'no_email'
|
||||
address-is-current-postal:
|
||||
mapOnDatabaseColumn: 'address_current'
|
||||
renderables:
|
||||
-
|
||||
renderingOptions:
|
||||
previousButtonLabel: ''
|
||||
nextButtonLabel: ''
|
||||
type: Page
|
||||
identifier: page-1
|
||||
label: ''
|
||||
renderables:
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Hidden
|
||||
identifier: customer-id
|
||||
label: KundenID
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: title
|
||||
label: Anrede
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: first-name
|
||||
label: Vorname
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: last-name
|
||||
label: Name
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: address
|
||||
label: 'Straße & Hausnummer'
|
||||
properties:
|
||||
elementDescription: ''
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: zip
|
||||
label: PLZ
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: city
|
||||
label: Stadt
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: country
|
||||
label: Land
|
||||
-
|
||||
defaultValue: ''
|
||||
type: Text
|
||||
identifier: email
|
||||
label: E-Mail
|
||||
properties:
|
||||
fluidAdditionalAttributes:
|
||||
required: required
|
||||
validators:
|
||||
-
|
||||
identifier: NotEmpty
|
||||
-
|
||||
identifier: EmailAddress
|
||||
-
|
||||
type: Checkbox
|
||||
identifier: no-postal
|
||||
label: 'Postalische Werbung abbestellen'
|
||||
-
|
||||
type: Checkbox
|
||||
identifier: no-email
|
||||
label: 'Ich möchte keine Mails mehr erhalten.'
|
||||
-
|
||||
type: Checkbox
|
||||
identifier: address-is-current
|
||||
label: 'Meine Adresse ist aktuell.'
|
||||
@@ -7,6 +7,7 @@ call_user_func(function () {
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_slide');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_lineup');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_badge');
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_eptheme_domain_model_addresscheck');
|
||||
|
||||
if (TYPO3_MODE === 'BE') {
|
||||
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
|
||||
|
||||
@@ -128,3 +128,42 @@ CREATE TABLE tt_content (
|
||||
tx_eptheme_contact int(11) unsigned DEFAULT '0',
|
||||
button varchar(255) DEFAULT '' NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE tx_eptheme_domain_model_addresscheck (
|
||||
uid int(11) NOT NULL auto_increment,
|
||||
pid int(11) DEFAULT '0' NOT NULL,
|
||||
tstamp int(11) DEFAULT '0' NOT NULL,
|
||||
crdate int(11) DEFAULT '0' NOT NULL,
|
||||
cruser_id int(11) DEFAULT '0' NOT NULL,
|
||||
deleted tinyint(3) DEFAULT '0',
|
||||
hidden tinyint(4) DEFAULT '0' NOT NULL,
|
||||
|
||||
name tinytext,
|
||||
first_name tinytext,
|
||||
last_name tinytext,
|
||||
title varchar(255) DEFAULT '' NOT NULL,
|
||||
email varchar(255) DEFAULT '' NOT NULL,
|
||||
address tinytext,
|
||||
city varchar(255) DEFAULT '' NOT NULL,
|
||||
zip varchar(20) DEFAULT '' NOT NULL,
|
||||
country varchar(128) DEFAULT '' NOT NULL,
|
||||
|
||||
no_postal tinyint(4) DEFAULT '0' NOT NULL,
|
||||
no_email tinyint(4) DEFAULT '0' NOT NULL,
|
||||
address_current tinyint(4) DEFAULT '0' NOT NULL,
|
||||
|
||||
t3ver_oid int(11) DEFAULT '0' NOT NULL,
|
||||
t3ver_id int(11) DEFAULT '0' NOT NULL,
|
||||
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
|
||||
t3ver_label varchar(30) DEFAULT '' NOT NULL,
|
||||
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
|
||||
t3ver_stage tinyint(4) DEFAULT '0' NOT NULL,
|
||||
t3ver_count int(11) DEFAULT '0' NOT NULL,
|
||||
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
|
||||
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
|
||||
t3_origuid int(11) DEFAULT '0' NOT NULL,
|
||||
|
||||
PRIMARY KEY (uid),
|
||||
KEY parent (pid),
|
||||
KEY pid (pid,email)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user