Handle multiple mail values

This commit is contained in:
Chris Mann 2023-07-27 22:25:29 +02:00
parent e6f908389f
commit 708385c334

View file

@ -21,7 +21,13 @@
<div class="form-row">
<div class="form-group col-md-12">
<label>Identifiant:</label>
<pre>{{ .Login.Status.Info.Username }}</pre>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label>Courriels existants gérés par Les GV:</label>
{{range $index, $email := .Data.MailValues }}
<form method="POST" class="mt-4" enctype="multipart/form-data" action="/user/mail">
<input type="email" name="email" value="{{$email}}" required>
@ -30,20 +36,19 @@
<input type="hidden" name="index" value="{{$index}}">
</form>
{{end}}
<br>
</div>
<div class="form-group col-md-6">
<form method="POST" class="mt-4" enctype="multipart/form-data" action="/user/mail">
<label>Ajouter un courriel sous un domaine géré par Les GV :</label>
<input type="email" name="email" required>
<input type="hidden" name="action" value="Add">
<input type="submit" name="add" value="Add">
</div>
</div>
<form method="POST" class="mt-4" enctype="multipart/form-data">
<div class="form-row">
<div class="form-group col-md-6">
<label>Identifiant:</label>
<input type="text" disabled="true" class="form-control" value="{{ .Login.Status.Info.Username }}" />
</div>
<input type="hidden" disabled="true" class="form-control" value="{{ .Login.Status.Info.Username }}" />
<div class="form-group col-md-6">
<label for="mail">Adresse e-mail:</label>
<input type="text" id="mail" disabled="true" name="mail" class="form-control" value="{{ .Data.Mail }}" />