aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-12 15:54:17 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-12 15:54:17 +0100
commitb3d6854d82143ef62234a408ada01d4035c19b20 (patch)
tree2c901af5519971166b3bcd6d4fb2a299bef1c0cc /templates
parent3fbbe61a460b8d5415b61de505b4ac1ab8692b25 (diff)
downloadguichet-b3d6854d82143ef62234a408ada01d4035c19b20.tar.gz
guichet-b3d6854d82143ef62234a408ada01d4035c19b20.zip
Use more appropriate `description` instead of `displayname` for everything except users
Diffstat (limited to 'templates')
-rw-r--r--templates/admin_create.html23
-rw-r--r--templates/admin_groups.html2
-rw-r--r--templates/admin_ldap.html6
3 files changed, 20 insertions, 11 deletions
diff --git a/templates/admin_create.html b/templates/admin_create.html
index 6e5aef1..9971aaf 100644
--- a/templates/admin_create.html
+++ b/templates/admin_create.html
@@ -36,19 +36,28 @@
</div>
<div class="form-group">
<label for="idtype">Type d'identifiant:</label>
- <input type="text" {{if .IsTemplated}}disabled="disabled"{{end}} id="idtype" name="idtype" class="form-control" value="{{ .IdType }}" />
- </div>
- <div class="form-group">
- <label for="displayname">Nom:</label>
- <input type="text" id="displayname" name="displayname" class="form-control" value="{{ .DisplayName }}" />
+ <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>
+ <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>
+ <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>
- <input type="text" {{if .IsTemplated}}disabled="disabled"{{end}} id="soc" name="soc" class="form-control" value="{{ .StructuralObjectClass }}" />
+ <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>
- <textarea rows="5" {{if .IsTemplated}}disabled="disabled"{{end}} id="oc" name="oc" class="form-control">{{ .ObjectClass }}</textarea>
+ <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>
</form>
diff --git a/templates/admin_groups.html b/templates/admin_groups.html
index b52dd92..f6eabfe 100644
--- a/templates/admin_groups.html
+++ b/templates/admin_groups.html
@@ -22,7 +22,7 @@
{{$group.GetAttributeValue $root.GroupNameAttr}}
</a>
</td>
- <td>{{$group.GetAttributeValue "displayname"}}</td>
+ <td>{{$group.GetAttributeValue "description"}}</td>
</tr>
{{end}}
{{end}}
diff --git a/templates/admin_ldap.html b/templates/admin_ldap.html
index 188652b..7b274dc 100644
--- a/templates/admin_ldap.html
+++ b/templates/admin_ldap.html
@@ -30,7 +30,7 @@
{{.Identifier}}
</a>
</td>
- <td>{{.DisplayName}}</td>
+ <td>{{.Name}}</td>
</tr>
{{end}}
</tbody>
@@ -125,7 +125,7 @@
{{range .Members}}
<div class="row mt-4">
<div class="col-md-3">
- <strong>{{.DisplayName}}</strong>
+ <strong>{{.Name}}</strong>
</div>
<div class="col-md-5">
<a href="/admin/ldap/{{.DN}}">{{.DN}}</a>
@@ -162,7 +162,7 @@
{{range .Groups}}
<div class="row mt-4">
<div class="col-md-3">
- <strong>{{.DisplayName}}</strong>
+ <strong>{{.Name}}</strong>
</div>
<div class="col-md-5">
<a href="/admin/ldap/{{.DN}}">{{.DN}}</a>