aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin_create.html25
-rw-r--r--templates/admin_mailing.html2
-rw-r--r--templates/admin_mailing_list.html62
-rw-r--r--templates/layout.html2
4 files changed, 71 insertions, 20 deletions
diff --git a/templates/admin_create.html b/templates/admin_create.html
index 9971aaf..1ea6fee 100644
--- a/templates/admin_create.html
+++ b/templates/admin_create.html
@@ -30,33 +30,40 @@
<input type="text" disabled="true" class="form-control" value="{{ .SuperDN }}" />
</div>
-->
+ {{if eq .Template "ml"}}
+ <div class="form-group">
+ <label for="idvalue">Adresse complète de la mailing list :</label>
+ <input type="text" id="idvalue" name="idvalue" class="form-control" value="{{ .IdValue }}" placeholder="example@deuxfleurs.fr" />
+ </div>
+ {{else}}
+ <div class="form-group">
+ <label for="idvalue">Identifiant :</label>
+ <input type="text" id="idvalue" name="idvalue" class="form-control" value="{{ .IdValue }}" />
+ </div>
+ {{end}}
<div class="form-group">
- <label for="idvalue">Identifiant:</label>
- <input type="text" id="idvalue" name="idvalue" class="form-control" value="{{ .IdValue }}" />
- </div>
- <div class="form-group">
- <label for="idtype">Type d'identifiant:</label>
+ <label for="idtype">Type d'identifiant :</label>
<input type="text" {{if .Template}}disabled="disabled"{{end}} id="idtype" name="idtype" class="form-control" value="{{ .IdType }}" />
</div>
{{ if eq .Template "user" }}
<div class="form-group">
- <label for="displayname">Nom:</label>
+ <label for="displayname">Nom :</label>
<input type="text" id="displayname" name="displayname" class="form-control" value="{{ .DisplayName }}" />
</div>
<input type="hidden" name="description" value="" />
{{ else }}
<div class="form-group">
- <label for="description">Description:</label>
+ <label for="description">Description :</label>
<input type="text" id="description" name="description" class="form-control" value="{{ .Description }}" />
</div>
<input type="hidden" name="displayname" value="" />
{{ end }}
<div class="form-group">
- <label for="soc">StructuralObjectClass:</label>
+ <label for="soc">StructuralObjectClass :</label>
<input type="text" {{if .Template}}disabled="disabled"{{end}} id="soc" name="soc" class="form-control" value="{{ .StructuralObjectClass }}" />
</div>
<div class="form-group">
- <label for="oc">ObjectClass:</label>
+ <label for="oc">ObjectClass :</label>
<textarea rows="5" {{if .Template}}disabled="disabled"{{end}} id="oc" name="oc" class="form-control">{{ .ObjectClass }}</textarea>
</div>
<button type="submit" class="btn btn-primary">Créer l'objet</button>
diff --git a/templates/admin_mailing.html b/templates/admin_mailing.html
index d81545f..16bdd61 100644
--- a/templates/admin_mailing.html
+++ b/templates/admin_mailing.html
@@ -4,7 +4,7 @@
<div class="d-flex">
<h4>Mailing lists</h4>
- <a class="ml-auto btn btn-success" href="/admin/create/group/{{.MailingBaseDN}}">Nouvelle mailing list</a>
+ <a class="ml-auto btn btn-success" href="/admin/create/ml/{{.MailingBaseDN}}">Nouvelle mailing list</a>
<a class="ml-4 btn btn-info" href="/">Menu principal</a>
</div>
diff --git a/templates/admin_mailing_list.html b/templates/admin_mailing_list.html
index c5903b6..1b947b2 100644
--- a/templates/admin_mailing_list.html
+++ b/templates/admin_mailing_list.html
@@ -20,6 +20,10 @@
</div>
{{end}}
+{{with $desc := .MailingList.GetAttributeValue "description"}}{{if $desc}}
+ <p class="mt-4">{{$desc}}</p>
+{{end}}{{end}}
+
<table class="table mt-4">
<thead>
<th scope="col">Adresse</th>
@@ -46,16 +50,20 @@
</tr>
{{end}}
{{end}}
+ {{if not .Members}}
+ <tr><td>(aucun abonné)</td></tr>
+ {{end}}
</tbody>
</table>
- <hr class="mt-4" />
- <h5 class="mt-4">Ajouter un destinataire</h5>
- <form method="POST">
- <input type="hidden" name="action" value="add-member" />
- <div class="row mt-4">
- <div class="col-md-3"><strong>Utilisateur existant :</strong>
- </div>
+<hr class="mt-4" />
+<h5 class="mt-4">Ajouter un destinataire</h5>
+
+<div class="container">
+ <form method="POST">
+ <input type="hidden" name="action" value="add-member" />
+ <div class="row mt-4">
+ <div class="col-md-3"><strong>Utilisateur existant :</strong> </div>
<div class="col-md-5">
<input class="form-control" type="text" list="users" name="member" placeholder="Utilisateur..." />
<datalist id="users">
@@ -67,7 +75,43 @@
</datalist>
</div>
<div class="col-md-2">
- <input type="submit" value="Ajouter" class="form-control btn btn-success btn-sm" />
+ <input type="submit" value="Ajouter" class="form-control btn btn-success btn-sm" />
+ </div>
+ </div>
+ </form>
+
+ {{if .AllowGuest}}
+ <div class="row mt-4">
+ <div class="col-md-10">OU</div>
+ </div>
+
+ <form method="POST">
+ <input type="hidden" name="action" value="add-external" />
+ <div class="row mt-4">
+ <div class="col-md-3"><strong>E-mail :</strong></div>
+ <div class="col-md-5">
+ <input class="form-control" type="text" name="mail" placeholder="machin@truc.net..." />
</div>
- </form>
+ <div class="col-md-2">
+ </div>
+ </div>
+ <div class="row mt-4">
+ <div class="col-md-3"><strong>Nom (optionnel) :</strong></div>
+ <div class="col-md-5">
+ <input class="form-control" type="text" name="displayname" placeholder="Machin Truc..." />
+ </div>
+ <div class="col-md-2">
+ <input type="submit" value="Ajouter" class="form-control btn btn-success btn-sm" />
+ </div>
+ </div>
+ <div class="row">
+ <small class="form-text text-muted col-md-10">
+ Si un utilisateur existe déjà avec l'email spécifiée, celui-ci sera ajouté à la liste.
+ Sinon, un utilisateur invité sera créé.
+ </small>
+ </div>
+ </form>
+ {{end}}
+</div>
+
{{end}}
diff --git a/templates/layout.html b/templates/layout.html
index 212ce5e..0a887ce 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
- <title>{{template "title"}} Guichet</title>
+ <title>{{template "title" .}} Guichet</title>
</head>
<body>
<div class="container mb-4">