Skip to content
Snippets Groups Projects
Commit 796233dd authored by Philipp Schüttlöffel's avatar Philipp Schüttlöffel Committed by Jan-Hendrik Willms
Browse files

Resolve "Persönliche Angaben: Text sollte konfigurierbar sein"

Closes #2582

Merge request studip/studip!1781
parent b57422a8
No related branches found
No related tags found
No related merge requests found
Pipeline #12434 passed
...@@ -8,8 +8,7 @@ $genders = [ ...@@ -8,8 +8,7 @@ $genders = [
?> ?>
<? if ($user->auth_plugin !== 'standard'): ?> <? if ($user->auth_plugin !== 'standard'): ?>
<?= MessageBox::info(sprintf(_('Einige Ihrer persönlichen Daten werden nicht in Stud.IP verwaltet ' <?= MessageBox::info(Config::get()->PERSONAL_DETAILS_INFO_TEXT) ?>
. 'und können daher hier nicht geändert werden.'))) ?>
<? endif; ?> <? endif; ?>
<? if ($locked_info): ?> <? if ($locked_info): ?>
......
<?php
class AddPersonalDetailsInfoTextConfig extends Migration
{
public function description()
{
return 'Adds the configuration PERSONAL_DETAILS_INFO_TEXT, if it doesn\'t exist yet. Also adds english translation.';
}
protected function up()
{
$db = DBManager::get();
$db->exec(
"INSERT IGNORE INTO `config`
(`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`)
VALUES
(
'PERSONAL_DETAILS_INFO_TEXT', 'Einige Ihrer persönlichen Daten werden nicht in Stud.IP verwaltet und können daher hier nicht geändert werden.',
'i18n', 'global', 'global', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(),
'Der Infotext der unter Profil->Persönliche Angaben->Grunddaten angezeigt wird, wenn man nicht die Standard-Auth nutzt.'
)"
);
$db->execute(
"INSERT IGNORE INTO `i18n`
(`object_id`, `table`, `field`, `lang`, `value`)
VALUES
(
MD5('PERSONAL_DETAILS_INFO_TEXT'), 'config', 'value', 'en_GB',
'Some of your personal data is not managed in Stud.IP and therefore cannot be changed here.'
)"
);
}
protected function down()
{
$db = DBManager::get();
$db->exec("DELETE FROM `config_values` WHERE `field` = 'PERSONAL_DETAILS_INFO_TEXT'");
$db->exec("DELETE FROM `config` WHERE `field` = 'PERSONAL_DETAILS_INFO_TEXT'");
$db->exec("DELETE FROM `i18n` WHERE `object_id` = MD5('PERSONAL_DETAILS_INFO_TEXT') AND `table` = 'config' AND `field` = 'value'");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment