Skip to content

Commit

Permalink
used functions in textareaViewhelper must distinguish typo3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Bigga committed Feb 19, 2018
1 parent 75de710 commit 560ba03
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Classes/ViewHelpers/Form/TextareaViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,20 @@ public function render()
$required = $this->arguments['required'];
$name = $this->getName();
$this->registerFieldNameForFormTokenGeneration($name);
$this->setRespectSubmittedDataValue(true);
if (version_compare(TYPO3_version, '7.6.0', '>=')) {
$this->setRespectSubmittedDataValue(true);
}

$this->tag->forceClosingTag(true);
$this->tag->addAttribute('name', $name);
if ($required === "required") {
$this->tag->addAttribute('required', 'required');
}
$this->tag->setContent(htmlspecialchars($this->getValueAttribute()));
if (version_compare(TYPO3_version, '7.6.0', '>=')) {
$this->tag->setContent(htmlspecialchars($this->getValueAttribute()));
} else {
$this->tag->setContent(htmlspecialchars($this->getValue()));
}
$this->addAdditionalIdentityPropertiesIfNeeded();
$this->setErrorClassAttribute();

Expand Down

0 comments on commit 560ba03

Please sign in to comment.