mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add the rest of the user fields to the user pages.
This commit is contained in:
parent
3ef4a374f7
commit
1cef67e2e1
@ -139,11 +139,41 @@ class Root(controllers.RootController):
|
||||
#
|
||||
try:
|
||||
new_user = ipa.user.User()
|
||||
new_user.setValue('uid', kw.get('uid'))
|
||||
new_user.setValue('title', kw.get('title'))
|
||||
new_user.setValue('givenname', kw.get('givenname'))
|
||||
new_user.setValue('sn', kw.get('sn'))
|
||||
new_user.setValue('cn', kw.get('cn'))
|
||||
new_user.setValue('displayname', kw.get('displayname'))
|
||||
new_user.setValue('initials', kw.get('initials'))
|
||||
|
||||
new_user.setValue('uid', kw.get('uid'))
|
||||
new_user.setValue('loginshell', kw.get('loginshell'))
|
||||
new_user.setValue('gecos', kw.get('gecos'))
|
||||
|
||||
new_user.setValue('mail', kw.get('mail'))
|
||||
new_user.setValue('telephonenumber', kw.get('telephonenumber'))
|
||||
new_user.setValue('facsimiletelephonenumber',
|
||||
kw.get('facsimiletelephonenumber'))
|
||||
new_user.setValue('mobile', kw.get('mobile'))
|
||||
new_user.setValue('pager', kw.get('pager'))
|
||||
new_user.setValue('homephone', kw.get('homephone'))
|
||||
|
||||
new_user.setValue('street', kw.get('street'))
|
||||
new_user.setValue('l', kw.get('l'))
|
||||
new_user.setValue('st', kw.get('st'))
|
||||
new_user.setValue('postalcode', kw.get('postalcode'))
|
||||
|
||||
new_user.setValue('ou', kw.get('ou'))
|
||||
new_user.setValue('businesscategory', kw.get('businesscategory'))
|
||||
new_user.setValue('description', kw.get('description'))
|
||||
new_user.setValue('employeetype', kw.get('employeetype'))
|
||||
# new_user.setValue('manager', kw.get('manager'))
|
||||
new_user.setValue('roomnumber', kw.get('roomnumber'))
|
||||
# new_user.setValue('secretary', kw.get('secretary'))
|
||||
|
||||
new_user.setValue('carlicense', kw.get('carlicense'))
|
||||
new_user.setValue('labeleduri', kw.get('labeleduri'))
|
||||
|
||||
if kw.get('nsAccountLock'):
|
||||
new_user.setValue('nsAccountLock', 'true')
|
||||
|
||||
@ -293,10 +323,41 @@ class Root(controllers.RootController):
|
||||
orig_user_dict = loads(b64decode(kw.get('user_orig')))
|
||||
|
||||
new_user = ipa.user.User(orig_user_dict)
|
||||
new_user.setValue('title', kw.get('title'))
|
||||
new_user.setValue('givenname', kw.get('givenname'))
|
||||
new_user.setValue('sn', kw.get('sn'))
|
||||
new_user.setValue('cn', kw.get('cn'))
|
||||
new_user.setValue('displayname', kw.get('displayname'))
|
||||
new_user.setValue('initials', kw.get('initials'))
|
||||
|
||||
new_user.setValue('loginshell', kw.get('loginshell'))
|
||||
new_user.setValue('gecos', kw.get('gecos'))
|
||||
|
||||
new_user.setValue('mail', kw.get('mail'))
|
||||
new_user.setValue('telephonenumber', kw.get('telephonenumber'))
|
||||
new_user.setValue('facsimiletelephonenumber',
|
||||
kw.get('facsimiletelephonenumber'))
|
||||
new_user.setValue('mobile', kw.get('mobile'))
|
||||
new_user.setValue('pager', kw.get('pager'))
|
||||
new_user.setValue('homephone', kw.get('homephone'))
|
||||
|
||||
new_user.setValue('street', kw.get('street'))
|
||||
new_user.setValue('l', kw.get('l'))
|
||||
new_user.setValue('st', kw.get('st'))
|
||||
new_user.setValue('postalcode', kw.get('postalcode'))
|
||||
|
||||
new_user.setValue('ou', kw.get('ou'))
|
||||
new_user.setValue('businesscategory', kw.get('businesscategory'))
|
||||
new_user.setValue('description', kw.get('description'))
|
||||
new_user.setValue('employeetype', kw.get('employeetype'))
|
||||
# new_user.setValue('manager', kw.get('manager'))
|
||||
new_user.setValue('roomnumber', kw.get('roomnumber'))
|
||||
# new_user.setValue('secretary', kw.get('secretary'))
|
||||
|
||||
new_user.setValue('carlicense', kw.get('carlicense'))
|
||||
new_user.setValue('labeleduri', kw.get('labeleduri'))
|
||||
|
||||
|
||||
if kw.get('nsAccountLock'):
|
||||
new_user.setValue('nsAccountLock', 'true')
|
||||
else:
|
||||
@ -306,13 +367,7 @@ class Root(controllers.RootController):
|
||||
password_change = True
|
||||
new_user.setValue('uidnumber', str(kw.get('uidnumber')))
|
||||
new_user.setValue('gidnumber', str(kw.get('gidnumber')))
|
||||
|
||||
#
|
||||
# this is a hack until we decide on the policy for names/cn/sn/givenName
|
||||
#
|
||||
new_user.setValue('cn',
|
||||
"%s %s" % (new_user.getValue('givenname'),
|
||||
new_user.getValue('sn')))
|
||||
new_user.setValue('homedirectory', str(kw.get('homedirectory')))
|
||||
|
||||
rv = client.update_user(new_user)
|
||||
#
|
||||
|
@ -2,17 +2,47 @@ import turbogears
|
||||
from turbogears import validators, widgets
|
||||
|
||||
class UserFields():
|
||||
givenname = widgets.TextField(name="givenname", label="Given Name")
|
||||
sn = widgets.TextField(name="sn", label="Family Name")
|
||||
cn = widgets.TextField(name="cn", label="Common Names")
|
||||
title = widgets.TextField(name="title", label="Title")
|
||||
displayname = widgets.TextField(name="displayname", label="Display Name")
|
||||
initials = widgets.TextField(name="initials", label="Initials")
|
||||
|
||||
uid = widgets.TextField(name="uid", label="Login")
|
||||
userpassword = widgets.PasswordField(name="userpassword", label="Password")
|
||||
userpassword_confirm = widgets.PasswordField(name="userpassword_confirm",
|
||||
label="Confirm Password")
|
||||
uidnumber = widgets.TextField(name="uidnumber", label="UID")
|
||||
gidnumber = widgets.TextField(name="gidnumber", label="GID")
|
||||
givenname = widgets.TextField(name="givenname", label="Given Name")
|
||||
sn = widgets.TextField(name="sn", label="Family Name")
|
||||
homedirectory = widgets.TextField(name="homedirectory", label="Home Directory")
|
||||
loginshell = widgets.TextField(name="loginshell", label="Login Shell")
|
||||
gecos = widgets.TextField(name="gecos", label="GECOS")
|
||||
|
||||
mail = widgets.TextField(name="mail", label="E-mail Address")
|
||||
telephonenumber = widgets.TextField(name="telephonenumber", label="Phone")
|
||||
# nsAccountLock = widgets.CheckBox(name="nsAccountLock", label="Account Deactivated")
|
||||
telephonenumber = widgets.TextField(name="telephonenumber", label="Work Number")
|
||||
facsimiletelephonenumber = widgets.TextField(name="facsimiletelephonenumber",
|
||||
label="Fax Number")
|
||||
mobile = widgets.TextField(name="mobile", label="Cell Number")
|
||||
pager = widgets.TextField(name="pager", label="Pager Number")
|
||||
homephone = widgets.TextField(name="homephone", label="Home Number")
|
||||
|
||||
street = widgets.TextField(name="street", label="Street Address")
|
||||
l = widgets.TextField(name="l", label="City")
|
||||
st = widgets.TextField(name="st", label="State")
|
||||
postalcode = widgets.TextField(name="postalcode", label="ZIP")
|
||||
|
||||
ou = widgets.TextField(name="ou", label="Org Unit")
|
||||
businesscategory = widgets.TextField(name="businesscategory", label="Tags")
|
||||
description = widgets.TextField(name="description", label="Description")
|
||||
employeetype = widgets.TextField(name="employeetype", label="Employee Type")
|
||||
manager = widgets.TextField(name="manager", label="Manager")
|
||||
roomnumber = widgets.TextField(name="roomnumber", label="Room Number")
|
||||
secretary = widgets.TextField(name="secretary", label="Secretary")
|
||||
|
||||
carlicense = widgets.TextField(name="carlicense", label="Car License")
|
||||
labeleduri = widgets.TextField(name="labeleduri", label="Home Page")
|
||||
|
||||
nsAccountLock = widgets.SingleSelectField(name="nsAccountLock",
|
||||
label="Account Status",
|
||||
options = [("", "active"), ("true", "inactive")])
|
||||
@ -34,8 +64,6 @@ class UserNewValidator(validators.Schema):
|
||||
givenname = validators.String(not_empty=True)
|
||||
sn = validators.String(not_empty=True)
|
||||
mail = validators.Email(not_empty=True)
|
||||
# validators.PhoneNumber may be a bit too picky, requiring an area code
|
||||
# telephonenumber = validators.PlainText(not_empty=False)
|
||||
|
||||
chained_validators = [
|
||||
validators.FieldsMatch('userpassword', 'userpassword_confirm')
|
||||
@ -45,10 +73,9 @@ class UserNewValidator(validators.Schema):
|
||||
class UserNewForm(widgets.Form):
|
||||
params = ['user']
|
||||
|
||||
fields = [UserFields.uid, UserFields.givenname,
|
||||
UserFields.sn, UserFields.mail,
|
||||
UserFields.dn_to_info_json,
|
||||
]
|
||||
hidden_fields = [
|
||||
UserFields.dn_to_info_json,
|
||||
]
|
||||
|
||||
validator = UserNewValidator()
|
||||
|
||||
@ -59,10 +86,6 @@ class UserNewForm(widgets.Form):
|
||||
|
||||
def update_params(self, params):
|
||||
super(UserNewForm,self).update_params(params)
|
||||
params['has_foo'] = self.has_foo
|
||||
|
||||
def has_foo(self):
|
||||
return False
|
||||
|
||||
class UserEditValidator(validators.Schema):
|
||||
userpassword = validators.String(not_empty=False)
|
||||
@ -72,8 +95,6 @@ class UserEditValidator(validators.Schema):
|
||||
mail = validators.Email(not_empty=True)
|
||||
uidnumber = validators.Int(not_empty=False)
|
||||
gidnumber = validators.Int(not_empty=False)
|
||||
# validators.PhoneNumber may be a bit too picky, requiring an area code
|
||||
# telephonenumber = validators.PlainText(not_empty=False)
|
||||
|
||||
pre_validators = [
|
||||
validators.RequireIfPresent(required='uidnumber', present='editprotected'),
|
||||
@ -87,14 +108,13 @@ class UserEditValidator(validators.Schema):
|
||||
class UserEditForm(widgets.Form):
|
||||
params = ['user']
|
||||
|
||||
fields = [UserFields.givenname, UserFields.sn, UserFields.mail,
|
||||
UserFields.uid_hidden, UserFields.user_orig,
|
||||
UserFields.uidnumber, UserFields.gidnumber,
|
||||
UserFields.krbPasswordExpiration_hidden,
|
||||
UserFields.editprotected_hidden,
|
||||
UserFields.user_groups_data,
|
||||
UserFields.dn_to_info_json,
|
||||
]
|
||||
hidden_fields = [
|
||||
UserFields.uid_hidden, UserFields.user_orig,
|
||||
UserFields.krbPasswordExpiration_hidden,
|
||||
UserFields.editprotected_hidden,
|
||||
UserFields.user_groups_data,
|
||||
UserFields.dn_to_info_json,
|
||||
]
|
||||
|
||||
validator = UserEditValidator()
|
||||
|
||||
|
@ -32,17 +32,20 @@ from ipagui.helpers import ipahelper
|
||||
passwordConfirmField = document.getElementById('form_userpassword_confirm');
|
||||
uidnumberField = document.getElementById('form_uidnumber');
|
||||
gidnumberField = document.getElementById('form_gidnumber');
|
||||
homedirectoryField = document.getElementById('form_homedirectory');
|
||||
if (checkbox.checked) {
|
||||
passwordField.disabled = false;
|
||||
passwordConfirmField.disabled = false;
|
||||
uidnumberField.disabled = false;
|
||||
gidnumberField.disabled = false;
|
||||
homedirectoryField.disabled = false;
|
||||
$('form_editprotected').value = 'true';
|
||||
} else {
|
||||
passwordField.disabled = true;
|
||||
passwordConfirmField.disabled = true;
|
||||
uidnumberField.disabled = true;
|
||||
gidnumberField.disabled = true;
|
||||
homedirectoryField.disabled = true;
|
||||
$('form_editprotected').value = '';
|
||||
}
|
||||
}
|
||||
@ -74,6 +77,19 @@ from ipagui.helpers import ipahelper
|
||||
|
||||
<div class="formsection">Identity Details</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.title.field_id}"
|
||||
py:content="user.title.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.title.display(value_for(user.title))" />
|
||||
<span py:if="tg.errors.get('title')" class="fielderror"
|
||||
py:content="tg.errors.get('title')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.givenname.field_id}"
|
||||
@ -98,10 +114,60 @@ from ipagui.helpers import ipahelper
|
||||
py:content="tg.errors.get('sn')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.cn.field_id}"
|
||||
py:content="user.cn.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.cn.display(value_for(user.cn))" />
|
||||
<span py:if="tg.errors.get('cn')" class="fielderror"
|
||||
py:content="tg.errors.get('cn')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.displayname.field_id}"
|
||||
py:content="user.displayname.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.displayname.display(value_for(user.displayname))" />
|
||||
<span py:if="tg.errors.get('displayname')" class="fielderror"
|
||||
py:content="tg.errors.get('displayname')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.initials.field_id}"
|
||||
py:content="user.initials.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.initials.display(value_for(user.initials))" />
|
||||
<span py:if="tg.errors.get('initials')" class="fielderror"
|
||||
py:content="tg.errors.get('initials')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Account Details</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.nsAccountLock.field_id}"
|
||||
py:content="user.nsAccountLock.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.nsAccountLock.display(value_for(user.nsAccountLock))" />
|
||||
<span py:if="tg.errors.get('nsAccountLock')" class="fielderror"
|
||||
py:content="tg.errors.get('nsAccountLock')" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.uid.field_id}"
|
||||
@ -213,6 +279,49 @@ from ipagui.helpers import ipahelper
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.homedirectory.field_id}"
|
||||
py:content="user.homedirectory.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.homedirectory.display(
|
||||
value_for(user.homedirectory))" />
|
||||
<span py:if="tg.errors.get('homedirectory')" class="fielderror"
|
||||
py:content="tg.errors.get('homedirectory')" />
|
||||
|
||||
<script type="text/javascript">
|
||||
document.getElementById('form_homedirectory').disabled = true;
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.loginshell.field_id}"
|
||||
py:content="user.loginshell.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.loginshell.display(
|
||||
value_for(user.loginshell))" />
|
||||
<span py:if="tg.errors.get('loginshell')" class="fielderror"
|
||||
py:content="tg.errors.get('loginshell')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.gecos.field_id}"
|
||||
py:content="user.gecos.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.gecos.display(
|
||||
value_for(user.gecos))" />
|
||||
<span py:if="tg.errors.get('gecos')" class="fielderror"
|
||||
py:content="tg.errors.get('gecos')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Contact Details</div>
|
||||
@ -228,6 +337,7 @@ from ipagui.helpers import ipahelper
|
||||
py:content="tg.errors.get('mail')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.telephonenumber.field_id}"
|
||||
@ -239,23 +349,217 @@ from ipagui.helpers import ipahelper
|
||||
py:content="tg.errors.get('telephonenumber')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Account Status</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.nsAccountLock.field_id}"
|
||||
py:content="user.nsAccountLock.label" />:
|
||||
<label class="fieldlabel" for="${user.facsimiletelephonenumber.field_id}"
|
||||
py:content="user.facsimiletelephonenumber.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.nsAccountLock.display(value_for(user.nsAccountLock))" />
|
||||
<span py:if="tg.errors.get('nsAccountLock')" class="fielderror"
|
||||
py:content="tg.errors.get('nsAccountLock')" />
|
||||
<span py:replace="user.facsimiletelephonenumber.display(value_for(user.facsimiletelephonenumber))" />
|
||||
<span py:if="tg.errors.get('facsimiletelephonenumber')" class="fielderror"
|
||||
py:content="tg.errors.get('facsimiletelephonenumber')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.mobile.field_id}"
|
||||
py:content="user.mobile.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.mobile.display(value_for(user.mobile))" />
|
||||
<span py:if="tg.errors.get('mobile')" class="fielderror"
|
||||
py:content="tg.errors.get('mobile')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.pager.field_id}"
|
||||
py:content="user.pager.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.pager.display(value_for(user.pager))" />
|
||||
<span py:if="tg.errors.get('pager')" class="fielderror"
|
||||
py:content="tg.errors.get('pager')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.homephone.field_id}"
|
||||
py:content="user.homephone.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.homephone.display(value_for(user.homephone))" />
|
||||
<span py:if="tg.errors.get('homephone')" class="fielderror"
|
||||
py:content="tg.errors.get('homephone')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Mailing Address</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.street.field_id}"
|
||||
py:content="user.street.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.street.display(value_for(user.street))" />
|
||||
<span py:if="tg.errors.get('street')" class="fielderror"
|
||||
py:content="tg.errors.get('street')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.l.field_id}"
|
||||
py:content="user.l.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.l.display(value_for(user.l))" />
|
||||
<span py:if="tg.errors.get('l')" class="fielderror"
|
||||
py:content="tg.errors.get('l')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.st.field_id}"
|
||||
py:content="user.st.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.st.display(value_for(user.st))" />
|
||||
<span py:if="tg.errors.get('st')" class="fielderror"
|
||||
py:content="tg.errors.get('st')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.postalcode.field_id}"
|
||||
py:content="user.postalcode.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.postalcode.display(value_for(user.postalcode))" />
|
||||
<span py:if="tg.errors.get('postalcode')" class="fielderror"
|
||||
py:content="tg.errors.get('postalcode')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Employee Information</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.ou.field_id}"
|
||||
py:content="user.ou.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.ou.display(value_for(user.ou))" />
|
||||
<span py:if="tg.errors.get('ou')" class="fielderror"
|
||||
py:content="tg.errors.get('ou')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.businesscategory.field_id}"
|
||||
py:content="user.businesscategory.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.businesscategory.display(value_for(user.businesscategory))" />
|
||||
<span py:if="tg.errors.get('businesscategory')" class="fielderror"
|
||||
py:content="tg.errors.get('businesscategory')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.description.field_id}"
|
||||
py:content="user.description.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.description.display(value_for(user.description))" />
|
||||
<span py:if="tg.errors.get('description')" class="fielderror"
|
||||
py:content="tg.errors.get('description')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.employeetype.field_id}"
|
||||
py:content="user.employeetype.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.employeetype.display(value_for(user.employeetype))" />
|
||||
<span py:if="tg.errors.get('employeetype')" class="fielderror"
|
||||
py:content="tg.errors.get('employeetype')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.manager.field_id}"
|
||||
py:content="user.manager.label" />:
|
||||
</th>
|
||||
<td>
|
||||
TODO
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.roomnumber.field_id}"
|
||||
py:content="user.roomnumber.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.roomnumber.display(value_for(user.roomnumber))" />
|
||||
<span py:if="tg.errors.get('roomnumber')" class="fielderror"
|
||||
py:content="tg.errors.get('roomnumber')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.secretary.field_id}"
|
||||
py:content="user.secretary.label" />:
|
||||
</th>
|
||||
<td>
|
||||
TODO
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Misc Information</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.carlicense.field_id}"
|
||||
py:content="user.carlicense.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.carlicense.display(value_for(user.carlicense))" />
|
||||
<span py:if="tg.errors.get('carlicense')" class="fielderror"
|
||||
py:content="tg.errors.get('carlicense')" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.labeleduri.field_id}"
|
||||
py:content="user.labeleduri.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.labeleduri.display(value_for(user.labeleduri))" />
|
||||
<span py:if="tg.errors.get('labeleduri')" class="fielderror"
|
||||
py:content="tg.errors.get('labeleduri')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div>
|
||||
<div class="formsection">Groups</div>
|
||||
|
||||
|
@ -47,6 +47,19 @@ from ipagui.helpers import ipahelper
|
||||
|
||||
<div class="formsection">Identity Details</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.title.field_id}"
|
||||
py:content="user.title.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.title.display(value_for(user.title))" />
|
||||
<span py:if="tg.errors.get('title')" class="fielderror"
|
||||
py:content="tg.errors.get('title')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.givenname.field_id}"
|
||||
@ -70,17 +83,25 @@ from ipagui.helpers import ipahelper
|
||||
<span py:if="tg.errors.get('sn')" class="fielderror"
|
||||
py:content="tg.errors.get('sn')" />
|
||||
<script type="text/javascript">
|
||||
var uid_suggest = ""
|
||||
var mail_suggest = ""
|
||||
var uid_suggest = "";
|
||||
var mail_suggest = "";
|
||||
var cn_suggest = "";
|
||||
var displayname_suggest = "";
|
||||
var initials_suggest = "";
|
||||
|
||||
function autofill(self) {
|
||||
givenname = document.getElementById('form_givenname');
|
||||
sn = document.getElementById('form_sn');
|
||||
var givenname = $('form_givenname');
|
||||
var sn = $('form_sn');
|
||||
if ((givenname.value == "") || (sn.value == "")) {
|
||||
return;
|
||||
}
|
||||
uid = document.getElementById('form_uid');
|
||||
mail = document.getElementById('form_mail');
|
||||
|
||||
var uid = $('form_uid');
|
||||
var mail = $('form_mail');
|
||||
var cn = $('form_cn');
|
||||
var displayname = $('form_displayname');
|
||||
var initials = $('form_initials');
|
||||
|
||||
if ((uid.value == "") || (uid.value == uid_suggest)) {
|
||||
new Ajax.Request('${tg.url('/suggest_uid')}', {
|
||||
method: 'get',
|
||||
@ -92,6 +113,7 @@ from ipagui.helpers import ipahelper
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ((mail.value == "") || (mail.value == mail_suggest)) {
|
||||
new Ajax.Request('${tg.url('/suggest_email')}', {
|
||||
method: 'get',
|
||||
@ -103,16 +125,87 @@ from ipagui.helpers import ipahelper
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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 ((displayname.value == "") ||
|
||||
(displayname.value == displayname_suggest)) {
|
||||
initials.value = givenname.value[0] + sn.value[0];
|
||||
initials_suggest = initials.value;
|
||||
new Effect.Highlight(initials);
|
||||
}
|
||||
}
|
||||
document.getElementById('form_givenname').onchange = autofill
|
||||
document.getElementById('form_sn').onchange = autofill
|
||||
|
||||
document.getElementById('form_givenname').onchange = autofill;
|
||||
document.getElementById('form_sn').onchange = autofill;
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.cn.field_id}"
|
||||
py:content="user.cn.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.cn.display(value_for(user.cn))" />
|
||||
<span py:if="tg.errors.get('cn')" class="fielderror"
|
||||
py:content="tg.errors.get('cn')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.displayname.field_id}"
|
||||
py:content="user.displayname.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.displayname.display(value_for(user.displayname))" />
|
||||
<span py:if="tg.errors.get('displayname')" class="fielderror"
|
||||
py:content="tg.errors.get('displayname')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.initials.field_id}"
|
||||
py:content="user.initials.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.initials.display(value_for(user.initials))" />
|
||||
<span py:if="tg.errors.get('initials')" class="fielderror"
|
||||
py:content="tg.errors.get('initials')" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Account Details</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.nsAccountLock.field_id}"
|
||||
py:content="user.nsAccountLock.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.nsAccountLock.display(value_for(user.nsAccountLock))" />
|
||||
<span py:if="tg.errors.get('nsAccountLock')" class="fielderror"
|
||||
py:content="tg.errors.get('nsAccountLock')" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.uid.field_id}"
|
||||
@ -181,6 +274,42 @@ from ipagui.helpers import ipahelper
|
||||
Generated by server
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.homedirectory.field_id}"
|
||||
py:content="user.homedirectory.label" />:
|
||||
</th>
|
||||
<td>
|
||||
Generated by server
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.loginshell.field_id}"
|
||||
py:content="user.loginshell.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.loginshell.display(
|
||||
value_for(user.loginshell))" />
|
||||
<span py:if="tg.errors.get('loginshell')" class="fielderror"
|
||||
py:content="tg.errors.get('loginshell')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.gecos.field_id}"
|
||||
py:content="user.gecos.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.gecos.display(
|
||||
value_for(user.gecos))" />
|
||||
<span py:if="tg.errors.get('gecos')" class="fielderror"
|
||||
py:content="tg.errors.get('gecos')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Contact Details</div>
|
||||
@ -196,6 +325,7 @@ from ipagui.helpers import ipahelper
|
||||
py:content="tg.errors.get('mail')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.telephonenumber.field_id}"
|
||||
@ -207,19 +337,212 @@ from ipagui.helpers import ipahelper
|
||||
py:content="tg.errors.get('telephonenumber')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.facsimiletelephonenumber.field_id}"
|
||||
py:content="user.facsimiletelephonenumber.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.facsimiletelephonenumber.display(value_for(user.facsimiletelephonenumber))" />
|
||||
<span py:if="tg.errors.get('facsimiletelephonenumber')" class="fielderror"
|
||||
py:content="tg.errors.get('facsimiletelephonenumber')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.mobile.field_id}"
|
||||
py:content="user.mobile.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.mobile.display(value_for(user.mobile))" />
|
||||
<span py:if="tg.errors.get('mobile')" class="fielderror"
|
||||
py:content="tg.errors.get('mobile')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.pager.field_id}"
|
||||
py:content="user.pager.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.pager.display(value_for(user.pager))" />
|
||||
<span py:if="tg.errors.get('pager')" class="fielderror"
|
||||
py:content="tg.errors.get('pager')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.homephone.field_id}"
|
||||
py:content="user.homephone.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.homephone.display(value_for(user.homephone))" />
|
||||
<span py:if="tg.errors.get('homephone')" class="fielderror"
|
||||
py:content="tg.errors.get('homephone')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Account Status</div>
|
||||
<div class="formsection">Mailing Address</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.nsAccountLock.field_id}"
|
||||
py:content="user.nsAccountLock.label" />:
|
||||
<label class="fieldlabel" for="${user.street.field_id}"
|
||||
py:content="user.street.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.nsAccountLock.display(value_for(user.nsAccountLock))" />
|
||||
<span py:if="tg.errors.get('nsAccountLock')" class="fielderror"
|
||||
py:content="tg.errors.get('nsAccountLock')" />
|
||||
<span py:replace="user.street.display(value_for(user.street))" />
|
||||
<span py:if="tg.errors.get('street')" class="fielderror"
|
||||
py:content="tg.errors.get('street')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.l.field_id}"
|
||||
py:content="user.l.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.l.display(value_for(user.l))" />
|
||||
<span py:if="tg.errors.get('l')" class="fielderror"
|
||||
py:content="tg.errors.get('l')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.st.field_id}"
|
||||
py:content="user.st.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.st.display(value_for(user.st))" />
|
||||
<span py:if="tg.errors.get('st')" class="fielderror"
|
||||
py:content="tg.errors.get('st')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.postalcode.field_id}"
|
||||
py:content="user.postalcode.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.postalcode.display(value_for(user.postalcode))" />
|
||||
<span py:if="tg.errors.get('postalcode')" class="fielderror"
|
||||
py:content="tg.errors.get('postalcode')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Employee Information</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.ou.field_id}"
|
||||
py:content="user.ou.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.ou.display(value_for(user.ou))" />
|
||||
<span py:if="tg.errors.get('ou')" class="fielderror"
|
||||
py:content="tg.errors.get('ou')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.businesscategory.field_id}"
|
||||
py:content="user.businesscategory.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.businesscategory.display(value_for(user.businesscategory))" />
|
||||
<span py:if="tg.errors.get('businesscategory')" class="fielderror"
|
||||
py:content="tg.errors.get('businesscategory')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.description.field_id}"
|
||||
py:content="user.description.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.description.display(value_for(user.description))" />
|
||||
<span py:if="tg.errors.get('description')" class="fielderror"
|
||||
py:content="tg.errors.get('description')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.employeetype.field_id}"
|
||||
py:content="user.employeetype.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.employeetype.display(value_for(user.employeetype))" />
|
||||
<span py:if="tg.errors.get('employeetype')" class="fielderror"
|
||||
py:content="tg.errors.get('employeetype')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.manager.field_id}"
|
||||
py:content="user.manager.label" />:
|
||||
</th>
|
||||
<td>
|
||||
TODO
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.roomnumber.field_id}"
|
||||
py:content="user.roomnumber.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.roomnumber.display(value_for(user.roomnumber))" />
|
||||
<span py:if="tg.errors.get('roomnumber')" class="fielderror"
|
||||
py:content="tg.errors.get('roomnumber')" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.secretary.field_id}"
|
||||
py:content="user.secretary.label" />:
|
||||
</th>
|
||||
<td>
|
||||
TODO
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Misc Information</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.carlicense.field_id}"
|
||||
py:content="user.carlicense.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.carlicense.display(value_for(user.carlicense))" />
|
||||
<span py:if="tg.errors.get('carlicense')" class="fielderror"
|
||||
py:content="tg.errors.get('carlicense')" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" for="${user.labeleduri.field_id}"
|
||||
py:content="user.labeleduri.label" />:
|
||||
</th>
|
||||
<td>
|
||||
<span py:replace="user.labeleduri.display(value_for(user.labeleduri))" />
|
||||
<span py:if="tg.errors.get('labeleduri')" class="fielderror"
|
||||
py:content="tg.errors.get('labeleduri')" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -35,6 +35,12 @@ else:
|
||||
|
||||
<div class="formsection">Identity Details</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.title.label" />:
|
||||
</th>
|
||||
<td>${user.get("title")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.givenname.label" />:
|
||||
@ -47,10 +53,34 @@ else:
|
||||
</th>
|
||||
<td>${user.get("sn")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.cn.label" />:
|
||||
</th>
|
||||
<td>${user.get("cn")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.displayname.label" />:
|
||||
</th>
|
||||
<td>${user.get("displayname")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.initials.label" />:
|
||||
</th>
|
||||
<td>${user.get("initials")}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Account Details</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.nsAccountLock.label" />:
|
||||
</th>
|
||||
<td>${userhelper.account_status_display(user.get("nsAccountLock"))}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.uid.label" />:
|
||||
@ -69,6 +99,24 @@ else:
|
||||
</th>
|
||||
<td>${user.get("gidnumber")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.homedirectory.label" />:
|
||||
</th>
|
||||
<td>${user.get("homedirectory")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.loginshell.label" />:
|
||||
</th>
|
||||
<td>${user.get("loginshell")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.gecos.label" />:
|
||||
</th>
|
||||
<td>${user.get("gecos")}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Contact Details</div>
|
||||
@ -85,6 +133,86 @@ else:
|
||||
</th>
|
||||
<td>${user.get("telephonenumber")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.facsimiletelephonenumber.label" />:
|
||||
</th>
|
||||
<td>${user.get("facsimiletelephonenumber")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.mobile.label" />:
|
||||
</th>
|
||||
<td>${user.get("mobile")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.pager.label" />:
|
||||
</th>
|
||||
<td>${user.get("pager")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.homephone.label" />:
|
||||
</th>
|
||||
<td>${user.get("homephone")}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Mailing Address</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.street.label" />:
|
||||
</th>
|
||||
<td>${user.get("street")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.l.label" />:
|
||||
</th>
|
||||
<td>${user.get("l")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.st.label" />:
|
||||
</th>
|
||||
<td>${user.get("st")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.postalcode.label" />:
|
||||
</th>
|
||||
<td>${user.get("postalcode")}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Employee Information</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.ou.label" />:
|
||||
</th>
|
||||
<td>${user.get("ou")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.businesscategory.label" />:
|
||||
</th>
|
||||
<td>${user.get("businesscategory")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.description.label" />:
|
||||
</th>
|
||||
<td>${user.get("description")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.employeetype.label" />:
|
||||
</th>
|
||||
<td>${user.get("employeetype")}</td>
|
||||
</tr>
|
||||
<tr py:if='user_manager'>
|
||||
<th>
|
||||
Manager:
|
||||
@ -94,16 +222,34 @@ else:
|
||||
>${user_manager.givenname} ${user_manager.sn}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.roomnumber.label" />:
|
||||
</th>
|
||||
<td>${user.get("roomnumber")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.secretary.label" />:
|
||||
</th>
|
||||
<td>TODO</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection">Account Status</div>
|
||||
<div class="formsection">Misc Information</div>
|
||||
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.nsAccountLock.label" />:
|
||||
</th>
|
||||
<td>${userhelper.account_status_display(user.get("nsAccountLock"))}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.carlicense.label" />:
|
||||
</th>
|
||||
<td>${user.get("carlicense")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label class="fieldlabel" py:content="fields.labeleduri.label" />:
|
||||
</th>
|
||||
<td>${user.get("labeleduri")}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="formsection" py:if='len(user_reports) > 0'>Direct Reports</div>
|
||||
|
@ -352,7 +352,7 @@ class IPAServer:
|
||||
# Let us add in some missing attributes
|
||||
if user.get('homedirectory') is None:
|
||||
user['homedirectory'] = '/home/%s' % user.get('uid')
|
||||
if not user.get('gecos') is None:
|
||||
if user.get('gecos') is None:
|
||||
user['gecos'] = user['uid']
|
||||
|
||||
# FIXME: This can be removed once the DS plugin is installed
|
||||
|
Loading…
Reference in New Issue
Block a user