Skip to content

Commit

Permalink
Fix message on decline multiple users (#5683)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed May 5, 2022
1 parent 60f841b commit 513e0e7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@ HumHub Changelog
- Fix #5660: Individual modules marked with "Official" label in Marketplace
- Fix #5657: Fix links of user counters in container headers
- Fix #5676: Use 404 page for deleted content request
- Fix #5679: Fix message on decline multiple users


1.11.1 (April 22, 2022)
Expand Down
Expand Up @@ -28,7 +28,7 @@ class ApprovalController extends Controller
public $adminOnly = false;

public const ACTION_APPROVE = 'approve';
public const ACTION_DELINE = 'decline';
public const ACTION_DECLINE = 'decline';

public const USER_SETTINGS_SCREEN_KEY = 'admin_approval_screen_profile_fields_id';

Expand Down Expand Up @@ -191,7 +191,7 @@ public function actionBulkActions()
if ($action === self::ACTION_APPROVE && $model->bulkApprove()) {
$this->view->success(Yii::t('AdminModule.user', 'The registrations were approved and the users were notified by email.'));
return $this->redirect(['index']);
} elseif ($action === self::ACTION_DELINE && $model->bulkDecline()) {
} elseif ($action === self::ACTION_DECLINE && $model->bulkDecline()) {
$this->view->success(Yii::t('AdminModule.user', 'The registrations were declined and the users were notified by email.'));
return $this->redirect(['index']);
} else {
Expand Down
Expand Up @@ -213,7 +213,7 @@ public function bulkDecline()

foreach ($this->users as $user) {
$this->user = $user;
$this->setApprovalDefaults();
$this->setDeclineDefaults();
$this->decline();
}

Expand Down
2 changes: 1 addition & 1 deletion protected/humhub/modules/admin/views/approval/index.php
Expand Up @@ -123,7 +123,7 @@
});
$('.bulk-actions-button-decline').on('click', function () {
$('#admin-approval-form').find("input[name='action']").remove();
$('#admin-approval-form').append('<input type="hidden" name="action" value="<?= ApprovalController::ACTION_DELINE ?>" />');
$('#admin-approval-form').append('<input type="hidden" name="action" value="<?= ApprovalController::ACTION_DECLINE ?>" />');
//$('#admin-approval-form').submit();
});

Expand Down

0 comments on commit 513e0e7

Please sign in to comment.