Handle multiple mail values

This commit is contained in:
Chris Mann 2023-07-27 22:06:18 +02:00
parent 4c660cad12
commit b3cc2ecd45

View file

@ -18,20 +18,24 @@
Profil enregistré. Profil enregistré.
</div> </div>
{{end}} {{end}}
<form method="POST" class="mt-4" enctype="multipart/form-data" action="/user/mail">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
{{range $index, $email := .Data.MailValues }} <form method="POST" class="mt-4" enctype="multipart/form-data" action="/user/mail">
{{range $index, $email := .Data.MailValues }}
<input type="email" name="email" value="{{$email}}" required> <input type="email" name="email" value="{{$email}}" required>
<input type="submit" name="delete" value="Delete"> <input type="submit" name="delete" value="Delete">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="index" value="{{$index}}"> <input type="hidden" name="index" value="{{$index}}">
<br>
{{end}} {{end}}
<input type="email" name="email" required> </form>
<br>
<form method="POST" class="mt-4" enctype="multipart/form-data" action="/user/mail">
<input type="email" name="email" required>
<input type="hidden" name="action" value="add">
<input type="submit" name="add" value="Add"> <input type="submit" name="add" value="Add">
</div> </div>
</div> </div>
</form>
<form method="POST" class="mt-4" enctype="multipart/form-data"> <form method="POST" class="mt-4" enctype="multipart/form-data">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">