diff options
| author | André Noack <noack@data-quest.de> | 2024-03-07 11:24:10 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-03-07 11:24:10 +0000 |
| commit | 21a9e665414b4befccf40222c5c0e02f19b055fb (patch) | |
| tree | 87c9a69d45a2826461f0f836fee8094cee411419 | |
| parent | 4c813f2b7ac67211882a8137e18137381b91ce75 (diff) | |
Resolve "Login FAQ ist nicht übersetzbar"
Closes #3780
Merge request studip/studip!2653
| -rw-r--r-- | app/controllers/admin/login_style.php | 4 | ||||
| -rw-r--r-- | app/views/admin/login_style/edit_faq.php | 26 | ||||
| -rw-r--r-- | lib/models/LoginFaq.class.php | 3 |
3 files changed, 18 insertions, 15 deletions
diff --git a/app/controllers/admin/login_style.php b/app/controllers/admin/login_style.php index 615e777..35cd7d8 100644 --- a/app/controllers/admin/login_style.php +++ b/app/controllers/admin/login_style.php @@ -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()) { diff --git a/app/views/admin/login_style/edit_faq.php b/app/views/admin/login_style/edit_faq.php index 066991a..2c35afd 100644 --- a/app/views/admin/login_style/edit_faq.php +++ b/app/views/admin/login_style/edit_faq.php @@ -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> diff --git a/lib/models/LoginFaq.class.php b/lib/models/LoginFaq.class.php index 036f0f7..d6cad40 100644 --- a/lib/models/LoginFaq.class.php +++ b/lib/models/LoginFaq.class.php @@ -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); } |
