From af0fef71196fd78df989fe06a08bf4455d5fd3c9 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 31 Jul 2008 09:16:25 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSrelation=20:=20=20=20->=20Les=20noms=20de?= =?UTF-8?q?s=20objets=20sont=20maintenant=20cliquable=20et=20nous=20emm?= =?UTF-8?q?=C3=A8nent=20sur=20la=20=20=20fiche=20de=20l'objet=20correspond?= =?UTF-8?q?ant=20-=20LSformElement=5Fselect=5Fobject=20:=20=20=20->=20Les?= =?UTF-8?q?=20noms=20des=20objets=20sont=20maintenant=20cliquable=20et=20n?= =?UTF-8?q?ous=20emm=C3=A8nent=20sur=20la=20=20=20fiche=20de=20l'objet=20c?= =?UTF-8?q?orrespondant=20-=20LSformElement=20:=20=20=20->=20Ajout=20de=20?= =?UTF-8?q?deux=20types=20d'=C3=A9lements=20de=20formulaire=20:=20=20=20?= =?UTF-8?q?=20=20->=20LSformElement=5Fmail=20:=20Adresse=20mail=20=20=20?= =?UTF-8?q?=20=20->=20LSformElement=5Fxmpp=20:=20Adresse=20xmpp=20-=20LSat?= =?UTF-8?q?tribute=20:=20=20=20->=20uniformisation=20des=20donn=C3=A9es=20?= =?UTF-8?q?des=20attributs=20(tous=20des=20array())=20=20=20=20=20->=20mod?= =?UTF-8?q?ifications=20des=20m=C3=A9thodes=20loadData()=20&=20reloadData(?= =?UTF-8?q?)=20=20=20->=20Correction=20des=20bugs=20induits=20par=20cette?= =?UTF-8?q?=20modification=20:=20=20=20=20=20-=20trunk/includes/class/clas?= =?UTF-8?q?s.LSattr=5Fhtml=5Fselect=5Flist.php=20=20=20=20=20-=20trunk/inc?= =?UTF-8?q?ludes/class/class.LSldapObject.php=20=20=20=20=20-=20trunk/incl?= =?UTF-8?q?udes/class/class.LSattr=5Fhtml=5Fselect=5Fobject.php=20=20=20?= =?UTF-8?q?=20=20-=20trunk/includes/class/class.LSattr=5Fldap=5Fdate.php?= =?UTF-8?q?=20=20=20=20=20-=20trunk/includes/class/class.LSsession.php=20?= =?UTF-8?q?=20=20=20=20-=20trunk/includes/addons/LSaddons.samba.php=20=20?= =?UTF-8?q?=20->=20Correction=20d'un=20bug=20concernant=20le=20refresh=20d?= =?UTF-8?q?es=20formulaires=20(#1695)=20=20=20=20=20->=20modification=20de?= =?UTF-8?q?=20la=20m=C3=A9thode=20refreshForm()=20-=20LSsession=20:=20Corr?= =?UTF-8?q?ection=20d'un=20bug=20d'affichage=20du=20nom=20de=20l'utilisate?= =?UTF-8?q?ur=20connect=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LSobjects/config.LSobjects.LSeepeople.php | 2 +- trunk/includes/addons/LSaddons.samba.php | 5 +- .../includes/class/class.LSattr_html_mail.php | 53 +++++++++++ .../class/class.LSattr_html_select_list.php | 3 +- .../class/class.LSattr_html_select_object.php | 8 +- .../includes/class/class.LSattr_html_xmpp.php | 53 +++++++++++ .../includes/class/class.LSattr_ldap_date.php | 15 ++- trunk/includes/class/class.LSattribute.php | 8 +- .../class/class.LSformElement_date.php | 1 - .../class/class.LSformElement_mail.php | 87 ++++++++++++++++++ .../class.LSformElement_select_object.php | 4 +- .../class/class.LSformElement_xmpp.php | 87 ++++++++++++++++++ trunk/includes/class/class.LSldapObject.php | 3 +- trunk/includes/class/class.LSsession.php | 11 ++- trunk/includes/js/LSformElement_mail.js | 34 +++++++ trunk/includes/js/LSformElement_xmpp.js | 34 +++++++ trunk/index_ajax.php | 2 +- trunk/templates/LSrelations.tpl | 2 +- trunk/templates/css/LSform.css | 2 +- trunk/templates/css/LSrelation.css | 6 ++ trunk/templates/images/mail.png | Bin 0 -> 641 bytes trunk/templates/images/xmpp.png | Bin 0 -> 743 bytes trunk/view.php | 5 +- 23 files changed, 402 insertions(+), 23 deletions(-) create mode 100644 trunk/includes/class/class.LSattr_html_mail.php create mode 100644 trunk/includes/class/class.LSattr_html_xmpp.php create mode 100644 trunk/includes/class/class.LSformElement_mail.php create mode 100644 trunk/includes/class/class.LSformElement_xmpp.php create mode 100644 trunk/includes/js/LSformElement_mail.js create mode 100644 trunk/includes/js/LSformElement_xmpp.js create mode 100644 trunk/templates/images/mail.png create mode 100644 trunk/templates/images/xmpp.png diff --git a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php index a5f7ba7e..a3ec1ae4 100644 --- a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php +++ b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php @@ -256,7 +256,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'mail' => array ( 'label' => _('Adresse e-mail'), 'ldap_type' => 'ascii', - 'html_type' => 'text', + 'html_type' => 'mail', 'html_options' => array( 'generate_value_format' => '%{uid}@ls.com', 'autoGenerateOnModify' => true diff --git a/trunk/includes/addons/LSaddons.samba.php b/trunk/includes/addons/LSaddons.samba.php index f9ae5d0e..e7244070 100644 --- a/trunk/includes/addons/LSaddons.samba.php +++ b/trunk/includes/addons/LSaddons.samba.php @@ -163,8 +163,9 @@ $GLOBALS['LSerror'] -> addErrorCode('SAMBA_02',array('dependency' => LS_SAMBA_GIDNUMBER_ATTR, 'attr' => 'sambaPrimaryGroupSID')); return; } - - $gidNumber = $ldapObject -> attrs[ LS_SAMBA_GIDNUMBER_ATTR ] -> getValue() * 2 + LS_SAMBA_SID_BASE_GROUP; + + $gidNumber = $ldapObject -> attrs[ LS_SAMBA_GIDNUMBER_ATTR ] -> getValue(); + $gidNumber = $gidNumber[0] * 2 + LS_SAMBA_SID_BASE_GROUP; $sambaPrimaryGroupSID = LS_SAMBA_DOMAIN_SID . '-' . $gidNumber; return ($sambaPrimaryGroupSID); diff --git a/trunk/includes/class/class.LSattr_html_mail.php b/trunk/includes/class/class.LSattr_html_mail.php new file mode 100644 index 00000000..b8a6251f --- /dev/null +++ b/trunk/includes/class/class.LSattr_html_mail.php @@ -0,0 +1,53 @@ + + */ +class LSattr_html_mail extends LSattr_html { + + /** + * Ajoute l'attribut au formualaire passer en paramètre + * + * @param[in] &$form LSform Le formulaire + * @param[in] $idForm L'identifiant du formulaire + * @param[in] $data Valeur du champs du formulaire + * + * @retval LSformElement L'element du formulaire ajouté + */ + function addToForm (&$form,$idForm,$data=NULL) { + $element=$form -> addElement('mail', $this -> name, $this -> config['label'],$this -> config, $this); + if(!$element) { + $GLOBALS['LSerror'] -> addErrorCode(206,$this -> name); + return; + } + if ($data) { + $element -> setValue($data); + } + return $element; + } + +} + +?> diff --git a/trunk/includes/class/class.LSattr_html_select_list.php b/trunk/includes/class/class.LSattr_html_select_list.php index 34944fc3..c82859e2 100644 --- a/trunk/includes/class/class.LSattr_html_select_list.php +++ b/trunk/includes/class/class.LSattr_html_select_list.php @@ -103,7 +103,8 @@ class LSattr_html_select_list extends LSattr_html{ } else { for($i=0;$i attrs[$val['value_attribute']] -> getValue()]=$list[$i] -> getDisplayValue($val['display_attribute']); + $key = $list[$i] -> attrs[$val['value_attribute']] -> getValue(); + $retInfos[$key[0]]=$list[$i] -> getDisplayValue($val['display_attribute']); } } } diff --git a/trunk/includes/class/class.LSattr_html_select_object.php b/trunk/includes/class/class.LSattr_html_select_object.php index 195d4f05..06877518 100644 --- a/trunk/includes/class/class.LSattr_html_select_object.php +++ b/trunk/includes/class/class.LSattr_html_select_object.php @@ -114,7 +114,9 @@ class LSattr_html_select_object extends LSattr_html{ } else { for($i=0;$i attrs[$val['value_attribute']] -> getValue()]=$list[$i] -> getDisplayValue($conf['display_attribute']); + $key = $val['value_attribute'] -> getValue(); + $key = $key[0]; + $retInfos[$list[$i] -> attrs[$key]]=$list[$i] -> getDisplayValue($conf['display_attribute']); $DNs[]=$list[$i] -> dn; } } @@ -156,7 +158,9 @@ class LSattr_html_select_object extends LSattr_html{ $retInfos[$obj -> dn]=$obj -> getDisplayValue($conf['display_attribute']); } else { - $retInfos[$obj -> attrs[$val['value_attribute']] -> getValue()]=$obj -> getDisplayValue($conf['display_attribute']); + $key = $val['value_attribute'] -> getValue(); + $key = $key[0]; + $retInfos[$obj -> attrs[$key]]=$obj -> getDisplayValue($conf['display_attribute']); } $DNs[]=$dn; } diff --git a/trunk/includes/class/class.LSattr_html_xmpp.php b/trunk/includes/class/class.LSattr_html_xmpp.php new file mode 100644 index 00000000..b14b256c --- /dev/null +++ b/trunk/includes/class/class.LSattr_html_xmpp.php @@ -0,0 +1,53 @@ + + */ +class LSattr_html_xmpp extends LSattr_html { + + /** + * Ajoute l'attribut au formualaire passer en paramètre + * + * @param[in] &$form LSform Le formulaire + * @param[in] $idForm L'identifiant du formulaire + * @param[in] $data Valeur du champs du formulaire + * + * @retval LSformElement L'element du formulaire ajouté + */ + function addToForm (&$form,$idForm,$data=NULL) { + $element=$form -> addElement('xmpp', $this -> name, $this -> config['label'],$this -> config, $this); + if(!$element) { + $GLOBALS['LSerror'] -> addErrorCode(206,$this -> name); + return; + } + if ($data) { + $element -> setValue($data); + } + return $element; + } + +} + +?> diff --git a/trunk/includes/class/class.LSattr_ldap_date.php b/trunk/includes/class/class.LSattr_ldap_date.php index 2594a8a9..db6f09bb 100644 --- a/trunk/includes/class/class.LSattr_ldap_date.php +++ b/trunk/includes/class/class.LSattr_ldap_date.php @@ -34,12 +34,17 @@ class LSattr_ldap_date extends LSattr_ldap { * @retval mixed La valeur d'affichage de l'attribut */ function getDisplayValue($data) { - $date = strptime($data,$this -> getFormat()); - if (is_array($date)) { - return mktime($date['tm_hour'],$date['tm_min'],$date['tm_sec'],$date['tm_mon']+1,$date['tm_mday'],$date['tm_year']+1900); + if(!is_array($data)) { + $data=array($data); } - else - return; + $retval=array(); + foreach($data as $val) { + $date = strptime($val,$this -> getFormat()); + if (is_array($date)) { + $retval[] = mktime($date['tm_hour'],$date['tm_min'],$date['tm_sec'],$date['tm_mon']+1,$date['tm_mday'],$date['tm_year']+1900); + } + } + return $retval; } /** diff --git a/trunk/includes/class/class.LSattribute.php b/trunk/includes/class/class.LSattribute.php index 903eefc8..4377f1e1 100644 --- a/trunk/includes/class/class.LSattribute.php +++ b/trunk/includes/class/class.LSattribute.php @@ -100,6 +100,9 @@ class LSattribute { * @retval boolean true */ function loadData($attr_data) { + if ((!is_array($attr_data))&&(!empty($attr_data))) { + $attr_data = array($attr_data); + } $this -> data = $attr_data; return true; } @@ -112,6 +115,9 @@ class LSattribute { * @retval boolean true */ function reloadData($attr_data) { + if ((!is_array($attr_data))&&(!empty($attr_data))) { + $attr_data = array($attr_data); + } $this -> data = $attr_data; $this -> updateData=false; $this -> is_validate=false; @@ -315,7 +321,7 @@ class LSattribute { * @retval boolean true si la valeur a été rafraichie ou que ce n'est pas nécessaire, false sinon */ function refreshForm(&$form,$idForm) { - if(isset($this -> config['form'][$idForm]) && ($this -> myRights()=='w')) { + if(isset($this -> config['form'][$idForm])) { $form_element = $form -> getElement($this -> name); $values = $this -> html -> refreshForm($this -> getFormVal()); return $form_element -> setValue($values); diff --git a/trunk/includes/class/class.LSformElement_date.php b/trunk/includes/class/class.LSformElement_date.php index 8f78e66e..f793b216 100644 --- a/trunk/includes/class/class.LSformElement_date.php +++ b/trunk/includes/class/class.LSformElement_date.php @@ -149,7 +149,6 @@ class LSformElement_date extends LSformElement { $GLOBALS['LSsession'] -> addJSscript('calendar-en.js',LS_LIB_DIR.'jscalendar/lang/'); $codeLang = strtolower($GLOBALS['LSconfig']['lang'][0].$GLOBALS['LSconfig']['lang'][1]); $GLOBALS['LSsession'] -> addJSscript('calendar-'.$codeLang.'.js',LS_LIB_DIR.'jscalendar/lang/'); - //$GLOBALS['LSsession'] -> addJSscript('calendar-setup.js',LS_LIB_DIR.'jscalendar/'); $GLOBALS['LSsession'] -> addJSscript('LSformElement_date_field.js'); $GLOBALS['LSsession'] -> addJSscript('LSformElement_date.js'); } diff --git a/trunk/includes/class/class.LSformElement_mail.php b/trunk/includes/class/class.LSformElement_mail.php new file mode 100644 index 00000000..ae88fd96 --- /dev/null +++ b/trunk/includes/class/class.LSformElement_mail.php @@ -0,0 +1,87 @@ + + */ + +class LSformElement_mail extends LSformElement { + + /** + * Retourne les infos d'affichage de l'élément + * + * Cette méthode retourne les informations d'affichage de l'élement + * + * @retval array + */ + function getDisplay(){ + $return = $this -> getLabelInfos(); + // value + if (!$this -> isFreeze()) { + $return['html'] = "
    \n"; + if (empty($this -> values)) { + $return['html'] .= "
  • ".$this -> getEmptyField()."
  • \n"; + } + else { + foreach ($this -> values as $value) { + $multiple = $this -> getMultipleData(); + $id = "LSform_".$this -> name."_".rand(); + $return['html'] .= "
  • "._(".$multiple."
  • \n"; + } + } + $return['html'] .= "
\n"; + $GLOBALS['LSsession'] -> addJSscript('LSformElement_mail.js'); + } + else { + $return['html'] = "
    \n"; + if (empty($this -> values)) { + $return['html'] .= "
  • "._('Aucune valeur definie')."
  • \n"; + } + else { + foreach ($this -> values as $value) { + $return['html'] .= "
  • ".$value.""._(
  • \n"; + $GLOBALS['LSsession'] -> addJSscript('LSformElement_mail.js'); + } + } + $return['html'] .= "
\n"; + } + return $return; + } + + /** + * Retourne le code HTML d'un champ vide + * + * @retval string Code HTML d'un champ vide. + */ + function getEmptyField() { + $multiple = $this -> getMultipleData(); + return ""._(".$multiple; + } +} + +?> diff --git a/trunk/includes/class/class.LSformElement_select_object.php b/trunk/includes/class/class.LSformElement_select_object.php index eebaf6ec..21753e24 100644 --- a/trunk/includes/class/class.LSformElement_select_object.php +++ b/trunk/includes/class/class.LSformElement_select_object.php @@ -50,7 +50,7 @@ class LSformElement_select_object extends LSformElement { if (!$this -> isFreeze()) { $addBtn="
  • - "._('Modifier')."\n + "._('Modifier')."\n \n
  • \n"; $delete=" "._("; @@ -65,7 +65,7 @@ class LSformElement_select_object extends LSformElement { $return['html']="
      \n"; $return['html'].=$addBtn; foreach ($this -> values as $value => $txt) { - $return['html'].="
    • ".$txt."$delete
    • \n"; + $return['html'].="
    • ".$txt."$delete
    • \n"; } $return['html'].="
    \n"; if (!$this -> isFreeze()) { diff --git a/trunk/includes/class/class.LSformElement_xmpp.php b/trunk/includes/class/class.LSformElement_xmpp.php new file mode 100644 index 00000000..24f11094 --- /dev/null +++ b/trunk/includes/class/class.LSformElement_xmpp.php @@ -0,0 +1,87 @@ + + */ + +class LSformElement_xmpp extends LSformElement { + + /** + * Retourne les infos d'affichage de l'élément + * + * Cette méthode retourne les informations d'affichage de l'élement + * + * @retval array + */ + function getDisplay(){ + $return = $this -> getLabelInfos(); + // value + if (!$this -> isFreeze()) { + $return['html'] = "
      \n"; + if (empty($this -> values)) { + $return['html'] .= "
    • ".$this -> getEmptyField()."
    • \n"; + } + else { + foreach ($this -> values as $value) { + $multiple = $this -> getMultipleData(); + $id = "LSform_".$this -> name."_".rand(); + $return['html'] .= "
    • "._(".$multiple."
    • \n"; + } + } + $return['html'] .= "
    \n"; + $GLOBALS['LSsession'] -> addJSscript('LSformElement_xmpp.js'); + } + else { + $return['html'] = "
      \n"; + if (empty($this -> values)) { + $return['html'] .= "
    • "._('Aucune valeur definie')."
    • \n"; + } + else { + foreach ($this -> values as $value) { + $return['html'] .= "
    • ".$value.""._(
    • \n"; + $GLOBALS['LSsession'] -> addJSscript('LSformElement_xmpp.js'); + } + } + $return['html'] .= "
    \n"; + } + return $return; + } + + /** + * Retourne le code HTML d'un champ vide + * + * @retval string Code HTML d'un champ vide. + */ + function getEmptyField() { + $multiple = $this -> getMultipleData(); + return ""._(".$multiple; + } +} + +?> diff --git a/trunk/includes/class/class.LSldapObject.php b/trunk/includes/class/class.LSldapObject.php index 1e6d0dfa..df9a5254 100644 --- a/trunk/includes/class/class.LSldapObject.php +++ b/trunk/includes/class/class.LSldapObject.php @@ -356,13 +356,14 @@ class LSldapObject { function validateAttrsData($idForm) { $LSform=$this -> forms[$idForm][0]; foreach($this -> attrs as $attr) { + $attr_values = $attr -> getValue(); if (!$attr -> isValidate()) { if($attr -> isUpdate()) { if (!$this -> validateAttrData($LSform, $attr)) { return; } } - else if( ($attr -> getValue() == '') && ($attr -> isRequired()) ) { + else if( (empty($attr_values)) && ($attr -> isRequired()) ) { if ( $attr -> canBeGenerated()) { if ($attr -> generateValue()) { if (!$this -> validateAttrData($LSform, $attr)) { diff --git a/trunk/includes/class/class.LSsession.php b/trunk/includes/class/class.LSsession.php index 1abfd785..c059ad48 100644 --- a/trunk/includes/class/class.LSsession.php +++ b/trunk/includes/class/class.LSsession.php @@ -295,7 +295,9 @@ class LSsession { $result = $authobject -> listObjects($filter,$this -> topDn); $nbresult=count($result); if ($nbresult==1) { - $_POST['LSsession_user'] = $result[0] -> getValue('rdn'); + $rdn = $result[0] -> getValue('rdn'); + $rdn = $rdn[0]; + $_POST['LSsession_user'] = $rdn; $find=false; } } @@ -319,6 +321,7 @@ class LSsession { debug('Récupération active'); $user=$result[0]; $emailAddress = $user -> getValue($this -> ldapServer['recoverPassword']['mailAttr']); + $emailAddress = $emailAddress[0]; // Header des mails $headers="Content-Type: text/plain; charset=UTF-8; format=flowed"; @@ -335,7 +338,9 @@ class LSsession { // 1ère étape : envoie du recoveryHash if (!isset($_GET['recoveryHash'])) { // Generer un hash - $recovery_hash = md5($user -> getValue('rdn') . strval(time()) . strval(rand())); + $rdn=$user -> getValue('rdn'); + $rdn = $rdn[0]; + $recovery_hash = md5($rdn . strval(time()) . strval(rand())); $lostPasswdForm = $user -> getForm('lostPassword'); $lostPasswdForm -> setPostData( @@ -453,7 +458,7 @@ class LSsession { $this -> rdn = $_POST['LSsession_user']; $this -> loadLSrights(); $this -> loadLSaccess(); - $GLOBALS['Smarty'] -> assign('LSsession_username',$this -> LSuserObject -> getValue('rdn')); + $GLOBALS['Smarty'] -> assign('LSsession_username',$this -> LSuserObject -> getDisplayValue()); $_SESSION['LSsession']=get_object_vars($this); return true; } diff --git a/trunk/includes/js/LSformElement_mail.js b/trunk/includes/js/LSformElement_mail.js new file mode 100644 index 00000000..87f88efb --- /dev/null +++ b/trunk/includes/js/LSformElement_mail.js @@ -0,0 +1,34 @@ +var LSformElement_mail = new Class({ + initialize: function(){ + this.initialiseLSformElement_mail(); + if (typeof(varLSform) != "undefined") { + varLSform.addModule("LSformElement_mail",this); + } + }, + + initialiseLSformElement_mail: function(el) { + if (typeof(el) == 'undefined') { + el = document; + } + el.getElements('img.LSformElement_mail_btn').each(function(btn) { + btn.addEvent('click',this.onBtnClick.bind(this,btn)); + }, this); + }, + + reinitialize: function(el) { + this.initialiseLSformElement_mail(el); + }, + + onBtnClick: function(btn) { + var href = btn.getParent().getFirst().href; + if (typeof(href)=="undefined") { + href = 'mailto:'+btn.getParent().getFirst().value; + } + if (href!="") { + location.href = href; + } + } +}); +window.addEvent(window.ie ? 'load' : 'domready', function() { + varLSformElement_mail = new LSformElement_mail(); +}); diff --git a/trunk/includes/js/LSformElement_xmpp.js b/trunk/includes/js/LSformElement_xmpp.js new file mode 100644 index 00000000..8674822f --- /dev/null +++ b/trunk/includes/js/LSformElement_xmpp.js @@ -0,0 +1,34 @@ +var LSformElement_xmpp = new Class({ + initialize: function(){ + this.initialiseLSformElement_xmpp(); + if (typeof(varLSform) != "undefined") { + varLSform.addModule("LSformElement_xmpp",this); + } + }, + + initialiseLSformElement_xmpp: function(el) { + if (typeof(el) == 'undefined') { + el = document; + } + el.getElements('img.LSformElement_xmpp_btn').each(function(btn) { + btn.addEvent('click',this.onBtnClick.bind(this,btn)); + }, this); + }, + + reinitialize: function(el) { + this.initialiseLSformElement_xmpp(el); + }, + + onBtnClick: function(btn) { + var href = btn.getParent().getFirst().href; + if (typeof(href)=="undefined") { + href = 'xmpp:'+btn.getParent().getFirst().value; + } + if (href!="") { + location.href = href; + } + } +}); +window.addEvent(window.ie ? 'load' : 'domready', function() { + varLSformElement_xmpp = new LSformElement_xmpp(); +}); diff --git a/trunk/index_ajax.php b/trunk/index_ajax.php index e1aca1b5..1642af1f 100644 --- a/trunk/index_ajax.php +++ b/trunk/index_ajax.php @@ -182,7 +182,7 @@ if (!isset($_ERRORS)) { $list = $objRel -> $relationConf['list_function']($object); if (is_array($list)) { foreach($list as $o) { - $data['html'].= "
  • ".$o -> getDisplayValue(NULL,true)."
  • \n"; + $data['html'].= "
  • ".$o -> getDisplayValue(NULL,true)."
  • \n"; } } else { diff --git a/trunk/templates/LSrelations.tpl b/trunk/templates/LSrelations.tpl index f705675c..f1318009 100644 --- a/trunk/templates/LSrelations.tpl +++ b/trunk/templates/LSrelations.tpl @@ -8,6 +8,6 @@ {/if} diff --git a/trunk/templates/css/LSform.css b/trunk/templates/css/LSform.css index b688910c..985ddfde 100644 --- a/trunk/templates/css/LSform.css +++ b/trunk/templates/css/LSform.css @@ -73,7 +73,7 @@ img.LSform-add-field-btn, img.LSform-remove-field-btn { /* * LSformElement_select_object */ -a.LSformElement_select_object_addBtn { +a.LSformElement_select_object { text-decoration: none; color: #000; font-weight: normal; diff --git a/trunk/templates/css/LSrelation.css b/trunk/templates/css/LSrelation.css index 9d6b6c9c..7de0e7b5 100644 --- a/trunk/templates/css/LSrelation.css +++ b/trunk/templates/css/LSrelation.css @@ -6,3 +6,9 @@ img.LSrelation-btn { margin-left: 0.5em; } + +a.LSrelation { + text-decoration: none; + color: #000; + font-weight: normal; +} diff --git a/trunk/templates/images/mail.png b/trunk/templates/images/mail.png new file mode 100644 index 0000000000000000000000000000000000000000..7348aed77fe6a64c2210a202f12c6eccae7fcf24 GIT binary patch literal 641 zcmV-{0)G98P)Az`{eoOom?Tf*9)f$7n8&|1&5M4#i^32;+&E? zC3Q;bRFQN#y*%%=_V)Mfa<$xe^kB0TO;vJPkN*k(2v-CI7)OaWj?&eKPos(H4wGh_ zIC;6#q1B5SMap5{(Hc0~XO7OfqZ=x{kupu8-H&9azl`L1pTuu^Znm3EA)kCoG=JuwsyNLEtY83i->Z~j3y~F)`RA1k>zTES07po!kBVS2y#L{jCt|CMY&v{ zxmqM|`OA#P2{R&)OcQd}v0kt6_Dh#`Z$i5_;q|93je3Q^PcfR{TmBHRmr;rWahz~G z2x-&;d_O~HkmKXt5Cd#Bs?-+qj3zOiUdU24KowBIUPg(gPNmxqX)Fiia~V*$y;5L( zrGNmU;81MA$F2k%oeUXQ@}N%bXz=qOij$4IYk4W=jfhDxfCz{PGXe-#ge#VfYTyoj zh4JvDePrW{lf(Oux2xG;VZmlSvDU+Qf@i=O!B`MLglhttCUHDIKkc7?P)vCi#|P&Xm-dkucwL z3)87{8iWe96huvPHfK`KOdC2Z({T6vJ9pwDx$D4>d(Pqff6w7Lmj{5i6;ZyPPpPN; zroaW=6d#@oL2Fa53F~$Su10(RG%K0p3VTuP3?Z=nBA8z$uq+XLUL^QrC74`bU|!e| zr>hK{)%Q!vdmIO5Z3JIvaOyjOX`X@c8-ua03`Q&)f&%p*{(A$q`ZTTjk%q_T7>v^J zu!R-a9fFLScYlKkNBP_Cob=9m9JLVoC-?c{)eOtMnh7qNN{ejy2sM{pS^mgFHJm@(buuM4>=<5Vr$&Kzw{B?uPr; z(1Yf=#g)zADkWnx=MR%ykl| z3Ui42k+O2{bCn)01-s5Sxp|z{G2di&KT(_M6;$EI zDL57JFf}cw4bP1P$pgTRKH$0@h|~aA>j`qZ2*kU5t2EVD5#~@VNhqx{vz8ethDD-=+1vnemftUBA zF;N!Q%PBB5B=KLB#QO(CHe?;R+-C8M?ppDW>R$5`cCPq@YpusFRTaH1i9Kv;l<>I( Ze*oTy+;kdDB`N>_002ovPDHLkV1l3CM+g7_ literal 0 HcmV?d00001 diff --git a/trunk/view.php b/trunk/view.php index 44e93ba2..4f67dbb3 100644 --- a/trunk/view.php +++ b/trunk/view.php @@ -83,7 +83,10 @@ if($LSsession -> startLSsession()) { $LSrelations=array(); foreach($object -> config['relations'] as $relationName => $relationConf) { if ($GLOBALS['LSsession'] -> relationCanAccess($object -> getValue('dn'),$relationName)) { - $return=array('label' => $relationConf['label']); + $return=array( + 'label' => $relationConf['label'], + 'LSobject' => $relationConf['LSobject'] + ); $id=rand(); $return['id']=$id;