aboutsummaryrefslogtreecommitdiff
path: root/templates/admin_create.html
blob: 1ea6feebe9b297d6bd603b6596fe6f80a2b7276d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{{define "title"}}Nouvel objet |{{end}}

{{define "body"}}
<div class="d-flex">
  <h4>Créer un objet</h4>
  <a class="ml-auto btn btn-info" href="/">Menu principal</a>
</div>

<div class="mt-4">
  <nav aria-label="breadcrumb">
    <ol class="breadcrumb">
      {{range .Path}}
        <li class="breadcrumb-item"><a href="/admin/ldap/{{.DN}}">{{.Identifier}}</a></li>
      {{end}}
      <li class="breadcrumb-item active" aria-current="page">Nouvel objet</li>
    </ol>
  </nav>
</div>

{{if .Error}}
  <div class="alert alert-danger mt-4">Impossible de créer l'objet.
    <div style="font-size: 0.8em">{{ .Error }}</div>
  </div>
{{end}}

<form method="POST" class="mt-4">
  <!--
  <div class="form-group">
    <label>Parent:</label>
    <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="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>
      <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 .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 .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>

{{end}}