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

Commit

Permalink
The register button is now disabled if the perm is full
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy Roncin committed Aug 30, 2023
1 parent b77ac13 commit fc5daf8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/views/dashboard/perms/shotgun.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
<tr class="align-middle">
<td>
<form action="{{ url('dashboard/perm/'.($perm->isAlreadyIn ? 'unshotgun' : 'shotgun').'/'.$perm->id.'?day='.$day) }}" method="post">
<button class="btn btn-xl {{ $perm->isAlreadyIn ? 'btn-danger' : 'btn-success' }}" {{ $perm->isOpen ? '' : 'disabled' }} type="submit">{{ $perm->isAlreadyIn ? 'Quitter' : "S'inscrire" }}</button>
<button class="btn btn-xl {{ $perm->isAlreadyIn ? 'btn-danger' : 'btn-success' }}"
{{ !$perm->isOpen || ($perm->permanenciers->count() >= $perm->nbr_permanenciers && !$perm->isAlreadyIn) ? 'disabled' : '' }}
type="submit">
{{ $perm->isAlreadyIn ? 'Quitter' : "S'inscrire" }}
</button>
</form>
</td>
<td>{{ $perm->type->name }}</td>
Expand Down

0 comments on commit fc5daf8

Please sign in to comment.