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
CSRFProtection::verifyRequest();
$entry->setData([
'title' => trim(Request::get('title')),
'description' => trim(Request::get('description')),
'title' => Request::i18n('title'),
'description' => Request::i18n('description'),
]);
if ($entry->store()) {
......
......@@ -9,23 +9,25 @@
enctype="multipart/form-data"
class="default">
<?= CSRFProtection::tokenTag() ?>
<label class="studiprequired">
<?= _('Titel') ?>
<span title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true" class="asterisk">*</span>
<input type="text" name="title" value="<?= htmlReady($entry->title) ?>" required>
<label>
<span class="required">
<?= _('Titel') ?>
</span>
<?= I18N::input('title', $entry->title, ['required' => true]) ?>
</label>
<label>
<span class="studiprequired">
<span class="required">
<?= _('Text') ?>
<span title="<?= _('Dies ist ein Pflichtfeld') ?>" aria-hidden="true" class="asterisk">*</span>
</span>
<textarea name="description"
class="add_toolbar wysiwyg" data-editor="toolbar=minimal"><?= htmlReady($entry->description)?></textarea>
<?= I18N::textarea('description',
$entry->description,
[
'class' => 'wysiwyg',
'required' => true,
'data-editor' => 'toolbar=small'
]
) ?>
</label>
<div data-dialog-button>
<?= \Studip\Button::create(_('Speichern')) ?>
</div>
......
......@@ -25,7 +25,8 @@ class LoginFaq extends SimpleORMap
{
$config['db_table'] = 'login_faq';
$config['i18n'] = ['title', 'description'];
$config['i18n_fields']['title'] = true;
$config['i18n_fields']['description'] = true;
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