Hi,

I recently switched to PLA 1.2.0.5 and I have updated my config.php
file. Everything seems to works fine with the default templates. I want
to use a customized template as I have a local.schema containing locally
defined structural classes and attributes.


The creation template is ok but I have two problems with my modification
template (I have attached both) :

- when editing an entry, the userPassword attribute has two fields in my
template and only one in the default one. This is a problem because when
I want to validate the modifications, the confirmation form wrongly
display "userPassword / [attribute doesn't exist] / New value".

- when validating the changes for an entry, the validation form shows
the attribute "objectClass" and wants to change it from the old value
"myClass + top" to a new value "myClass" -stripping top-. This doesn't
happen when using the default template.


Can anyone tell me how to get the default template behavior ? I have not
been able to find the default template in the /usr/share/phpldapadmin/*
directories ; I guess it is not in a xml file but coded in the php code ?

Thanks for any help.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE template SYSTEM "template.dtd">

<template>
  <askcontainer>0</askcontainer>
  <description>Ajouter un membre</description>
  <icon>user_add.png</icon>
  <invalid>0</invalid>
  <rdn>uid</rdn>
  <regexp>^ou=personnes</regexp>
  <title>Ajouter un membre</title>
  <visible>1</visible>

  <objectClasses>
    <objectClass id="iremLillePerson"></objectClass>
  </objectClasses>

  <attributes>
    <attribute id="givenName">
      <display>Prénom</display>
      <onchange>=autoFill(cn;%givenName% %sn%)</onchange>
      <onchange>=autoFill(uid;%givenName/l%.%sn/l%)</onchange>
      <order>1</order>
      <page>1</page>
    </attribute>
    <attribute id="sn">
      <display>Nom de famille</display>
      <onchange>=autoFill(cn;%givenName% %sn%)</onchange>
      <onchange>=autoFill(uid;%givenName/l%.%sn/l%)</onchange>
      <order>2</order>
      <page>1</page>
    </attribute>
    <attribute id="cn">
      <display>Nom complet</display>
      <order>3</order>
      <page>1</page>
      <spacer>1</spacer>
    </attribute>
    <attribute id="employeeType">
      <display>Fonction</display>
      <default>inactif</default>
      <type>select</type>
      <value id="animateur">animateur</value>
      <value id="secrétaire">secrétaire</value>
      <value id="directeur-adjoint">directeur-adjoint</value>
      <value id="directeur">directeur</value>
      <value id="inactif">inactif</value>
      <order>4</order>
      <page>1</page>
    </attribute>
    <attribute id="groupesTravail">
      <display>Groupes de travail</display>
      <value><![CDATA[=php.MultiList(/;(&(objectClass=posixGroup));gidNumber;%cn%)]]></value>
      <order>5</order>
      <page>1</page>
      <spacer>1</spacer>
    </attribute>
    <attribute id="uid">
      <display>Identifiant</display>
      <icon>ldap-user.png</icon>
      <order>6</order>
      <page>1</page>
    </attribute>
    <attribute id="userPassword">
      <display>Mot de passe</display>
      <icon>lock.png</icon>
      <type>password</type>
      <verify>1</verify>
      <post><![CDATA[=php.PasswordEncrypt(sha;%userPassword%)]]></post>
      <order>7</order>
      <page>1</page>
    </attribute>

    <attribute id="postalAddress">
      <display>Adresse établissement</display>
      <icon>home.png</icon>
      <type>textarea</type>
      <cols>50</cols>
      <rows>4</rows>
      <order>1</order>
      <page>2</page>
    </attribute>
    <attribute id="telephoneNumber">
      <display>Téléphone établissement</display>
      <order>2</order>
      <page>2</page>
    </attribute>
    <attribute id="facsimileTelephoneNumber">
      <display>Fax établissement</display>
      <order>3</order>
      <page>2</page>
      <spacer>1</spacer>
    </attribute>
    <attribute id="mail">
      <display>Mèl professionnel</display>
      <icon>mail.png</icon>
      <order>4</order>
      <page>2</page>
    </attribute>
    <attribute id="grade">
      <display>Grade</display>
      <default>autre</default>
      <type>select</type>
      <value id="certCN">certifié CN</value>
      <value id="certHC">certifié HC</value>
      <value id="agregCN">agrégé CN</value>
      <value id="agregHC">agrégé HC</value>
      <value id="autre">autre</value>
      <order>5</order>
      <page>2</page>
    </attribute>

    <attribute id="homepostalAddress">
      <display>Adresse</display>
      <icon>home.png</icon>
      <type>textarea</type>
      <cols>50</cols>
      <rows>4</rows>
      <order>1</order>
      <page>3</page>
    </attribute>
    <attribute id="homePhone">
      <display>Téléphone</display>
      <order>2</order>
      <page>3</page>
    </attribute>
    <attribute id="mobile">
      <display>Portable</display>
      <icon>phone.png</icon>
      <order>3</order>
      <page>3</page>
    </attribute>
    <attribute id="homeMail">
      <display>Mèl</display>
      <icon>mail_account.png</icon>
      <order>4</order>
      <page>3</page>
    </attribute>
    <attribute id="jpegPhoto">
      <display>Photo</display>
      <order>5</order>
      <page>3</page>
    </attribute>
  </attributes>

</template>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE template SYSTEM "template.dtd">

<template>
  <askcontainer>0</askcontainer>
  <description>Modifier un membre</description>
  <icon>user_edit.png</icon>
  <invalid>0</invalid>
  <noleaf>1</noleaf>
  <rdn>uid</rdn>
  <regexp>^uid=.*,ou=personnes</regexp>
  <title>Modifier un membre</title>
  <visible>1</visible>

  <objectClasses>
    <objectClass id="iremLillePerson"></objectClass>
  </objectClasses>

  <attributes>
    <attribute id="uid">
      <display>Identifiant</display>
      <icon>ldap-user.png</icon>
      <order>1</order>
    </attribute>
    <attribute id="givenName">
      <display>Prénom</display>
      <onchange>=autoFill(cn;%givenName% %sn%)</onchange>
      <onchange>=autoFill(uid;%givenName/l%.%sn/l%)</onchange>
      <order>2</order>
    </attribute>
    <attribute id="sn">
      <display>Nom de famille</display>
      <onchange>=autoFill(cn;%givenName% %sn%)</onchange>
      <onchange>=autoFill(uid;%givenName/l%.%sn/l%)</onchange>
      <order>3</order>
    </attribute>
    <attribute id="cn">
      <display>Nom complet</display>
      <order>4</order>
    </attribute>
    <attribute id="employeeType">
      <display>Fonction</display>
      <default>inactif</default>
      <type>select</type>
      <value id="animateur">animateur</value>
      <value id="secrétaire">secrétaire</value>
      <value id="directeur-adjoint">directeur-adjoint</value>
      <value id="directeur">directeur</value>
      <value id="inactif">inactif</value>
      <order>5</order>
    </attribute>
    <attribute id="groupesTravail">
      <display>Groupes de travail</display>
      <value><![CDATA[=php.MultiList(/;(&(objectClass=posixGroup));gidNumber;%cn%)]]></value>
      <order>6</order>
    </attribute>
    <attribute id="userPassword">
      <display>Mot de passe</display>
      <icon>lock.png</icon>
      <type>password</type>
      <verify>1</verify>
      <post><![CDATA[=php.PasswordEncrypt(sha;%userPassword%)]]></post>
      <order>7</order>
      <spacer>1</spacer>
    </attribute>

    <attribute id="postalAddress">
      <display>Adresse établissement</display>
      <icon>home.png</icon>
      <type>textarea</type>
      <cols>50</cols>
      <rows>4</rows>
      <order>8</order>
    </attribute>
    <attribute id="telephoneNumber">
      <display>Téléphone établissement</display>
      <order>9</order>
    </attribute>
    <attribute id="facsimileTelephoneNumber">
      <display>Fax établissement</display>
      <order>10</order>
    </attribute>
    <attribute id="mail">
      <display>Mèl professionnel</display>
      <icon>mail.png</icon>
      <order>11</order>
    </attribute>
    <attribute id="grade">
      <display>Grade</display>
      <type>select</type>
      <value id="certCN">certifié CN</value>
      <value id="certHC">certifié HC</value>
      <value id="agregCN">agrégé CN</value>
      <value id="agregHC">agrégé HC</value>
      <value id="autre">autre</value>
      <order>12</order>
      <spacer>1</spacer>
    </attribute>

    <attribute id="homepostalAddress">
      <display>Adresse</display>
      <icon>home.png</icon>
      <type>textarea</type>
      <cols>50</cols>
      <rows>4</rows>
      <order>13</order>
    </attribute>
    <attribute id="homePhone">
      <display>Téléphone</display>
      <order>14</order>
    </attribute>
    <attribute id="mobile">
      <display>Portable</display>
      <icon>phone.png</icon>
      <order>15</order>
    </attribute>
    <attribute id="homeMail">
      <display>Mèl</display>
      <icon>mail_account.png</icon>
      <order>16</order>
    </attribute>
    <attribute id="jpegPhoto">
      <display>Photo</display>
      <order>17</order>
    </attribute>
  </attributes>

</template>

<<attachment: fabrice_eudes.vcf>>

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
phpldapadmin-users mailing list
phpldapadmin-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpldapadmin-users

Reply via email to