ldapsearchuser.smarty
1.66 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
<form method="POST" action="{$smarty.server.PHP_SELF}">
<p class="descriptiveText">{i18n}Since there may be many users in the
system, please provider a few letters from the person's user name to
begin.{/i18n}</p>
<input type="hidden" name="action" value="addUserFromSource" />
<input type="hidden" name="source_id" value="{$source->getId()}" />
<fieldset><legend>Search for user</legend>
{foreach from=$fields item=oWidget}
{$oWidget->render()}
{/foreach}
<div class="form_actions">
<input type="submit" value="{i18n}search for users{/i18n}" />
</div>
</fieldset>
</form>
{if !$search_results}
<div class="ktInfo">
<!-- never show a very large set, if you can help it. -->
<p>{i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find users.{/i18n}</p>
</div>
{else}
<form method="POST" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="action" value="addUserFromSource" />
<input type="hidden" name="source_id" value="{$source->getId()}" />
<table class="listing">
<thead>
<tr>
<th>{i18n}Name{/i18n}</th>
<th>{i18n}LDAP User Name{/i18n}</th>
<th>{i18n}Distinguished Name (LDAP DN){/i18n}</th>
</tr>
</thead>
<tbody>
<!-- do we want to batch here? -->
{foreach item=potential_user from=$search_results}
<tr>
<td><input type="radio" name="id"
value="{$potential_user.$identifier_field}" />{$potential_user.cn}</td>
<td>{$potential_user.$identifier_field}</td>
<td>{$potential_user.dn}</td>
</tr>
{/foreach}
<!--
-->
</tbody>
</table>
<input type="submit" name="submit[chosen]" value="{i18n}Add{/i18n}" />
</form>
{/if}