mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-10 09:32:05 +01:00
This commit is contained in:
@@ -1186,6 +1186,10 @@ app.controller('listEmails', function ($scope, $http) {
|
||||
|
||||
};
|
||||
|
||||
$scope.confirmDeleteEmail = function (email) {
|
||||
$scope.emailToDelete = email;
|
||||
};
|
||||
|
||||
$scope.deleteEmailAccountFinal = function (email) {
|
||||
|
||||
$scope.cyberpanelLoading = true; // Show loading while deleting
|
||||
|
||||
@@ -642,10 +642,12 @@
|
||||
<i class="fas fa-key"></i>
|
||||
<span>{% trans 'Change Password' %}</span>
|
||||
</a>
|
||||
<a ng-click="deleteEmailAccountFinal(record.email)"
|
||||
<a ng-click="confirmDeleteEmail(record.email)"
|
||||
class="btn-danger"
|
||||
href="#"
|
||||
title="">
|
||||
title=""
|
||||
data-toggle="modal"
|
||||
data-target="#deleteConfirmModal">
|
||||
<i class="fas fa-trash"></i>
|
||||
<span>{% trans 'Delete' %}</span>
|
||||
</a>
|
||||
@@ -708,6 +710,45 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Confirmation Modal -->
|
||||
<div id="deleteConfirmModal" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<i class="fas fa-exclamation-triangle" style="color: #ef4444;"></i>
|
||||
{% trans "Confirm Email Deletion" %}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
<div>
|
||||
<strong>{% trans "Warning: This action cannot be undone!" %}</strong>
|
||||
<p style="margin: 0.5rem 0 0 0;">{% trans "This will permanently delete the email account and all associated data including emails, folders, and settings." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>{% trans "Email to delete:" %}</strong> <span style="color: #ef4444; font-weight: 600;">{$ emailToDelete $}</span></p>
|
||||
<p>{% trans "Are you sure you want to continue?" %}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button"
|
||||
class="btn btn-danger"
|
||||
ng-click="deleteEmailAccountFinal(emailToDelete)"
|
||||
data-dismiss="modal">
|
||||
<i class="fas fa-trash"></i>
|
||||
{% trans "Yes, Delete Email" %}
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
<i class="fas fa-times"></i>
|
||||
{% trans "Cancel" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user