configuration.tpl
3.16 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<h2>{'Ldap_Login Plugin'|@translate}</h2>
<div id="configContent">
<p>{'All LDAP users can use their ldap password everywhere on piwigo if needed.'|@translate}</p>
<form method="post" action="{$PLUGIN_ACTION}" class="general">
{if (!extension_loaded('ldap'))}
<p style="color:red;">{'Warning: LDAP Extension missing.'|@translate}</p>
<br />
{/if}
<fieldset class="mainConf">
<legend>{'Ldap server host connection'|@translate}</legend>
<ul>
<li>
<label for="host">{'Ldap server host'|@translate}</label>
<br>
<input size="70" type="text" id="host" name="HOST" value="{$HOST}" />
</li>
<li>
<label for="ld_use_ssl">
{if $LD_USE_SSL }
<input type="checkbox" id="ld_use_ssl" name="LD_USE_SSL" value="{$LD_USE_SSL}" checked />
{else}
<input type="checkbox" id="ld_use_ssl" name="LD_USE_SSL" value="{$LD_USE_SSL}" />
{/if}
{'Secure connexion'|@translate}</label>
</li>
<li>
<label for="port">{'Ldap port'|@translate}</label>
<br>
<input type="text" id="port" name="PORT" value="{$PORT}" />
</li>
</ul>
<i>{'If empty, localhost and standard protocol ports will be used in configuration.'|@translate}</i>
</fieldset>
<fieldset class="mainConf">
<legend>{'Ldap attributes'|@translate}</legend>
<ul>
<li>
<label for="basedn">{'Base DN'|@translate}</label>
<br>
<input size="70" type="text" id="basedn" name="BASEDN" value="{$BASEDN}" />
</li>
<li>
<label for="ld_attr">{'Attribute corresponding to the user name'|@translate}</label>
<br>
<input type="text" id="ld_attr" name="LD_ATTR" value="{$LD_ATTR}" />
</li>
<li>
<label for="groupdn">{'DN of group for membership-check (memberOf)'|@translate}</label>
<br>
<input size="70" type="text" id="ld_group" name="LD_GROUP" value="{$LD_GROUP}" />
</li>
</ul>
</fieldset>
<fieldset class="mainConf">
<legend>{'Ldap connection credentials'|@translate}</legend>
<ul>
<li>
<label for="ld_binddn">{'Bind DN, field in full ldap style'|@translate}</label>
<br>
<input size="70" type="text" id="ld_binddn" name="LD_BINDDN" value="{$LD_BINDDN}" />
</li>
<li>
<label for="ld_bindpw">{'Bind password'|@translate}</label>
<br>
<input type="password" id="ld_bindpw" name="LD_BINDPW" />
</li>
</ul>
<i>{'Let the fields blank if the ldap accept anonymous connections.'|@translate}</i>
</fieldset>
<p>
<input type="submit" value="{'Save'|@translate}" name="save" />
</p>
</form>
<form method="post" action="{$PLUGIN_CHECK}" class="general">
<fieldset class="mainConf">
<legend>{'Ldap_Login Test'|@translate}</legend>
<i>{'You must save the settings with the Save button just up there before testing here.'|@translate}</i>
<ul>
<li>
<label for="username">{'Username'|@translate}</label>
<br>
<input type="text" id="username" name="USERNAME" value="{$USERNAME}" />
</li>
<li>
<label for="ld_attr">{'Your password'|@translate}</label>
<br>
<input type="password" id="password" name="PASSWORD" value="{$PASSWORD}" />
</li>
</ul>
{if (!empty($LD_CHECK_LDAP))}
{$LD_CHECK_LDAP}
{/if}
</fieldset>
<p><input type="submit" value="{'Test Settings'|@translate}" name="check_ldap" /></p>
</form>
</div>