Refactor: merge SettingsController into ProfileController
Removed SettingsController and moved its logic into ProfileController, consolidating user profile, account, GDPR, network, and two-factor authentication actions. Updated routes, behaviors, and view files to reflect the new structure. Also updated composer.json to use pcrt/yii2-usuario and pcrt/yii2-select2, added 'surname' to Profile model, and added new attributes to User model. Improved user feedback by redirecting after key actions instead of rendering message views.
This commit is contained in:
50
src/User/resources/views/profile/gdpr-delete.php
Normal file
50
src/User/resources/views/profile/gdpr-delete.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the 2amigos/yii2-usuario project.
|
||||
*
|
||||
* (c) 2amigOS! <http://2amigos.us/>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Html;
|
||||
|
||||
/** @var \Da\User\Form\GdprDeleteForm $model */
|
||||
|
||||
$this->title = Yii::t('usuario', 'Delete personal data');
|
||||
?>
|
||||
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p><?= Yii::t('usuario', 'You are about to delete all your personal data from this site.') ?></p>
|
||||
<p class="text-danger">
|
||||
<?= Yii::t(
|
||||
'usuario',
|
||||
'Once you have deleted your data, you will not longer be able to sign in with this account.'
|
||||
) ?>
|
||||
</p>
|
||||
<hr />
|
||||
<?php
|
||||
$form = ActiveForm::begin([])
|
||||
?>
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<div class="w-75">
|
||||
<?= $form->field($model, 'password')->passwordInput() ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<?= Html::submitButton(Yii::t('usuario', 'Delete'), ['class' => 'btn btn-danger']) ?>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<?= Html::a(Yii::t('usuario', 'Back to privacy settings'), ['/user/profile/privacy'], ['class' => 'btn btn-info']) ?>
|
||||
</div>
|
||||
<?php
|
||||
ActiveForm::end();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user