Skip to content

Commit

Permalink
fix: Use form validation instead of custom disable
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Feb 20, 2024
1 parent 40ca3ed commit 15e4093
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions website/web/templates/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -848,12 +848,12 @@ <h5 class="modal-title" id="monitorModalLabel">Monitor capture</h5>
<input type="email" class="form-control" name="notification" id="notification" placeholder="Email address to receive the notification">
</div>
<div class="mb-3 form-check">
<input class="form-check-input" type="checkbox" name="confirm" onchange="document.getElementById('btn-notification-monitoring').disabled = !this.checked;"></input>
<label for="force_push" class="form-check-label">{{ confirm_message }}</label>
<input class="form-check-input" type="checkbox" name="confirm" id="monitoring_toc" required >
<label for="monitoring_toc" class="form-check-label">{{ confirm_message }}</label>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success" id="btn-notification-monitoring" disabled=true>Send to monitoring</button>
<button type="submit" class="btn btn-success" id="btn-notification-monitoring">Send to monitoring</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
Expand Down Expand Up @@ -887,12 +887,12 @@ <h5 class="modal-title" id="emailModalLabel">Notify by email</h5>
<textarea class="form-control" name="comment" id=comment rows="3"></textarea>
</div>
<div class="mb-3 form-check">
<input class="form-check-input" type="checkbox" name="confirm" onchange="document.getElementById('btn-notification-report').disabled = !this.checked;"></input>
<label for="force_push" class="form-check-label">{{ confirm_message }}</label>
<input class="form-check-input" type="checkbox" name="confirm" id="mail_notification_toc" required>
<label for="mail_notification_toc" class="form-check-label">{{ confirm_message }}</label>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success" id="btn-notification-report" disabled=true>Send email</button>
<button type="submit" class="btn btn-success" id="btn-notification-report">Send email</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
Expand Down

0 comments on commit 15e4093

Please sign in to comment.