summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-gui/ipagui/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipa-gui/ipagui/templates')
-rw-r--r--ipa-server/ipa-gui/ipagui/templates/master.kid1
-rw-r--r--ipa-server/ipa-gui/ipagui/templates/usereditform.kid56
-rw-r--r--ipa-server/ipa-gui/ipagui/templates/usernewform.kid89
-rw-r--r--ipa-server/ipa-gui/ipagui/templates/usershow.kid30
4 files changed, 105 insertions, 71 deletions
diff --git a/ipa-server/ipa-gui/ipagui/templates/master.kid b/ipa-server/ipa-gui/ipagui/templates/master.kid
index 8e8d26551..2f39afc41 100644
--- a/ipa-server/ipa-gui/ipagui/templates/master.kid
+++ b/ipa-server/ipa-gui/ipagui/templates/master.kid
@@ -10,6 +10,7 @@
@import "${tg.url('/static/css/style.css')}";
</style>
<script type="text/javascript" charset="utf-8" src="${tg.url('/static/javascript/prototype.js')}"></script>
+ <script type="text/javascript" charset="utf-8" src="${tg.url('/static/javascript/scriptaculous.js?load=effects')}"></script>
</head>
<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
diff --git a/ipa-server/ipa-gui/ipagui/templates/usereditform.kid b/ipa-server/ipa-gui/ipagui/templates/usereditform.kid
index 771d94d49..cef7f116d 100644
--- a/ipa-server/ipa-gui/ipagui/templates/usereditform.kid
+++ b/ipa-server/ipa-gui/ipagui/templates/usereditform.kid
@@ -7,6 +7,34 @@
py:replace="field.display(value_for(field), **params_for(field))"
/>
+ <div class="formsection">Identity Details</div>
+ <table class="formtable" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <th>
+ <label class="fieldlabel" for="${user.givenname.field_id}"
+ py:content="user.givenname.label" />:
+ </th>
+ <td>
+ <span py:replace="user.givenname.display(value_for(user.givenname))" />
+ <span py:if="tg.errors.get('givenname')" class="fielderror"
+ py:content="tg.errors.get('givenname')" />
+
+ </td>
+ </tr>
+
+ <tr>
+ <th>
+ <label class="fieldlabel" for="${user.sn.field_id}"
+ py:content="user.sn.label" />:
+ </th>
+ <td>
+ <span py:replace="user.sn.display(value_for(user.sn))" />
+ <span py:if="tg.errors.get('sn')" class="fielderror"
+ py:content="tg.errors.get('sn')" />
+ </td>
+ </tr>
+ </table>
+
<div class="formsection">Account Details</div>
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
<tr>
@@ -85,34 +113,6 @@
</tr>
</table>
- <div class="formsection">Identity Details</div>
- <table class="formtable" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <th>
- <label class="fieldlabel" for="${user.givenname.field_id}"
- py:content="user.givenname.label" />:
- </th>
- <td>
- <span py:replace="user.givenname.display(value_for(user.givenname))" />
- <span py:if="tg.errors.get('givenname')" class="fielderror"
- py:content="tg.errors.get('givenname')" />
-
- </td>
- </tr>
-
- <tr>
- <th>
- <label class="fieldlabel" for="${user.sn.field_id}"
- py:content="user.sn.label" />:
- </th>
- <td>
- <span py:replace="user.sn.display(value_for(user.sn))" />
- <span py:if="tg.errors.get('sn')" class="fielderror"
- py:content="tg.errors.get('sn')" />
- </td>
- </tr>
- </table>
-
<div class="formsection">Contact Details</div>
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
<tr>
diff --git a/ipa-server/ipa-gui/ipagui/templates/usernewform.kid b/ipa-server/ipa-gui/ipagui/templates/usernewform.kid
index df5fd55fc..c766327f0 100644
--- a/ipa-server/ipa-gui/ipagui/templates/usernewform.kid
+++ b/ipa-server/ipa-gui/ipagui/templates/usernewform.kid
@@ -2,6 +2,67 @@
class="simpleroster">
<form action="${action}" name="${name}" method="${method}" class="tableform">
+ <div class="formsection">Identity Details</div>
+ <table class="formtable" cellpadding="2" cellspacing="0" border="0">
+ <tr>
+ <th>
+ <label class="fieldlabel" for="${user.givenname.field_id}"
+ py:content="user.givenname.label" />:
+ </th>
+ <td>
+ <span py:replace="user.givenname.display(value_for(user.givenname))" />
+ <span py:if="tg.errors.get('givenname')" class="fielderror"
+ py:content="tg.errors.get('givenname')" />
+
+ </td>
+ </tr>
+
+ <tr>
+ <th>
+ <label class="fieldlabel" for="${user.sn.field_id}"
+ py:content="user.sn.label" />:
+ </th>
+ <td>
+ <span py:replace="user.sn.display(value_for(user.sn))" />
+ <span py:if="tg.errors.get('sn')" class="fielderror"
+ py:content="tg.errors.get('sn')" />
+ <script type="text/javascript">
+ function autofill(self) {
+ givenname = document.getElementById('form_givenname');
+ sn = document.getElementById('form_sn');
+ if ((givenname.value == "") || (sn.value == "")) {
+ return;
+ }
+ uid = document.getElementById('form_uid');
+ mail = document.getElementById('form_mail');
+ if (uid.value == "") {
+ new Ajax.Request('${tg.url('/suggest_uid')}', {
+ method: 'get',
+ parameters: {'givenname': givenname.value, 'sn': sn.value},
+ onSuccess: function(transport) {
+ uid.value = transport.responseText;
+ new Effect.Highlight(uid);
+ }
+ });
+ }
+ if (mail.value == "") {
+ new Ajax.Request('${tg.url('/suggest_email')}', {
+ method: 'get',
+ parameters: {'givenname': givenname.value, 'sn': sn.value},
+ onSuccess: function(transport) {
+ mail.value = transport.responseText;
+ new Effect.Highlight(mail);
+ }
+ });
+ }
+ }
+ document.getElementById('form_givenname').onchange = autofill
+ document.getElementById('form_sn').onchange = autofill
+ </script>
+ </td>
+ </tr>
+ </table>
+
<div class="formsection">Account Details</div>
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
<tr>
@@ -63,34 +124,6 @@
</tr>
</table>
- <div class="formsection">Identity Details</div>
- <table class="formtable" cellpadding="2" cellspacing="0" border="0">
- <tr>
- <th>
- <label class="fieldlabel" for="${user.givenname.field_id}"
- py:content="user.givenname.label" />:
- </th>
- <td>
- <span py:replace="user.givenname.display(value_for(user.givenname))" />
- <span py:if="tg.errors.get('givenname')" class="fielderror"
- py:content="tg.errors.get('givenname')" />
-
- </td>
- </tr>
-
- <tr>
- <th>
- <label class="fieldlabel" for="${user.sn.field_id}"
- py:content="user.sn.label" />:
- </th>
- <td>
- <span py:replace="user.sn.display(value_for(user.sn))" />
- <span py:if="tg.errors.get('sn')" class="fielderror"
- py:content="tg.errors.get('sn')" />
- </td>
- </tr>
- </table>
-
<div class="formsection">Contact Details</div>
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
<tr>
diff --git a/ipa-server/ipa-gui/ipagui/templates/usershow.kid b/ipa-server/ipa-gui/ipagui/templates/usershow.kid
index c21ff12bb..2ffd1a4e9 100644
--- a/ipa-server/ipa-gui/ipagui/templates/usershow.kid
+++ b/ipa-server/ipa-gui/ipagui/templates/usershow.kid
@@ -8,41 +8,41 @@
<body>
<h2>View Person</h2>
- <div class="formsection">Account Details</div>
+ <div class="formsection">Identity Details</div>
<table class="formtable" cellpadding="2" cellspacing="0" border="0">
<tr>
<th>
- <label class="fieldlabel" py:content="fields.uid.label" />:
+ <label class="fieldlabel" py:content="fields.givenname.label" />:
</th>
- <td>${user.get("uid")}</td>
+ <td>${user.get("givenname")}</td>
</tr>
<tr>
<th>
- <label class="fieldlabel" py:content="fields.uidnumber.label" />:
+ <label class="fieldlabel" py:content="fields.sn.label" />:
</th>
- <td>${user.get("uidnumber")}</td>
+ <td>${user.get("sn")}</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.gidnumber.label" />:
+ <label class="fieldlabel" py:content="fields.uid.label" />:
</th>
- <td>${user.get("gidnumber")}</td>
+ <td>${user.get("uid")}</td>
</tr>
- </table>
-
- <div class="formsection">Identity Details</div>
- <table class="formtable" cellpadding="2" cellspacing="0" border="0">
<tr>
<th>
- <label class="fieldlabel" py:content="fields.givenname.label" />:
+ <label class="fieldlabel" py:content="fields.uidnumber.label" />:
</th>
- <td>${user.get("givenname")}</td>
+ <td>${user.get("uidnumber")}</td>
</tr>
<tr>
<th>
- <label class="fieldlabel" py:content="fields.sn.label" />:
+ <label class="fieldlabel" py:content="fields.gidnumber.label" />:
</th>
- <td>${user.get("sn")}</td>
+ <td>${user.get("gidnumber")}</td>
</tr>
</table>