Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
elouanjef committed Jan 27, 2024
1 parent 50efa6f commit f6bd9d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
18 changes: 6 additions & 12 deletions templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ <h1 class="text-left">Liste des VMs actives</h1>
</div>

<div class="tab-pane" id="rubrique2">
<div class="card" id="addUserCard" style="width: 18rem;">
<div class="card-body bg-info text-white">
<h5 class="card-title text-center">Créer</h5>
<p class="card-text" style="font-size: 36px; text-align: center;"><b>+</b></p>
</div>
</div>
<h1 class="text-left">Comptes utilisateurs</h1>
<div class="mt-4">
<table class="table" id="users-table">
Expand All @@ -108,9 +102,9 @@ <h1 class="text-left">Comptes utilisateurs</h1>
</table>
<hr>
</div>
<div class="mt-4">
<div id="create-user-div" class="cards d-flex justify-content-start"></div>
</div>
<button id="addUserButton" type="button" class="btn btn-light">
<p>Ajouter un utilisateur <i class="bi bi-plus-circle"></i></p>
</button>
</div>

<div class="tab-pane" id="rubrique3">
Expand Down Expand Up @@ -267,7 +261,7 @@ <h1 class="text-left">Templates de VMs</h1>
row.append('<td>' + user.last_name + '</td>');
row.append('<td>' + user.email + '</td>');

var changePasswordButton = $('<button>').text('Changer le mot de passe')
var changePasswordButton = $('<button>').addClass("btn btn-light").text('Changer le mot de passe')
.attr('data-toggle', 'modal')
.attr('data-target', '#editUserModal')
.attr('data-user-id', user.id);
Expand All @@ -279,7 +273,7 @@ <h1 class="text-left">Templates de VMs</h1>

row.append($('<td>').append(changePasswordButton));

var deleteUserButton = $('<button>').text('Supprimer l\'utilisateur').click(function() {
var deleteUserButton = $('<button>').addClass("btn btn-light").text('Supprimer l\'utilisateur').click(function() {
deleteUser(user.id);
});
row.append($('<td>').append(deleteUserButton));
Expand Down Expand Up @@ -357,7 +351,7 @@ <h1 class="text-left">Templates de VMs</h1>
$('#addVMOutCard').on('click', function () {
$("#createVmModal").modal("show");
});
$('#addUserCard').on('click', function () {
$('#addUserButton').on('click', function () {
$("#createUserModal").modal("show");
});
});
Expand Down
5 changes: 5 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ <h5 class="modal-title" id="alertModalLabel"></h5>
margin: 20px;
}

.card {
margin-left: 20px;
margin-right: 20px;
}

body {
background-color: #343A40;
color: white;
Expand Down

0 comments on commit f6bd9d8

Please sign in to comment.