}
})),
- SingleSelectionFormField::create('frontendTemplateName')
- ->objectProperty('templatename')
- ->label('wcf.acp.pip.templateListener.templateName')
- ->description('wcf.acp.pip.templateListener.templateName.description')
- ->required()
- ->options(array_combine(array_keys($templateEvents), array_keys($templateEvents)))
- ->filterable()
- ->addDependency(
- ValueFormFieldDependency::create('environment')
- ->fieldId('environment')
- ->values(['user'])
- ),
-
- SingleSelectionFormField::create('acpTemplateName')
- ->objectProperty('templatename')
- ->label('wcf.acp.pip.templateListener.templateName')
- ->description('wcf.acp.pip.templateListener.templateName.description')
- ->required()
- ->options(array_combine(array_keys($acpTemplateEvents), array_keys($acpTemplateEvents)))
- ->filterable()
- ->addDependency(
- ValueFormFieldDependency::create('environment')
- ->fieldId('environment')
- ->values(['admin'])
- )
- ]);
-
- /** @var SingleSelectionFormField $frontendTemplateName */
- $frontendTemplateName = $form->getNodeById('frontendTemplateName');
- foreach ($templateEvents as $templateName => $events) {
- $dataContainer->appendChild(
- SingleSelectionFormField::create($templateName . '_eventName')
- ->objectProperty('eventname')
- ->label('wcf.acp.pip.templateListener.eventName')
- ->description('wcf.acp.pip.templateListener.eventName.description')
- ->required()
- ->options(array_combine($events, $events))
- ->addDependency(
- ValueFormFieldDependency::create('templateName')
- ->field($frontendTemplateName)
- ->values([$templateName])
- )
- );
- }
-
- /** @var SingleSelectionFormField $acpTemplateName */
- $acpTemplateName = $form->getNodeById('acpTemplateName');
- foreach ($acpTemplateEvents as $templateName => $events) {
- $dataContainer->appendChild(
- SingleSelectionFormField::create('acp_' . $templateName . '_eventName')
- ->objectProperty('eventname')
- ->label('wcf.acp.pip.templateListener.eventName')
- ->description('wcf.acp.pip.templateListener.eventName.description')
- ->required()
- ->options(array_combine($events, $events))
- ->addDependency(
- ValueFormFieldDependency::create('acpTemplateName')
- ->field($acpTemplateName)
- ->values([$templateName])
- )
- );
- }
-
- $dataContainer->appendChildren([
SingleSelectionFormField::create('environment')
->label('wcf.acp.pip.templateListener.environment')
->description('wcf.acp.pip.templateListener.environment.description')
/** @var SingleSelectionFormField $eventNameField */
$eventNameField = $formField->getDocument()->getNodeById('acp_' . $templateNameField->getSaveValue() . '_eventName');
- } else {
+ }
+ else {
/** @var SingleSelectionFormField $templateNameField */
$templateNameField = $formField->getDocument()->getNodeById('frontendTemplateName');
}
})),
+ SingleSelectionFormField::create('frontendTemplateName')
+ ->objectProperty('templatename')
+ ->label('wcf.acp.pip.templateListener.templateName')
+ ->description('wcf.acp.pip.templateListener.templateName.description')
+ ->required()
+ ->options(array_combine(array_keys($templateEvents), array_keys($templateEvents)))
+ ->filterable()
+ ->addDependency(
+ ValueFormFieldDependency::create('environment')
+ ->fieldId('environment')
+ ->values(['user'])
+ ),
+
+ SingleSelectionFormField::create('acpTemplateName')
+ ->objectProperty('templatename')
+ ->label('wcf.acp.pip.templateListener.templateName')
+ ->description('wcf.acp.pip.templateListener.templateName.description')
+ ->required()
+ ->options(array_combine(array_keys($acpTemplateEvents), array_keys($acpTemplateEvents)))
+ ->filterable()
+ ->addDependency(
+ ValueFormFieldDependency::create('environment')
+ ->fieldId('environment')
+ ->values(['admin'])
+ )
+ ]);
+
+ /** @var SingleSelectionFormField $frontendTemplateName */
+ $frontendTemplateName = $form->getNodeById('frontendTemplateName');
+ foreach ($templateEvents as $templateName => $events) {
+ $dataContainer->appendChild(
+ SingleSelectionFormField::create($templateName . '_eventName')
+ ->objectProperty('eventname')
+ ->label('wcf.acp.pip.templateListener.eventName')
+ ->description('wcf.acp.pip.templateListener.eventName.description')
+ ->required()
+ ->options(array_combine($events, $events))
+ ->addDependency(
+ ValueFormFieldDependency::create('templateName')
+ ->field($frontendTemplateName)
+ ->values([$templateName])
+ )
+ );
+ }
+
+ /** @var SingleSelectionFormField $acpTemplateName */
+ $acpTemplateName = $form->getNodeById('acpTemplateName');
+ foreach ($acpTemplateEvents as $templateName => $events) {
+ $dataContainer->appendChild(
+ SingleSelectionFormField::create('acp_' . $templateName . '_eventName')
+ ->objectProperty('eventname')
+ ->label('wcf.acp.pip.templateListener.eventName')
+ ->description('wcf.acp.pip.templateListener.eventName.description')
+ ->required()
+ ->options(array_combine($events, $events))
+ ->addDependency(
+ ValueFormFieldDependency::create('acpTemplateName')
+ ->field($acpTemplateName)
+ ->values([$templateName])
+ )
+ );
+ }
+
+ $dataContainer->appendChildren([
MultilineTextFormField::create('templateCode')
->objectProperty('templatecode')
->label('wcf.acp.pip.templateListener.templateCode')