-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enh #6335: Pending approvals: possibility to send a message #6365
Conversation
@funkycram Thanks! |
protected/humhub/modules/user/tests/codeception/unit/ApproveUserFormTest.php
Outdated
Show resolved
Hide resolved
@yurabakhtin Do you know why checks are not running again now? |
@funkycram Maybe because conflicts should be fixed. Can you do this or do you need a help from me? |
Thanks. Yes. |
@yurabakhtin I think checks are OK now (except the No I've pushed the change on Thanks for your help! Tests are new for me, I need to take some time to learn this part, sorry for that. |
@luke- I think checks are OK now, except the ApproveUserFormTest::testSendMessageIsSentInUserLanguage() because we first need german translation for it to work. |
|
Thanks @yurabakhtin ! I'll know it for next time! |
@yurabakhtin Test are failing for the same reason, because we first need to have german translation: But it seems ok for the rest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Semir1212 Can you please review the new text messages?
protected/humhub/modules/admin/controllers/ApprovalController.php
Outdated
Show resolved
Hide resolved
protected/humhub/modules/admin/models/forms/AuthenticationSettingsForm.php
Show resolved
Hide resolved
@Semir1212 when you have time to these texts (see above). Thanks! |
@yurabakhtin I think everything is resolved here. Do you approve this PR? Thanks. |
@marc-farre yes, I already approved this PR. |
PR Summary
|
@yurabakhtin can you help me to resolve these 2 problems? 1/ This pull request will merge automatically when all requirements are met. Everything is resolved. 2/ Some checks were not successful PHP 7.4: I don't see why we check this PHP version as it's not supported anymore since 1.15 PHP 8.1: https://github.com/humhub/humhub/actions/runs/7266895756/job/19799580071?pr=6365 The problem seams to be Thanks for your help! |
I think @luke- should approve the changes.
You are right, you can remove this line https://github.com/humhub/humhub/blob/master/.github/workflows/php-test.yml#L39:
I don't see there the error, I see only these:
Can you fix the tests, or do need my help there? |
…humhub/humhub into enh/6335-pending-approvals-send-message
Thanks @yurabakhtin The problem is here: humhub/protected/humhub/modules/user/tests/codeception/unit/ApproveUserFormTest.php Lines 48 to 49 in d1e7162
So I tried to manually add the translation here: 112048b#diff-6671c06c2f3ff265f9083ff45a2a8e3b158ca99492618f2cba2c53b51879710eR126-R127 But the problem remains. |
@marc-farre I have compared the string and I see your translated and original strings have no I have tested locally with deleted |
@yurabakhtin Thanks, indeed. I've added the 2 lines, and now checks seams to be OK.
@luke- Could you approve the changes? They are all resolved. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marc-farre Thanks looks file. Can you please try to remove the de
message file from commit?
@Semir1212 Can you please take a look into the messages?
@@ -1,89 +1,89 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert changes to this file? Could cause problems with the Translation Site
$model->setSendMessageDefaults(); | ||
if ($model->load(Yii::$app->request->post())) { | ||
if ($model->sendMessage()) { | ||
$this->view->success(Yii::t('AdminModule.user', 'The message has been sent by email.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Semir1212 Can you please check the message here?
$this->view->success(Yii::t('AdminModule.user', 'The message has been sent by email.')); | ||
return $this->redirect(['index']); | ||
} | ||
$this->view->error(Yii::t('AdminModule.user', 'Could not send the message to the user!')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Semir1212 Can you please check the message here?
@@ -194,15 +219,22 @@ public function actionBulkActions() | |||
|
|||
$model = new ApproveUserForm($usersId); | |||
|
|||
if ($action === self::ACTION_SEND_MESSAGE && $model->bulkSendMessage()) { | |||
$this->view->success(Yii::t('AdminModule.user', 'The users were notified by email.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Semir1212 Can you please check the message here?
@luke- If I remove it, then tests fails, because of humhub/protected/humhub/modules/user/tests/codeception/unit/ApproveUserFormTest.php Lines 46 to 52 in d1e7162
|
Ok then I'll try to merge |
Enh #6335: Pending approvals: possibility to send a message
#6335
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
develop
branch, not themaster
branch if no hotfixFix #xxx[,#xxx]
, where "xxx" is the Github issue number)If adding a new feature, the PR's description includes:
Other information: