2007-08-12 04:53:18 -07:00
<div xmlns:py= " http://purl.org/kid/ns# "
class="simpleroster">
2007-10-01 11:26:22 -07:00
<form action= " ${ action } " name= " ${ name } " method= " ${ method } " class= " tableform "
onsubmit="preSubmit()">
2007-11-14 17:50:46 -05:00
2007-11-15 13:13:35 -05:00
<input type= " submit " class= " submitbutton " name= " submit " value= " Add User " / >
2007-10-02 10:49:44 -07:00
2007-10-01 11:26:22 -07:00
< ?python
from ipagui.helpers import ipahelper
?>
<script type= " text/javascript " charset= " utf-8 "
src=" ${ tg . url ( ' /static/javascript/dynamicedit.js ' ) } "> < /script>
2007-10-19 15:19:28 -07:00
<script type= " text/javascript " charset= " utf-8 "
src=" ${ tg . url ( ' /static/javascript/dynamicselect.js ' ) } "> < /script>
2007-11-08 22:12:42 -05:00
<script type= " text/javascript " charset= " utf-8 "
src=" ${ tg . url ( ' /tg_widgets/tg_expanding_form_widget/javascript/expanding_form.js ' ) } "> < /script>
2007-10-01 11:26:22 -07:00
2007-11-01 16:15:32 -04:00
< ?python
2007-10-19 15:19:28 -07:00
searchurl = tg.url('/user/edit_search')
selectSearchurl = tg.url('/user/user_select_search')
?>
2007-10-01 11:26:22 -07:00
<script type= " text/javascript " >
function doSearch() {
$ ('searchresults').update("Searching...");
new Ajax.Updater('searchresults',
' ${ searchurl } ',
{ asynchronous:true,
parameters: { criteria: $ ('criteria').value },
evalScripts: true });
return false;
}
// override dynamicedit.js version
// we don't need to show [group] nor italize groups
function renderMemberInfo(newdiv, info) {
if (info.type == "group") {
newdiv.appendChild(document.createTextNode(
2007-10-09 09:26:16 -07:00
info.name + " "));
2007-10-01 11:26:22 -07:00
}
}
2007-10-19 15:19:28 -07:00
function doSelectSearch(which_select) {
$ (which_select + '_searchresults').update("Searching...");
new Ajax.Updater(which_select + '_searchresults',
' ${ selectSearchurl } ',
{ asynchronous:true,
parameters: { criteria: $ (which_select + '_criteria').value,
which_select: which_select},
evalScripts: true });
return false;
}
2007-10-01 11:26:22 -07:00
< /script>
<div py:for= " field in hidden_fields "
2007-11-14 17:50:46 -05:00
py:replace="field.display(value_for(field), **params_for(field))"
2007-10-01 11:26:22 -07:00
/>
2007-08-12 04:53:18 -07:00
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Identity Details < /h2>
2007-08-30 15:10:48 -07:00
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
2007-10-03 13:53:14 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . title . field_id } "
py:content="user_fields.title.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . title . display ( value_for ( user_fields . title ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' title ' ) " class= " fielderror "
py:content="tg.errors.get('title')" />
< /td>
< /tr>
2007-08-30 15:10:48 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . givenname . field_id } "
py:content="user_fields.givenname.label" />:
2007-08-30 15:10:48 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . givenname . display ( value_for ( user_fields . givenname ) ) " />
2007-08-30 15:10:48 -07:00
<span py:if= " tg . errors . get ( ' givenname ' ) " class= " fielderror "
py:content="tg.errors.get('givenname')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . sn . field_id } "
py:content="user_fields.sn.label" />:
2007-08-30 15:10:48 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . sn . display ( value_for ( user_fields . sn ) ) " />
2007-08-30 15:10:48 -07:00
<span py:if= " tg . errors . get ( ' sn ' ) " class= " fielderror "
py:content="tg.errors.get('sn')" />
<script type= " text/javascript " >
2007-10-03 13:53:14 -07:00
var uid_suggest = "";
var mail_suggest = "";
var cn_suggest = "";
var displayname_suggest = "";
var initials_suggest = "";
2007-09-06 11:09:12 -07:00
2007-08-30 15:10:48 -07:00
function autofill(self) {
2007-10-03 13:53:14 -07:00
var givenname = $ ('form_givenname');
var sn = $ ('form_sn');
2007-08-30 15:10:48 -07:00
if ((givenname.value == "") || (sn.value == "")) {
return;
}
2007-10-03 13:53:14 -07:00
var uid = $ ('form_uid');
var mail = $ ('form_mail');
2007-11-14 17:50:46 -05:00
var cn = $ ('form_cns_0_cn');
2007-10-03 13:53:14 -07:00
var displayname = $ ('form_displayname');
var initials = $ ('form_initials');
2007-10-04 14:23:55 -07:00
if ((cn.value == "") || (cn.value == cn_suggest)) {
cn.value = givenname.value + " " + sn.value;
cn_suggest = cn.value;
new Effect.Highlight(cn);
}
if ((displayname.value == "") ||
(displayname.value == displayname_suggest)) {
displayname.value = givenname.value + " " + sn.value;
displayname_suggest = displayname.value;
new Effect.Highlight(displayname);
}
if ((initials.value == "") ||
(initials.value == initials_suggest)) {
initials.value = givenname.value[0] + sn.value[0];
initials_suggest = initials.value;
new Effect.Highlight(initials);
}
2007-09-06 11:09:12 -07:00
if ((uid.value == "") || (uid.value == uid_suggest)) {
2007-10-04 17:10:18 -07:00
new Ajax.Request(' ${ tg . url ( ' /user/suggest_uid ' ) } ', {
2007-08-30 15:10:48 -07:00
method: 'get',
parameters: {'givenname': givenname.value, 'sn': sn.value},
onSuccess: function(transport) {
uid.value = transport.responseText;
2007-09-06 11:09:12 -07:00
uid_suggest = uid.value;
2007-08-30 15:10:48 -07:00
new Effect.Highlight(uid);
}
});
}
2007-10-03 13:53:14 -07:00
2007-09-06 11:09:12 -07:00
if ((mail.value == "") || (mail.value == mail_suggest)) {
2007-10-04 17:10:18 -07:00
new Ajax.Request(' ${ tg . url ( ' /user/suggest_email ' ) } ', {
2007-08-30 15:10:48 -07:00
method: 'get',
parameters: {'givenname': givenname.value, 'sn': sn.value},
onSuccess: function(transport) {
mail.value = transport.responseText;
2007-09-06 11:09:12 -07:00
mail_suggest = mail.value;
2007-08-30 15:10:48 -07:00
new Effect.Highlight(mail);
}
});
}
}
2007-10-03 13:53:14 -07:00
document.getElementById('form_givenname').onchange = autofill;
document.getElementById('form_sn').onchange = autofill;
2007-08-30 15:10:48 -07:00
< /script>
< /td>
< /tr>
2007-10-03 13:53:14 -07:00
<tr >
<th >
2007-11-14 17:50:46 -05:00
<label class= " fieldlabel " for= " ${ user_fields . cns . field_id } "
py:content="user_fields.cns.label" />:
2007-10-03 13:53:14 -07:00
< /th>
2007-11-14 17:50:46 -05:00
<td colspan= " 3 " >
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " id= " ${ user_fields . cns . field_id } " >
<tbody >
< ?python repetition = 0
cn_index = 0
cn_error = tg.errors.get('cn')
values = value_for(user_fields.cn)
if values is None:
values=['']
?>
<tr py:for= " cn in values "
id=" ${ user_fields . cns . field_id } _ ${ repetition } "
class=" ${ user_fields . cns . field_class } ">
<td py:for= " field in user_fields . cns . fields " >
<span > <input class= " textfield " type= " text " id= " ${ user_fields . cns . field_id } _ ${ repetition } _cn " name= " cns- ${ repetition } .cn " value= " ${ cn } " / > < /span>
<span py:if= " cn_error and cn_error [ cn_index ] " class= " fielderror "
py:content="tg.errors.get('cn')" />
< /td>
<?python cn_index = cn_index + 1 ?>
<td >
<a
href="javascript:ExpandingForm.removeItem(' ${ user_fields . cns . field_id } _ ${ repetition } ')">Remove < /a>
< /td>
<?python repetition = repetition + 1 ?>
< /tr>
< /tbody>
< /table>
<a id= " ${ user_fields . cns . field_id } _doclink " href= " javascript:ExpandingForm.addItem( ' ${ user_fields . cns . field_id } ' ); " > Add Common Name < /a>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . displayname . field_id } "
py:content="user_fields.displayname.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . displayname . display ( value_for ( user_fields . displayname ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' displayname ' ) " class= " fielderror "
py:content="tg.errors.get('displayname')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . initials . field_id } "
py:content="user_fields.initials.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . initials . display ( value_for ( user_fields . initials ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' initials ' ) " class= " fielderror "
py:content="tg.errors.get('initials')" />
< /td>
< /tr>
2007-08-30 15:10:48 -07:00
< /table>
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Account Details < /h2>
2007-08-12 04:53:18 -07:00
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
2007-10-03 13:53:14 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . nsAccountLock . field_id } "
py:content="user_fields.nsAccountLock.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . nsAccountLock . display ( value_for ( user_fields . nsAccountLock ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' nsAccountLock ' ) " class= " fielderror "
py:content="tg.errors.get('nsAccountLock')" />
< /td>
< /tr>
2007-08-12 04:53:18 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . uid . field_id } "
py:content="user_fields.uid.label" />:
2007-08-12 04:53:18 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . uid . display ( value_for ( user_fields . uid ) ) " />
2007-08-12 04:53:18 -07:00
<span py:if= " tg . errors . get ( ' uid ' ) " class= " fielderror "
py:content="tg.errors.get('uid')" />
< /td>
< /tr>
2007-08-14 09:40:13 -07:00
<tr >
2007-08-12 04:53:18 -07:00
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . userpassword . field_id } "
py:content="user_fields.userpassword.label" />:
2007-08-12 04:53:18 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . userpassword . display ( value_for ( user_fields . userpassword ) ) " />
2007-08-16 15:05:36 -07:00
<span py:if= " tg . errors . get ( ' userpassword ' ) " class= " fielderror "
py:content="tg.errors.get('userpassword')" />
2007-08-14 09:40:13 -07:00
2007-09-06 14:28:21 -07:00
< !--
2007-08-14 09:40:13 -07:00
<input type= " button " value= " Generate Password "
2007-10-04 17:10:18 -07:00
onclick="new Ajax.Request(' ${ tg . url ( ' /user/generate_password ' ) } ',
2007-08-14 09:40:13 -07:00
{
method: 'get',
onSuccess: function(transport) {
2007-08-16 15:05:36 -07:00
document.getElementById('form_userpassword').value =
2007-08-14 09:40:13 -07:00
transport.responseText;
}
});" />
2007-09-06 14:28:21 -07:00
-->
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . userpassword_confirm . field_id } "
py:content="user_fields.userpassword_confirm.label" />:
2007-09-06 14:28:21 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= "user_fields.userpassword_confirm.display(
value_for(user_fields.userpassword_confirm))" />
2007-09-06 14:28:21 -07:00
<span py:if= " tg . errors . get ( ' userpassword_confirm ' ) " class= " fielderror "
py:content="tg.errors.get('userpassword_confirm')" />
2007-08-12 04:53:18 -07:00
< /td>
2007-08-14 09:40:13 -07:00
< /tr>
2007-08-12 04:53:18 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . uidnumber . field_id } "
py:content="user_fields.uidnumber.label" />:
2007-08-12 04:53:18 -07:00
< /th>
<td >
2007-09-07 16:53:34 -07:00
Generated by server
2007-08-12 04:53:18 -07:00
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . gidnumber . field_id } "
py:content="user_fields.gidnumber.label" />:
2007-08-12 04:53:18 -07:00
< /th>
<td >
2007-09-07 16:53:34 -07:00
Generated by server
2007-08-12 04:53:18 -07:00
< /td>
< /tr>
2007-10-03 13:53:14 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . homedirectory . field_id } "
py:content="user_fields.homedirectory.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
Generated by server
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . loginshell . field_id } "
py:content="user_fields.loginshell.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= "user_fields.loginshell.display(
value_for(user_fields.loginshell))" />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' loginshell ' ) " class= " fielderror "
py:content="tg.errors.get('loginshell')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . gecos . field_id } "
py:content="user_fields.gecos.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= "user_fields.gecos.display(
value_for(user_fields.gecos))" />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' gecos ' ) " class= " fielderror "
py:content="tg.errors.get('gecos')" />
< /td>
< /tr>
2007-08-12 04:53:18 -07:00
< /table>
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Contact Details < /h2>
2007-08-12 04:53:18 -07:00
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . mail . field_id } "
py:content="user_fields.mail.label" />:
2007-08-12 04:53:18 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . mail . display ( value_for ( user_fields . mail ) ) " />
2007-08-12 04:53:18 -07:00
<span py:if= " tg . errors . get ( ' mail ' ) " class= " fielderror "
py:content="tg.errors.get('mail')" />
< /td>
< /tr>
2007-10-03 13:53:14 -07:00
2007-08-12 04:53:18 -07:00
<tr >
<th >
2007-11-14 17:50:46 -05:00
<label class= " fieldlabel " for= " ${ user_fields . telephonenumbers . field_id } "
py:content="user_fields.telephonenumbers.label" />:
2007-08-12 04:53:18 -07:00
< /th>
2007-11-14 17:50:46 -05:00
<td colspan= " 3 " >
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " id= " ${ user_fields . telephonenumbers . field_id } " >
<tbody >
< ?python repetition = 0
tele_index = 0
tele_error = tg.errors.get('telephonenumber')
values = value_for(user_fields.telephonenumber)
if values is None:
values=['']
?>
<tr py:for= " tele in values "
id=" ${ user_fields . telephonenumbers . field_id } _ ${ repetition } "
class=" ${ user_fields . telephonenumbers . field_class } ">
<td py:if= " user_fields . telephonenumbers . fields is not None " py:for= " field in user_fields . telephonenumbers . fields " >
<span > <input class= " textfield " type= " text " id= " ${ user_fields . telephonenumbers . field_id } _ ${ repetition } _telephonenumber " name= " telephonenumbers- ${ repetition } .telephonenumber " value= " ${ tele } " / > < /span>
<span py:if= " tele_error and tele_error [ tele_index ] " class= " fielderror "
py:content="tg.errors.get('telephonenumber')" />
< /td>
<?python tele_index = tele_index + 1 ?>
<td >
<a
href="javascript:ExpandingForm.removeItem(' ${ user_fields . telephonenumbers . field_id } _ ${ repetition } ')">Remove < /a>
< /td>
<?python repetition = repetition + 1 ?>
< /tr>
< /tbody>
< /table>
<a id= " ${ user_fields . telephonenumbers . field_id } _doclink " href= " javascript:ExpandingForm.addItem( ' ${ user_fields . telephonenumbers . field_id } ' ); " > Add Work Number < /a>
2007-08-12 04:53:18 -07:00
< /td>
< /tr>
2007-10-03 13:53:14 -07:00
<tr >
<th >
2007-11-14 17:50:46 -05:00
<label class= " fieldlabel " for= " ${ user_fields . facsimiletelephonenumbers . field_id } "
py:content="user_fields.facsimiletelephonenumbers.label" />:
2007-10-03 13:53:14 -07:00
< /th>
2007-11-14 17:50:46 -05:00
<td colspan= " 3 " >
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " id= " ${ user_fields . facsimiletelephonenumbers . field_id } " >
<tbody >
< ?python repetition = 0
fax_index = 0
fax_error = tg.errors.get('facsimiletelephonenumber')
values = value_for(user_fields.facsimiletelephonenumber)
if values is None:
values=['']
?>
<tr py:for= " fax in values "
id=" ${ user_fields . facsimiletelephonenumbers . field_id } _ ${ repetition } "
class=" ${ user_fields . facsimiletelephonenumbers . field_class } ">
<td py:for= " field in user_fields . facsimiletelephonenumbers . fields " >
<span > <input class= " textfield " type= " text " id= " ${ user_fields . facsimiletelephonenumbers . field_id } _ ${ repetition } _facsimiletelephonenumber " name= " facsimiletelephonenumbers- ${ repetition } .facsimiletelephonenumber " value= " ${ fax } " / > < /span>
<span py:if= " fax_error and fax_error [ fax_index ] " class= " fielderror "
py:content="tg.errors.get('facsimiletelephonenumber')" />
< /td>
<?python fax_index = fax_index + 1 ?>
<td >
<a
href="javascript:ExpandingForm.removeItem(' ${ user_fields . facsimiletelephonenumbers . field_id } _ ${ repetition } ')">Remove < /a>
< /td>
<?python repetition = repetition + 1 ?>
< /tr>
< /tbody>
< /table>
<a id= " ${ user_fields . facsimiletelephonenumbers . field_id } _doclink " href= " javascript:ExpandingForm.addItem( ' ${ user_fields . facsimiletelephonenumbers . field_id } ' ); " > Add Fax Number < /a>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
<tr >
<th >
2007-11-14 17:50:46 -05:00
<label class= " fieldlabel " for= " ${ user_fields . mobiles . field_id } "
py:content="user_fields.mobiles.label" />:
2007-10-03 13:53:14 -07:00
< /th>
2007-11-14 17:50:46 -05:00
<td colspan= " 3 " >
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " id= " ${ user_fields . mobiles . field_id } " >
<tbody >
< ?python repetition = 0
mobile_index = 0
mobile_error = tg.errors.get('mobile')
values = value_for(user_fields.mobile)
if values is None:
values=['']
?>
<tr py:for= " mobile in values "
id=" ${ user_fields . mobiles . field_id } _ ${ repetition } "
class=" ${ user_fields . mobiles . field_class } ">
<td py:for= " field in user_fields . mobiles . fields " >
<span > <input class= " textfield " type= " text " id= " ${ user_fields . mobiles . field_id } _ ${ repetition } _mobile " name= " mobiles- ${ repetition } .mobile " value= " ${ mobile } " / > < /span>
<span py:if= " mobile_error and mobile_error [ mobile_index ] " class= " fielderror "
py:content="tg.errors.get('mobile')" />
< /td>
<?python mobile_index = mobile_index + 1 ?>
<td >
<a
href="javascript:ExpandingForm.removeItem(' ${ user_fields . mobiles . field_id } _ ${ repetition } ')">Remove < /a>
< /td>
<?python repetition = repetition + 1 ?>
< /tr>
< /tbody>
< /table>
<a id= " ${ user_fields . mobiles . field_id } _doclink " href= " javascript:ExpandingForm.addItem( ' ${ user_fields . mobiles . field_id } ' ); " > Add Cell Number < /a>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
<tr >
<th >
2007-11-14 17:50:46 -05:00
<label class= " fieldlabel " for= " ${ user_fields . pagers . field_id } "
py:content="user_fields.pagers.label" />:
2007-10-03 13:53:14 -07:00
< /th>
2007-11-14 17:50:46 -05:00
<td colspan= " 3 " >
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " id= " ${ user_fields . pagers . field_id } " >
<tbody >
< ?python repetition = 0
pager_index = 0
pager_error = tg.errors.get('pager')
values = value_for(user_fields.pager)
if values is None:
values=['']
?>
<tr py:for= " pager in values "
id=" ${ user_fields . pagers . field_id } _ ${ repetition } "
class=" ${ user_fields . pagers . field_class } ">
<td py:for= " field in user_fields . pagers . fields " >
<span > <input class= " textfield " type= " text " id= " ${ user_fields . pagers . field_id } _ ${ repetition } _pager " name= " pagers- ${ repetition } .pager " value= " ${ pager } " / > < /span>
<span py:if= " pager_error and pager_error [ pager_index ] " class= " fielderror "
py:content="tg.errors.get('pager')" />
< /td>
<?python pager_index = pager_index + 1 ?>
<td >
<a
href="javascript:ExpandingForm.removeItem(' ${ user_fields . pagers . field_id } _ ${ repetition } ')">Remove < /a>
< /td>
<?python repetition = repetition + 1 ?>
< /tr>
< /tbody>
< /table>
<a id= " ${ user_fields . pagers . field_id } _doclink " href= " javascript:ExpandingForm.addItem( ' ${ user_fields . pagers . field_id } ' ); " > Add Pager Number < /a>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
<tr >
<th >
2007-11-14 17:50:46 -05:00
<label class= " fieldlabel " for= " ${ user_fields . homephones . field_id } "
py:content="user_fields.homephones.label" />:
2007-10-03 13:53:14 -07:00
< /th>
2007-11-14 17:50:46 -05:00
<td colspan= " 3 " >
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " id= " ${ user_fields . homephones . field_id } " >
<tbody >
< ?python repetition = 0
homephone_index = 0
homephone_error = tg.errors.get('homephone')
values = value_for(user_fields.homephone)
if values is None:
values=['']
?>
<tr py:for= " homephone in values "
id=" ${ user_fields . homephones . field_id } _ ${ repetition } "
class=" ${ user_fields . homephones . field_class } ">
<td py:for= " field in user_fields . homephones . fields " >
<span > <input class= " textfield " type= " text " id= " ${ user_fields . homephones . field_id } _ ${ repetition } _homephone " name= " homephones- ${ repetition } .homephone " value= " ${ homephone } " / > < /span>
<span py:if= " homephone_error and homephone_error [ homephone_index ] " class= " fielderror "
py:content="tg.errors.get('homephone')" />
< /td>
<?python homephone_index = homephone_index + 1 ?>
<td >
<a
href="javascript:ExpandingForm.removeItem(' ${ user_fields . homephones . field_id } _ ${ repetition } ')">Remove < /a>
< /td>
<?python repetition = repetition + 1 ?>
< /tr>
< /tbody>
< /table>
<a id= " ${ user_fields . homephones . field_id } _doclink " href= " javascript:ExpandingForm.addItem( ' ${ user_fields . homephones . field_id } ' ); " > Add Home Phone < /a>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
2007-11-14 17:50:46 -05:00
2007-08-12 04:53:18 -07:00
< /table>
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Mailing Address < /h2>
2007-08-31 10:59:26 -07:00
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . street . field_id } "
py:content="user_fields.street.label" />:
2007-08-31 10:59:26 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . street . display ( value_for ( user_fields . street ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' street ' ) " class= " fielderror "
py:content="tg.errors.get('street')" />
< /td>
< /tr>
2007-10-19 09:18:51 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . roomnumber . field_id } "
py:content="user_fields.roomnumber.label" />:
2007-10-19 09:18:51 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . roomnumber . display ( value_for ( user_fields . roomnumber ) ) " />
2007-10-19 09:18:51 -07:00
<span py:if= " tg . errors . get ( ' roomnumber ' ) " class= " fielderror "
py:content="tg.errors.get('roomnumber')" />
< /td>
< /tr>
2007-10-03 13:53:14 -07:00
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . l . field_id } "
py:content="user_fields.l.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . l . display ( value_for ( user_fields . l ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' l ' ) " class= " fielderror "
py:content="tg.errors.get('l')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . st . field_id } "
py:content="user_fields.st.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . st . display ( value_for ( user_fields . st ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' st ' ) " class= " fielderror "
py:content="tg.errors.get('st')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . postalcode . field_id } "
py:content="user_fields.postalcode.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . postalcode . display ( value_for ( user_fields . postalcode ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' postalcode ' ) " class= " fielderror "
py:content="tg.errors.get('postalcode')" />
< /td>
< /tr>
< /table>
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Employee Information < /h2>
2007-10-03 13:53:14 -07:00
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . ou . field_id } "
py:content="user_fields.ou.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . ou . display ( value_for ( user_fields . ou ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' ou ' ) " class= " fielderror "
py:content="tg.errors.get('ou')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . businesscategory . field_id } "
py:content="user_fields.businesscategory.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . businesscategory . display ( value_for ( user_fields . businesscategory ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' businesscategory ' ) " class= " fielderror "
py:content="tg.errors.get('businesscategory')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . description . field_id } "
py:content="user_fields.description.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . description . display ( value_for ( user_fields . description ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' description ' ) " class= " fielderror "
py:content="tg.errors.get('description')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . employeetype . field_id } "
py:content="user_fields.employeetype.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . employeetype . display ( value_for ( user_fields . employeetype ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' employeetype ' ) " class= " fielderror "
py:content="tg.errors.get('employeetype')" />
< /td>
< /tr>
<tr >
2007-10-19 15:19:28 -07:00
<th valign= " top " >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . manager . field_id } "
py:content="user_fields.manager.label" />:
2007-10-03 13:53:14 -07:00
< /th>
2007-10-19 15:19:28 -07:00
<td valign= " top " >
<div >
2007-10-25 09:18:45 -07:00
<span id= ' manager_select_cn ' > ${ value_for ( user_fields . manager ) } < /span>
2007-10-19 15:19:28 -07:00
<span id= ' manager_links ' >
<a href= " # " onclick= " return clearSelect( ' manager ' ); " > clear < /a>
<a href= " # " onclick= " return startSelect( ' manager ' ); " > change < /a>
< /span>
<span py:if= " tg . errors . get ( ' manager ' ) " class= " fielderror "
py:content="tg.errors.get('manager')" />
< /div>
<div id= " manager_searcharea " style= " display:none " >
<div >
<input id= " manager_criteria " type= " text "
onkeypress="return enterDoSelectSearch(event, 'manager');" />
<input type= " button " value= " Find "
onclick="return doSelectSearch('manager');"
/>
< /div>
<div id= " manager_searchresults " >
< /div>
< /div>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . secretary . field_id } "
py:content="user_fields.secretary.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-19 15:19:28 -07:00
<div >
2007-10-25 09:18:45 -07:00
<span id= ' secretary_select_cn ' > ${ value_for ( user_fields . secretary ) } < /span>
2007-10-19 15:19:28 -07:00
<span id= ' secretary_links ' >
<a href= " # " onclick= " return clearSelect( ' secretary ' ); " > clear < /a>
<a href= " # " onclick= " return startSelect( ' secretary ' ); " > change < /a>
< /span>
<span py:if= " tg . errors . get ( ' secretary ' ) " class= " fielderror "
py:content="tg.errors.get('secretary')" />
< /div>
<div id= " secretary_searcharea " style= " display:none " >
<div >
<input id= " secretary_criteria " type= " text "
onkeypress="return enterDoSelectSearch(event, 'secretary');" />
<input type= " button " value= " Find "
onclick="return doSelectSearch('secretary');"
/>
< /div>
<div id= " secretary_searchresults " >
< /div>
< /div>
2007-10-03 13:53:14 -07:00
< /td>
< /tr>
< /table>
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Misc Information < /h2>
2007-10-03 13:53:14 -07:00
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . carlicense . field_id } "
py:content="user_fields.carlicense.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . carlicense . display ( value_for ( user_fields . carlicense ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' carlicense ' ) " class= " fielderror "
py:content="tg.errors.get('carlicense')" />
< /td>
< /tr>
<tr >
<th >
2007-10-25 09:18:45 -07:00
<label class= " fieldlabel " for= " ${ user_fields . labeleduri . field_id } "
py:content="user_fields.labeleduri.label" />:
2007-10-03 13:53:14 -07:00
< /th>
<td >
2007-10-25 09:18:45 -07:00
<span py:replace= " user_fields . labeleduri . display ( value_for ( user_fields . labeleduri ) ) " />
2007-10-03 13:53:14 -07:00
<span py:if= " tg . errors . get ( ' labeleduri ' ) " class= " fielderror "
py:content="tg.errors.get('labeleduri')" />
2007-08-31 10:59:26 -07:00
< /td>
< /tr>
< /table>
2007-10-24 16:04:17 -07:00
<div py:if= ' len ( custom_fields ) & gt ; 0 ' >
<div class= " formsection " > Custom Fields < /div>
<table class= " formtable " cellpadding= " 2 " cellspacing= " 0 " border= " 0 " >
<tr py:for= ' custom_field in custom_fields ' >
<th >
<label class= " fieldlabel " for= " ${ custom_field . field_id } "
py:content="custom_field.label" />:
< /th>
<td >
<span py:replace= " custom_field . display ( value_for ( custom_field ) ) " />
<span py:if= " tg . errors . get ( custom_field . name ) " class= " fielderror "
py:content="tg.errors.get(custom_field.name)" />
< /td>
< /tr>
< /table>
< /div>
2007-10-01 11:26:22 -07:00
<div style= " clear:both " >
2007-11-01 16:15:32 -04:00
<h2 class= " formsection " > Add Groups < /h2>
2007-10-01 11:26:22 -07:00
<div class= " floatlist " >
<div class= " floatheader " > To Add: < /div>
<div id= " newmembers " >
< /div>
< /div>
<div >
<div id= " search " >
<input id= " criteria " type= " text " name= " criteria "
onkeypress="return enterDoSearch(event);" />
2007-11-01 16:15:32 -04:00
<input class= " searchbutton " type= " button " value= " Find "
2007-10-01 11:26:22 -07:00
onclick="return doSearch();"
/>
< /div>
<div id= " searchresults " >
< /div>
< /div>
< /div>
2007-11-01 16:15:32 -04:00
<hr />
2007-11-15 13:13:35 -05:00
<input type= " submit " class= " submitbutton " name= " submit " value= " Add User " / >
2007-08-12 04:53:18 -07:00
< /form>
2007-10-01 11:26:22 -07:00
2007-12-06 17:49:56 -05:00
<script type= " text/javascript " >
document.getElementById("form_title").focus();
< /script>
2007-10-01 11:26:22 -07:00
<script type= " text/javascript " >
/*
* This section restores the contents of the add and remove lists
* dynamically if we have to refresh the page
*/
if ( $ ('form_dn_to_info_json').value != "") {
dn_to_info_hash = new Hash( $ ('form_dn_to_info_json').value.evalJSON());
}
< /script>
< ?python
dnadds = value.get('dnadd', [])
if not(isinstance(dnadds,list) or isinstance(dnadds,tuple)):
dnadds = [dnadds]
?>
<script py:for= " dnadd in dnadds " >
< ?python
dnadd_esc = ipahelper.javascript_string_escape(dnadd)
?>
var dn = " ${ dnadd_esc } ";
var info = dn_to_info_hash[dn];
var newdiv = addmember(dn, info);
if (newdiv != null) {
newdiv.style.display = 'block';
}
< /script>
2007-08-12 04:53:18 -07:00
< /div>