Skip to content

Commit 3418572

Browse files
committed
feat: update system mail terminology from 'New Password' to 'Login Data'
1 parent 9733e94 commit 3418572

File tree

9 files changed

+14
-13
lines changed

9 files changed

+14
-13
lines changed

demo_data/data.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,13 +1191,13 @@ INSERT INTO %PREFIX%_sessions (ses_id, ses_usr_id, ses_org_id, ses_session_id, s
11911191
INSERT INTO %PREFIX%_texts (txt_id, txt_org_id, txt_name, txt_text) VALUES
11921192
(1, 1, 'SYSMAIL_REGISTRATION_APPROVED', 'SYS_SYSMAIL_REGISTRATION_USER'),
11931193
(2, 1, 'SYSMAIL_REGISTRATION_NEW', 'SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR'),
1194-
(3, 1, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_NEW_PASSWORD'),
1194+
(3, 1, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_LOGIN_DATA'),
11951195
(4, 1, 'SYSMAIL_PASSWORD_RESET', 'SYS_SYSMAIL_PASSWORD_RESET'),
11961196
(5, 1, 'SYSMAIL_REGISTRATION_REFUSED', 'SYS_SYSMAIL_REFUSE_REGISTRATION'),
11971197
(6, 1, 'SYSMAIL_REGISTRATION_CONFIRMATION', 'SYS_SYSMAIL_REGISTRATION_CONFIRMATION'),
11981198
(101, 2, 'SYSMAIL_REGISTRATION_APPROVED', 'SYS_SYSMAIL_REGISTRATION_USER'),
11991199
(102, 2, 'SYSMAIL_REGISTRATION_NEW', 'SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR'),
1200-
(103, 2, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_NEW_PASSWORD'),
1200+
(103, 2, 'SYSMAIL_NEW_PASSWORD', 'SYS_SYSMAIL_LOGIN_DATA'),
12011201
(104, 2, 'SYSMAIL_PASSWORD_RESET', 'SYS_SYSMAIL_PASSWORD_RESET'),
12021202
(105, 2, 'SYSMAIL_REGISTRATION_REFUSED', 'SYS_SYSMAIL_REFUSE_REGISTRATION'),
12031203
(106, 2, 'SYSMAIL_REGISTRATION_CONFIRMATION', 'SYS_SYSMAIL_REGISTRATION_CONFIRMATION');

install/db_scripts/update_5_0.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ WHERE usf_fn.usf_name_intern = 'FIRST_NAME' AND usf_ln.usf_name_intern = 'LAST_N
501501
DEFAULT character SET = utf8
502502
COLLATE = utf8_unicode_ci;</step>
503503
<step id="1670">ALTER TABLE %PREFIX%_inventory_field_select_options
504-
ADD CONSTRAINT %PREFIX%_fk_ifo_inf FOREIGN KEY (ifo_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE CASCADE ON UPDATE RESTRICT;</step>
504+
ADD CONSTRAINT %PREFIX%_fk_ifo_inf FOREIGN KEY (ifo_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE CASCADE ON UPDATE RESTRICT;</step>
505+
<step id="1680">UPDATE %PREFIX%_texts SET txt_name = 'SYSMAIL_LOGIN_DATA' WHERE txt_name = 'SYSMAIL_NEW_PASSWORD'</step>
505506
<step>stop</step>
506507
</update>

languages/en.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
<string name="ORG_REGISTERED_USERS">Logged in user</string>
179179
<string name="ORG_SEARCH_SIMILAR_NAMES">Search for similar names</string>
180180
<string name="ORG_SEARCH_SIMILAR_NAMES_DESC">At registration and assigning registrations Admidio is searching for similar surnames and first names in order to avoid double entries. Deactivation results search for identical names only. (default: yes)</string>
181-
<string name="ORG_SEND_NEW_PASSWORD">Send new password</string>
181+
<string name="ORG_SEND_LOGIN_DATA">Send login data</string>
182182
<string name="ORG_SHOW_CREATE_EDIT">Show creator and timestamp of creation</string>
183183
<string name="ORG_SHOW_CREATE_EDIT_DESC">In some places the creator and the user with the last change to a record is displayed together with a timestamp. This setting can be used to determine whether this information is displayed at all and whether the user should be displayed with the user name or with their first and last name.</string>
184184
<string name="ORG_TIME_FORMAT">Time format</string>
@@ -1597,7 +1597,7 @@
15971597
<string name="SYS_SWITCH_TO_RELATIONSHIP_CONFIGURATION">Switch to relationship configuration</string>
15981598
<string name="SYS_SWITCH_TO_ROOM_MANAGEMENT">Switch to room management</string>
15991599
<string name="SYS_SYMMETRICAL">Symmetrical</string>
1600-
<string name="SYS_SYSMAIL_NEW_PASSWORD">#subject# Login data for #organization_long_name#\n#content# Hello #user_first_name#,\n\nYou receive your login data for the website #organization_homepage#.\nUsername: #user_login_name#\nPassword: #variable1#\n\nThe password was generated automatically,\nYou should change it after logging in to #organization_homepage# in your profile.\n\nRegards,\nThe team of #organization_long_name#</string>
1600+
<string name="SYS_SYSMAIL_LOGIN_DATA">#subject# Login data for #organization_long_name#\n#content# Hello #user_first_name#,\n\nYou receive your login data for the website #organization_homepage#.\nUsername: #user_login_name#\nPassword: #variable1#\n\nThe password was generated automatically,\nYou should change it after logging in to #organization_homepage# in your profile.\n\nRegards,\nThe team of #organization_long_name#</string>
16011601
<string name="SYS_SYSMAIL_PASSWORD_RESET">#subject# Reset password for #organization_long_name#\n#content# Hello #user_first_name#,\n\nWe have received a request to reset your password on #organization_homepage#.\n\nIf the request came from you, you can use the following link to reset your password and set a new one: \n#variable1#\n\nRegards,\nThe team of #organization_long_name#</string>
16021602
<string name="SYS_SYSMAIL_REFUSE_REGISTRATION">#subject# in registration at #organization_long_name# rejected.\n#content#Hello #user_first_name#,\n\nyour registration at #organization_homepage# was rejected.\n\nRegistrations are accepted in general by our users. If you are a member and your registration was still rejected, it may be because you were not identified as member.\nTo clarify the reasons for the rejection please contact the administrator #administrator_email# from #organization_homepage#.\n\nRegards,\nThe team of #organization_long_name#</string>
16031603
<string name="SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR">#subject# New registration at #organization_long_name# website\n#content# A new user has registered on #organization_homepage#.\n\nSurname: #user_last_name#\nFirst Name: #user_first_name#\nE-Mail: #user_email#\n\n\nThis message was generated automatically.</string>

modules/profile/profile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function formSubmitEvent(rolesAreaId = "") {
299299
$value = '<a class="btn btn-secondary admidio-messagebox" href="javascript:void(0)" data-buttons="yes-no"
300300
data-message="' . $gL10n->get('SYS_SEND_NEW_LOGIN', array($user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'))) . '"
301301
data-href="callUrlHideElement(\'no_element\', \'' . SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_MODULES . '/contacts/contacts_function.php', array('mode' => 'send_login', 'user_uuid' => $getUserUuid)) . '\', \'' . $gCurrentSession->getCsrfToken() . '\')">' .
302-
'<i class="bi bi-key-fill"></i>' . $gL10n->get('ORG_SEND_NEW_PASSWORD') . '</a>';
302+
'<i class="bi bi-key-fill"></i>' . $gL10n->get('ORG_SEND_LOGIN_DATA') . '</a>';
303303
} else {
304304
// if user has no email or send email is disabled then administrator could set a new password
305305
$value = '<a class="btn btn-secondary openPopup" href="javascript:void(0)" data-href="' . SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_MODULES . '/profile/password.php', array('user_uuid' => $getUserUuid)) . '">' .

src/Infrastructure/Entity/Text.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function readableName(): string
9898
'SYSMAIL_REGISTRATION_NEW' => 'SYS_NOTIFICATION_NEW_REGISTRATION',
9999
'SYSMAIL_REGISTRATION_APPROVED' => 'SYS_NOTIFICATION_REGISTRATION_APPROVAL',
100100
'SYSMAIL_REGISTRATION_REFUSED' => 'ORG_REFUSE_REGISTRATION',
101-
'SYSMAIL_NEW_PASSWORD' => 'ORG_SEND_NEW_PASSWORD',
101+
'SYSMAIL_LOGIN_DATA' => 'ORG_SEND_LOGIN_DATA',
102102
'SYSMAIL_PASSWORD_RESET' => 'SYS_PASSWORD_FORGOTTEN',
103103
);
104104
// $textLabel = Language::translateIfTranslationStrId($textLabels[$row['name']]);

src/Organizations/Entity/Organization.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function createBasicData(int $userId)
140140
'SYSMAIL_REGISTRATION_NEW' => $gL10n->get('SYS_SYSMAIL_REGISTRATION_ADMINISTRATOR'),
141141
'SYSMAIL_REGISTRATION_APPROVED' => $gL10n->get('SYS_SYSMAIL_REGISTRATION_USER'),
142142
'SYSMAIL_REGISTRATION_REFUSED' => $gL10n->get('SYS_SYSMAIL_REFUSE_REGISTRATION'),
143-
'SYSMAIL_NEW_PASSWORD' => $gL10n->get('SYS_SYSMAIL_NEW_PASSWORD'),
143+
'SYSMAIL_LOGIN_DATA' => $gL10n->get('SYS_SYSMAIL_LOGIN_DATA'),
144144
'SYSMAIL_PASSWORD_RESET' => $gL10n->get('SYS_SYSMAIL_PASSWORD_RESET')
145145
);
146146
$text = new Text($this->db);

src/UI/Presenter/PreferencesPresenter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,11 +2495,11 @@ public function createSystemNotificationsForm(): string
24952495
$formSystemNotifications->addMultilineTextInput('SYSMAIL_REGISTRATION_APPROVED', $gL10n->get('SYS_NOTIFICATION_REGISTRATION_APPROVAL'), $text->getValue('txt_text'), 7);
24962496
$text->readDataByColumns(array('txt_name' => 'SYSMAIL_REGISTRATION_REFUSED', 'txt_org_id' => $gCurrentOrgId));
24972497
$formSystemNotifications->addMultilineTextInput('SYSMAIL_REGISTRATION_REFUSED', $gL10n->get('ORG_REFUSE_REGISTRATION'), $text->getValue('txt_text'), 7);
2498-
$text->readDataByColumns(array('txt_name' => 'SYSMAIL_NEW_PASSWORD', 'txt_org_id' => $gCurrentOrgId));
2498+
$text->readDataByColumns(array('txt_name' => 'SYSMAIL_LOGIN_DATA', 'txt_org_id' => $gCurrentOrgId));
24992499
$htmlDesc = $gL10n->get('ORG_ADDITIONAL_VARIABLES') . ':<br /><strong>#variable1#</strong> - ' . $gL10n->get('ORG_VARIABLE_NEW_PASSWORD');
25002500
$formSystemNotifications->addMultilineTextInput(
2501-
'SYSMAIL_NEW_PASSWORD',
2502-
$gL10n->get('ORG_SEND_NEW_PASSWORD'),
2501+
'SYSMAIL_LOGIN_DATA',
2502+
$gL10n->get('ORG_SEND_LOGIN_DATA'),
25032503
$text->getValue('txt_text'),
25042504
7,
25052505
array('helpTextId' => $htmlDesc)

src/Users/Entity/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ public function sendNewPassword()
19461946
$sysMail = new SystemMail($this->db);
19471947
$sysMail->addRecipientsByUser($this->getValue('usr_uuid'));
19481948
$sysMail->setVariable(1, $password);
1949-
$sysMail->sendSystemMail('SYSMAIL_NEW_PASSWORD', $this);
1949+
$sysMail->sendSystemMail('SYSMAIL_LOGIN_DATA', $this);
19501950
} else {
19511951
throw new Exception('SYS_NO_RIGHTS');
19521952
}

themes/simple/templates/preferences/preferences.system-notifications.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_REGISTRATION_NEW']}
3232
{include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_REGISTRATION_APPROVED']}
3333
{include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_REGISTRATION_REFUSED']}
34-
{include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_NEW_PASSWORD']}
34+
{include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_LOGIN_DATA']}
3535
{include 'sys-template-parts/form.multiline.tpl' data=$elements['SYSMAIL_PASSWORD_RESET']}
3636
{include 'sys-template-parts/form.button.tpl' data=$elements['adm_button_save_system_notification']}
3737
<div class="form-alert" style="display: none;">&nbsp;</div>

0 commit comments

Comments
 (0)