Skip to content
Snippets Groups Projects
Commit 21a9e665 authored by André Noack's avatar André Noack Committed by Jan-Hendrik Willms
Browse files

Resolve "Login FAQ ist nicht übersetzbar"

Closes #3780

Merge request studip/studip!2653
parent 4c813f2b
No related branches found
No related tags found
No related merge requests found
...@@ -177,8 +177,8 @@ class Admin_LoginStyleController extends AuthenticatedController ...@@ -177,8 +177,8 @@ class Admin_LoginStyleController extends AuthenticatedController
CSRFProtection::verifyRequest(); CSRFProtection::verifyRequest();
$entry->setData([ $entry->setData([
'title' => trim(Request::get('title')), 'title' => Request::i18n('title'),
'description' => trim(Request::get('description')), 'description' => Request::i18n('description'),
]); ]);
if ($entry->store()) { if ($entry->store()) {
......
...@@ -9,23 +9,25 @@ ...@@ -9,23 +9,25 @@
enctype="multipart/form-data" enctype="multipart/form-data"
class="default"> class="default">
<?= CSRFProtection::tokenTag() ?> <?= CSRFProtection::tokenTag() ?>
<label>
<label class="studiprequired"> <span class="required">
<?= _('Titel') ?> <?= _('Titel') ?>
<span title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true" class="asterisk">*</span> </span>
<input type="text" name="title" value="<?= htmlReady($entry->title) ?>" required> <?= I18N::input('title', $entry->title, ['required' => true]) ?>
</label> </label>
<label> <label>
<span class="studiprequired"> <span class="required">
<?= _('Text') ?> <?= _('Text') ?>
<span title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true" class="asterisk">*</span>
</span> </span>
<textarea name="description" <?= I18N::textarea('description',
class="add_toolbar wysiwyg" data-editor="toolbar=minimal"><?= htmlReady($entry->description)?></textarea> $entry->description,
[
'class' => 'wysiwyg',
'required' => true,
'data-editor' => 'toolbar=small'
]
) ?>
</label> </label>
<div data-dialog-button> <div data-dialog-button>
<?= \Studip\Button::create(_('Speichern')) ?> <?= \Studip\Button::create(_('Speichern')) ?>
</div> </div>
......
...@@ -25,7 +25,8 @@ class LoginFaq extends SimpleORMap ...@@ -25,7 +25,8 @@ class LoginFaq extends SimpleORMap
{ {
$config['db_table'] = 'login_faq'; $config['db_table'] = 'login_faq';
$config['i18n'] = ['title', 'description']; $config['i18n_fields']['title'] = true;
$config['i18n_fields']['description'] = true;
parent::configure($config); parent::configure($config);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment