Skip to content

Commit

Permalink
see cl 1.0.0-beta20
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kunitzsch committed Jun 23, 2020
1 parent 9154be7 commit c57b1c9
Show file tree
Hide file tree
Showing 32 changed files with 67 additions and 55 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.0-beta20] - 2020-06-23

- fixed fields for login-registration

## [1.0.0-beta19] - 2019-11-12

- deleted .lock file
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "LGPL-3.0-or-later",
"require": {
"php": "^7.1",
"contao/core-bundle": "^4.4",
"heimrichhannot/contao-fieldpalette-bundle": "~0.2||~1.0",
"contao/core-bundle": "^4.4|^4.9",
"heimrichhannot/contao-fieldpalette-bundle": "^0.5",
"heimrichhannot/contao-list-bundle": "^1.0-beta|^1.0",
"heimrichhannot/contao-utils-bundle": "^2.0",
"heimrichhannot/contao-formhybrid": "^3.0",
Expand Down
14 changes: 1 addition & 13 deletions src/Backend/Member.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand All @@ -26,24 +26,14 @@ public function __construct(ContaoFrameworkInterface $framework)

/**
* Add an URI scheme if not existing to an url.
*
* @param string $varValue
* @param DataContainer $dc
*
* @return string
*/
public function addURIScheme(string $varValue, DataContainer $dc): string
{
return System::getContainer()->get('huh.utils.url')->addURIScheme($varValue);
}

/**
* @param string $varValue
* @param DataContainer $dc
*
* @throws \Exception
*
* @return string
*/
public function generateAlias(string $varValue, DataContainer $dc): string
{
Expand All @@ -63,8 +53,6 @@ public function generateAlias(string $varValue, DataContainer $dc): string
/**
* Get a list of job title choices.
*
* @param DataContainer $dc
*
* @return array List of job titles
*/
public function getJobTitleChoices(DataContainer $dc): array
Expand Down
2 changes: 1 addition & 1 deletion src/Choice/CityChoice.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
6 changes: 2 additions & 4 deletions src/ContaoManager/Plugin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand All @@ -28,9 +28,7 @@ public function getBundles(ParserInterface $parser)
/**
* Allows a plugin to override extension configuration.
*
* @param string $extensionName
* @param array $extensionConfigs
* @param ContainerBuilder $container
* @param string $extensionName
*
* @return
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Member.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/MemberAddress.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
9 changes: 3 additions & 6 deletions src/EventListener/HookListener.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down Expand Up @@ -30,11 +30,8 @@ public function __construct(ContaoFrameworkInterface $framework)
/**
* Switch Address with member address based on filter data.
*
* @param $result
* @param $item
* @param Module $moduleList
* @param FilterConfig $filterConfig
* @param ListConfigModel $listConfig
* @param $result
* @param $item
*
* @return mixed
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Filter/CityType.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Form/FormPasswordNoConfirm.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
7 changes: 4 additions & 3 deletions src/Form/MemberLoginRegistrationForm.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand All @@ -11,6 +11,7 @@
use Contao\Config;
use Contao\Controller;
use Contao\PageModel;
use Contao\StringUtil;
use Contao\System;
use HeimrichHannot\FormHybrid\Form;
use HeimrichHannot\Haste\Util\FormSubmission;
Expand All @@ -35,7 +36,7 @@ public function modifyDC(&$arrDca = null)
}

// add password to default palette
if (\in_array('password', deserialize($this->objModule->formHybridEditable), true)) {
if (\in_array('password', StringUtil::deserialize($this->objModule->formHybridEditable, true), true)) {
$this->dca['palettes']['default'] = str_replace('login;', 'login,password,password_noConfirm;', $this->dca['palettes']['default']);
}

Expand Down Expand Up @@ -250,7 +251,7 @@ protected function createNewUser($arrData)
if (isset($GLOBALS['TL_HOOKS']['createNewUser']) && \is_array($GLOBALS['TL_HOOKS']['createNewUser'])) {
foreach ($GLOBALS['TL_HOOKS']['createNewUser'] as $callback) {
$this->import($callback[0]);
$this->{$callback[0]}->{$callback[1]}($objNewUser->id, $arrData, $this);
$this->{$callback[0]}->{$callback[1]}($objNewUser->id, $arrData, $this->objModule);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Form/MemberRegistrationPlusForm.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/HeimrichHannotContaoMemberBundle.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Manager/MemberMessageManager.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Manager/RegistrationManager.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/MemberAddressModel.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Model/MemberPlusModel.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Module/ModuleLoginRegistration.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Module/ModuleRegistrationPlus.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
5 changes: 5 additions & 0 deletions src/Resources/contao/dca/tl_member.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

$dca['subpalettes']['addImage'] = 'singleSRC,alt,imageTitle,size,imagemargin,imageUrl,fullsize,caption,floating';

if(TL_MODE == 'FE') {
unset($dca['palettes']['__selector__']);
}


$fields = [
'headline' => [
'label' => &$GLOBALS['TL_LANG']['tl_member']['headline'],
Expand Down
20 changes: 19 additions & 1 deletion src/Resources/contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@
'eval' => ['submitOnChange' => true, 'tl_class' => 'w50 clr'],
'sql' => "char(1) NOT NULL default ''",
],
'bypassPasswordConfirm' => [
'label' => &$GLOBALS['TL_LANG']['tl_module']['bypassPasswordConfirm'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => ['tl_class' => 'w50 clr'],
'sql' => "char(1) NOT NULL default ''"
],
'redirectLogin' => [
'label' => &$GLOBALS['TL_LANG']['tl_module']['redirectLogin'],
'exclude' => true,
'inputType' => 'pageTree',
'foreignKey' => 'tl_page.title',
'eval' => ['fieldType' => 'radio', 'tl_class' => 'w50 clr'],
'sql' => "int(10) unsigned NOT NULL default '0'",
'relation' => ['type' => 'hasOne', 'load' => 'lazy']
]
];

$dc['fields'] = array_merge($dc['fields'], $arrFields);


$dc['fields'] = array_merge($dc['fields'], $arrFields);
4 changes: 4 additions & 0 deletions src/Resources/contao/languages/de/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
*/
$GLOBALS['TL_LANG']['tl_module']['reg_activate_plus'][0] = '';
$GLOBALS['TL_LANG']['tl_module']['reg_activate_plus'][1] = '';
$GLOBALS['TL_LANG']['tl_module']['bypassPasswordConfirm'][0] = 'Passwortbestätigung deaktivieren';
$GLOBALS['TL_LANG']['tl_module']['bypassPasswordConfirm'][1] = 'Wählen Sie diese Option, wenn beim Login-/Registrierungsformular kein Feld für die Bestätigung des Passworts aufgeführt werden soll.';
$GLOBALS['TL_LANG']['tl_module']['redirectLogin'][0] = 'Weiterleitung nach Login';
$GLOBALS['TL_LANG']['tl_module']['redirectLogin'][1] = 'Wählen Sie hier die Seite aus, zu der ein Nutzer bei Login über das Formular weitergeleitet werden soll.';

/**
* Legends
Expand Down
2 changes: 1 addition & 1 deletion tests/Backend/HooksTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Choice/CityChoiceTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
5 changes: 1 addition & 4 deletions tests/ContaoManager/PluginTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down Expand Up @@ -59,9 +59,6 @@ public function testGetExtensionConfig()
/**
* Mocks the plugin loader.
*
* @param Invocation $expects
* @param array $plugins
*
* @return PluginLoader|\PHPUnit_Framework_MockObject_MockObject
*/
private function mockPluginLoader(Invocation $expects, array $plugins = [])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Entity/MemberAddressTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Entity/MemberTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Filter/CityTypeTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2019 Heimrich & Hannot GmbH
* Copyright (c) 2020 Heimrich & Hannot GmbH
*
* @license LGPL-3.0-or-later
*/
Expand Down
Loading

0 comments on commit c57b1c9

Please sign in to comment.