Show error on user deletion if not allowed

This commit is contained in:
Johannes Zellner
2020-03-06 12:23:50 -08:00
parent f1e0167e1b
commit d5930fd859
3 changed files with 8 additions and 9 deletions

View File

@@ -75,13 +75,12 @@
<h4 class="modal-title">Delete user {{ userremove.userInfo.username || userremove.userInfo.email }}</h4>
</div>
<div class="modal-body">
After deletion, the user will not be able to access the dashboard or login to any of the apps. Note that any user data inside
the apps is not removed.
<br>
<p class="text-bold text-danger" ng-show="userremove.error">{{ userremove.error }}</p>
<p ng-hide="userremove.error">After deletion, the user will not be able to access the dashboard or login to any of the apps. Note that any user data inside the apps is not removed.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger" ng-click="userremove.submit()" ng-disabled="userremove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="userremove.busy"></i> Delete</button>
<button type="button" class="btn btn-danger" ng-click="userremove.submit()" ng-hide="userremove.error" ng-disabled="userremove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="userremove.busy"></i> Delete</button>
</div>
</div>
</div>