mirror of
https://github.com/humhub/humhub.git
synced 2025-04-22 08:03:35 +02:00
* #6061 - Administration: Add a confirmation on profile field delete button * Update ProfileCest.php Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
parent
d4990e5869
commit
108161a75a
@ -12,3 +12,4 @@ HumHub Changelog (DEVELOP)
|
||||
- Enh #6031: On users list grid, show Auth mode badge only for sys admins
|
||||
- Enh #6035: Added Estonian language
|
||||
- Fix #5956: Display all newer comments after current comment
|
||||
- Enh #6061: Administration: Add a confirmation on profile field delete button
|
||||
|
@ -195,9 +195,9 @@ class HForm extends \yii\base\Component
|
||||
{
|
||||
$output = "";
|
||||
foreach ($buttons as $buttonName => $definition) {
|
||||
$definition['isVisible'] = isset($definition['isVisible']) ? $definition['isVisible'] : true;
|
||||
if ($definition['type'] == 'submit' && $definition['isVisible']) {
|
||||
$output .= \yii\helpers\Html::submitButton($definition['label'], ['name' => $buttonName, 'class' => $definition['class'], 'data-ui-loader' => '']);
|
||||
$isVisible = $definition['isVisible'] ?? true;
|
||||
if ($definition['type'] == 'submit' && $isVisible) {
|
||||
$output .= \yii\helpers\Html::submitButton($definition['label'], array_merge(['name' => $buttonName, 'class' => $definition['class'], 'data-ui-loader' => ''], $definition['options'] ?? []));
|
||||
$output .= " ";
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,8 @@ class UserProfileController extends Controller
|
||||
$definition['buttons']['delete'] = [
|
||||
'type' => 'submit',
|
||||
'label' => Yii::t('AdminModule.user', 'Delete'),
|
||||
'class' => 'btn btn-danger pull-right'
|
||||
'class' => 'btn btn-danger pull-right',
|
||||
'options' => ['data-action-confirm' => ''],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -199,6 +199,8 @@ class ProfileCest
|
||||
$I->jsClick('.tab-pane.active tr[data-key=0] td:last-child a');
|
||||
$I->waitForText('Edit profile field');
|
||||
$I->click('Delete');
|
||||
$I->waitForText('Confirm');
|
||||
$I->click('Confirm');
|
||||
$I->seeSuccess('Deleted');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user