Skip to content

Commit

Permalink
Merge pull request #9 from oveleon/develop
Browse files Browse the repository at this point in the history
Remove Patchwork/UTF8
  • Loading branch information
zoglo authored Feb 15, 2022
2 parents ddb4770 + e27afd9 commit 77000e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The contao advanced form bundle adds a new form-field (Formpage) to forms that c

---

> Working with **Contao 4.9** and up to **Contao 4.12** (PHP ^7.4 and PHP 8)
> Working with **Contao 4.9** and up to **Contao 4.13** (PHP ^7.4 and PHP 8)
---

Expand Down
7 changes: 4 additions & 3 deletions src/Resources/contao/forms/FormPageSwitch.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Contao\FilesModel;
use Contao\System;
use Contao\Widget;
use Patchwork\Utf8;

/**
* Class FormSubmit
Expand Down Expand Up @@ -60,10 +59,12 @@ public function validator($input)
*/
public function parse($arrAttributes=null)
{
if (TL_MODE == 'BE')
$request = System::getContainer()->get('request_stack')->getCurrentRequest();

if ($request && System::getContainer()->get('contao.routing.scope_matcher')->isBackendRequest($request))
{
$objTemplate = new BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### ' . Utf8::strtoupper($GLOBALS['TL_LANG']['FFL']['pageSwitch'][0]) . ' :: ' . $this->label . ' ###' . ($this->addCondition ? ' (' . $this->condition . ')' : '');
$objTemplate->wildcard = '### ' . mb_strtoupper($GLOBALS['TL_LANG']['FFL']['pageSwitch'][0], 'UTF-8') . ' :: ' . $this->label . ' ###' . ($this->addCondition ? ' (' . $this->condition . ')' : '');

return $objTemplate->parse();
}
Expand Down

0 comments on commit 77000e1

Please sign in to comment.