1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-22 06:13:57 +02:00

Various minor updates

This commit is contained in:
Ryan Cramer
2020-07-24 14:44:39 -04:00
parent ecb58f988a
commit 380583a92c
5 changed files with 43 additions and 14 deletions

View File

@@ -389,8 +389,8 @@ class InputfieldRepeater extends Inputfield implements InputfieldItemList {
$wrap = $this->wire('modules')->get('InputfieldFieldset');
$wrap->addClass('InputfieldRepeaterItem InputfieldNoFocus');
$wrap->entityEncodeLabel = false;
if(!$isPost) {
$wrap->entityEncodeLabel = false;
$wrap->label =
"<span class='InputfieldRepeaterItemLabel'>" .
$this->entityEncode($this->renderRepeaterLabel($label, ++$cnt, $page)) .

View File

@@ -314,7 +314,9 @@ class LanguageSupport extends WireData implements Module, ConfigurableModule {
/** @var Inputfield $inputfield */
$inputfield = $event->object;
$user = $this->wire('user');
if(!$inputfield->useLanguages) return;
$user = $this->wire()->user;
$userLanguage = $user->language;
if(!$userLanguage) return;
@@ -619,6 +621,9 @@ class LanguageSupport extends WireData implements Module, ConfigurableModule {
}
$inputfield->set('value' . $language->id, $languageValue);
}
// following this hookInputfieldBeforeRender() completes the process after
// Fieldgroup::getPageInputfields() which sets the value attribute of Inputfields
}
$event->return = $inputfield;