Render an editor to for the contact details in a
TriPage
Documentation
This function is called by the edit templates to render the fields of the
TriPage that are to be edited
as part of the contact details. Most of the data is stored in the LDAP directory and not editable via TWiki. It
nevertheless gets displayed here for completeness.
Parameters
- SOURCE: topic for which we render a business details edito
Css
Implementation
%STARTINCLUDE%
~~~ <h2>Contact details</h2>
~~~ <style type="text/css">
~~~ @import url('%PUBURLPATH%/Applications/EmployeePortalApp/styles.css');
~~~ </style>
~~~ <script type="text/javascript" src="%PUBURL%/Applications/EmployeePortalApp/emp.js"></script>
~~~ <input type="hidden" name="ContactDetailsTimeStamp" value="%DISPLAYTIME{"$epoch"}%" />
~~~ <div class="empHolder empEditHolder">
~~~ <div class="empTabNavigation">
~~~ <ul>
~~~ <li id="tab1" class="empCurrentTab"><a href="javascript:toggleTab('tab1', 'cd')">
*~~ Contact Details</a>
*~~ </li>
~~~ <li id="tab2" ><a href="javascript:toggleTab('tab2', 'cd')">Help</a></li>
~~~ </ul>
~~~ </div>
~~~ <table class="empBox empTopBox" cellspacing="0" cellpadding="0" border="0">
~~~ <tr>
~~~ <td class="empBoxTopLeft" colspan="2"> </td>
~~~ <td class="empBoxTopRight" colspan="2"> </td>
~~~ </tr>
~~~ <tr>
~~~ <td class="empBoxLeft"> </td>
~~~ <td class="empBoxContent" colspan="2">
~~~ <noautolink>
~~~ <div class="empContactDetails" id="cd">
~~~ <div>
~~~ <div style="float:right">
~~~ <span class="empEditPhoto"><img id="photo" src="" alt="photo"></span>
~~~ </div>
~~~ <table class="empDetailsTable" cellspacing="0" cellpadding="0" border="0">
%~~ LDAP{"(uid=%USERINFO{"%FORMFIELD{"WikiName" topic="%SOURCE%"}%" format="$username"}%)"
~~~ format="
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">First name</th>
~~~ <td>$givenName</td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Last name</th>
~~~ <td>$sn</td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">EMail</th>
~~~ <td>$mail</td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Telephone</th>
~~~ <td>
~~~ $percntIFDEFINED{\"$telephoneNumber\"
~~~ as=\"^\$[t]elephoneNumber$\"
~~~ then=\" \"
~~~ else=\"$test\"
~~~ glue=\"off\"
~~~ }$percnt
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Mobile</th>
~~~ <td>
~~~ $percntIFDEFINED{\"$mobile\"
~~~ as=\"^\$[m]obile$\"
~~~ then=\" \"
~~~ else=\"$test\"
~~~ glue=\"off\"
~~~ }$percnt
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Telephone (private)</th>
~~~ <td>
~~~ $percntIFDEFINED{\"$homePhone\"
~~~ as=\"^\$[h]omePhone$\"
~~~ then=\" \"
~~~ else=\"$test\"
~~~ glue=\"off\"
~~~ }$percnt
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Department</th>
~~~ <td>
~~~ $percntIFDEFINED{\"$ou\"
~~~ as=\"^\$[o]u$\"
~~~ then=\" \"
~~~ else=\"$test\"
~~~ glue=\"off\"
~~~ }$percnt
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Location</th>
~~~ <td>
~~~ $percntIFDEFINED{\"$l\"
~~~ as=\"^\$[l]$\"
~~~ then=\" \"
~~~ else=\"$test\"
~~~ glue=\"off\"
~~~ }$percnt
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Address</th>
~~~ <td>
~~~ $percntIFDEFINED{\"$homePostalAddress\"
~~~ as=\"^\$[h]omePostalAddress$\"
~~~ then=\" \"
~~~ else=\"$test\"
~~~ glue=\"off\"
~~~ }$percnt
~~~ </td>
~~~ </tr>
~~~ "
~~~ }%
~~~
%~~ DBQUERY{topic="%SOURCE%"
~~~ format="
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Photo</th>
~~~ <td>
~~~ <input type=\"text\" size=\"30\" id=\"photoUrl\" name=\"Photo\"
~~~ value=\"$percntENCODE{\"$formfield(Photo)\" type=\"entity\"}$percnt\"
~~~ onblur=\"document.getElementById('photo').src=this.value;\"
~~~ />
~~~ <script type=\"text/javascript\">
~~~ addLoadEvent(function () {document.getElementById('photo').src = document.getElementById('photoUrl').value;});
~~~ </script>
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Instant messaging</th>
~~~ <td>
~~~ <input type=\"text\" size=\"30\" name=\"InstantMessaging\"
~~~ value=\"$percntENCODE{\"$formfield(InstantMessaging)\" type=\"entity\"}$percnt\" />
~~~ </td>
~~~ </tr>
~~~ <tr>
~~~ <th class=\"empTableFirstCol\">Previous Companies</th>
~~~ <td>
~~~ <textarea cols=\"75\" rows=\"5\" name=\"PreviousCompanies\">$n
*~~ $formfield(PreviousCompanies)
*~~ </textarea>
~~~ </td>
~~~ </tr>
~~~ "
~~~ }%
~~~ </table>
~~~ </div>
~~~ <div style="display:none">
~~~ <!-- -->%DBCALL{"Applications.EmployeePortalApp.TriPageHelp" section="contactdetails"}%
~~~ </div>
~~~ </div>
~~~ </noautolink>
~~~ </td>
~~~ <td class="empBoxRight"> </td>
~~~ </tr>
~~~ <tr>
~~~ <td class="empBoxBottomLeft" colspan="2"> </td>
~~~ <td class="empBoxBottomRight" colspan="2"> </td>
~~~ </tr>
~~~ </table></div>
~~~
%STOPINCLUDE%
Test
Calls to 'RenderTvdContactDetailsEditor'
Copyright
© 2007 Michael Daum
http://wikiring.de
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read the
LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.