- LSform :

-> Ajout d'une notion de layout pour pouvoir définir l'affichage d'un
     formulaire par onglet et définir l'ordre d'affichage des attributs
    -> Création de templates LSform plutôt que de le redéfinir dans chaque 
       template l'affichage d'un formulaire :
        - LSform.tpl : Template de formualaire
        - LSform_view.tpl : Template d'affichage (vue)
    -> Ajout du JS même lors d'une view
    -> JS : ajout de méthode de gestion des onglets
- LSeepeople : Ajout de commentaire dans le fichier de configuration
- LSformElement_select_object && LSformElement_mail : 
  -> Utilisation des paramètres LSform plutôt que de consulter directement les 
     champs cachés.
This commit is contained in:
Benjamin Renard 2008-11-03 19:25:22 +00:00
parent 4c0e7669f5
commit 2b6479240e
12 changed files with 378 additions and 75 deletions

View file

@ -30,6 +30,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'orderby' => 'displayValue', // Valeurs possibles : 'displayValue' ou 'subDn'
'rdn' => 'uid',
'container_dn' => 'ou=people',
'container_auto_create' => array(
'objectclass' => array(
'top',
@ -39,12 +40,15 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'ou' => 'people'
)
),
'before_modify' => 'valid',
'after_modify' => 'valid',
'after_create' => 'createMaildirByFTP',
'after_delete' => 'removeMaildirByFTP',
'select_display_attrs' => '%{cn}',
'label' => _('Utilisateurs'),
// LSrelation
'relations' => array(
'groups' => array(
'label' => _('Appartient aux groupes...'),
@ -61,8 +65,49 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
)
)
),
// LSform
'LSform' => array (
// Layout
'layout' => array (
'Civilite' => array(
'label' => 'Civilité',
'img' => 1,
'args' => array (
'uid',
'personalTitle',
'givenName',
'sn',
'cn',
'mail',
'description',
'jpegPhoto'
)
),
'Posix' => array (
'label' => 'Posix',
'args' => array (
'uidNumber',
'gidNumber',
'loginShell',
'homeDirectory'
)
),
'Samba' => array (
'label' => 'Samba',
'args' => array (
'sambaSID',
'sambaLMPassword',
'sambaNTPassword'
)
)
) // fin Layout
), // fin LSform
// Attributes
'attrs' => array (
/* ----------- start -----------*/
'uid' => array (
'label' => _('Identifiant'),
'ldap_type' => 'ascii',
@ -101,6 +146,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'homeDirectory'
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'uidNumber' => array (
'label' => _('Identifiant (numérique)'),
'ldap_type' => 'numeric',
@ -128,6 +176,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'modify' => 0,
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'givenName' => array (
'label' => _('Prenom'),
'ldap_type' => 'ascii',
@ -151,6 +202,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
),
'onDisplay' => 'return_data'
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'sn' => array (
'label' => _('Nom'),
'ldap_type' => 'ascii',
@ -167,6 +221,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'create' => 1
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'cn' => array (
'label' => _('Nom complet'),
'ldap_type' => 'ascii',
@ -189,6 +246,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'create' => 1
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'gidNumber' => array (
'label' => _('Groupe principal'),
'ldap_type' => 'numeric',
@ -231,6 +291,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
)
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'loginShell' => array (
'label' => _('Interpreteur de commande'),
'help_info' => _("Permet ou non a l'utilisateur de se connecter à un système POSIX."),
@ -250,6 +313,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'true_value' => '/bin/bash',
'false_value' => '/bin/false'
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'sambaSID' => array (
'label' => _('Identifiant Samba'),
'ldap_type' => 'ascii',
@ -260,9 +326,12 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'admin' => 'r'
),
'form' => array (
//'modify' => 0,
'modify' => 0
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'homeDirectory' => array (
'label' => _('Répertoire personnel'),
'ldap_type' => 'ascii',
@ -274,6 +343,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
),
'view' => 1
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'mail' => array (
'label' => _('Adresse e-mail'),
'ldap_type' => 'ascii',
@ -302,6 +374,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'create' => 1
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'personalTitle' => array (
'label' => _('Titre'),
'ldap_type' => 'ascii',
@ -324,6 +399,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'Mlle' => 'Mlle'
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'description' => array (
'label' => _('Description'),
'ldap_type' => 'ascii',
@ -340,6 +418,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'create' => 1
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'userPassword' => array (
'label' => _('Mot de passe'),
'ldap_type' => 'password',
@ -390,6 +471,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
),
'after_modify' => 'valid'
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'lsRecoveryHash' => array (
'label' => _('Hash de recouvrement du mot de passe'),
'ldap_type' => 'ascii',
@ -403,6 +487,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'admin' => 'w'
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'sambaLMPassword' => array (
'label' => _('Mot de passe Samba (LM)'),
'ldap_type' => 'ascii',
@ -413,6 +500,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'modify' => 0
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'sambaNTPassword' => array (
'label' => _('Mot de passe Samba (NT)'),
'ldap_type' => 'ascii',
@ -423,6 +513,9 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'modify' => 0
)
),
/* ----------- end -----------*/
/* ----------- start -----------*/
'jpegPhoto' => array (
'label' => _('Photo'),
'ldap_type' => 'image',
@ -455,6 +548,8 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'admin' => 'w'
)
)
)
/* ----------- end -----------*/
) // Fin args
);
?>

View file

@ -4,12 +4,68 @@
******************
*/
/*
* Layout
*/
ul.LSform_layout_active {
list-style-type: none;
padding: 0;
margin: 1em;
margin-bottom: 0;
}
li.LSform_layout a {
text-decoration: none;
color: #0072B8;
}
li.LSform_layout_active a {
color: #fff;
}
li.LSform_layout_active {
text-decoration: none;
color: #fff;
background-color: #52BCE5;
-moz-border-radius: 3px 3px 0px 0px;
padding: 4px;
display: inline;
margin-right: 1px;
}
li.LSform_layout_current {
color: #fff;
background-color: #0072B8;
}
h2.LSform_layout_active {
display: none;
}
div.LSform_layout {
border: 1px solid #0072B8;
margin: 1em;
padding: 0.5em;
}
div.LSform_layout_active {
display: none;
margin-top: 4px;
}
div.LSform_layout_current {
display: block;
}
/*
* Architecture
*/
div.LSform {
margin-left: 1em;
}
dl.LSform {
margin: 0;
margin-left: 2em;
padding: 0;
}
@ -17,14 +73,14 @@ dl.LSform {
position: relative;
left: 0.2em;
top: 1.2em;
width: 15em;
width: 16em;
font-weight: bold;
font-size: 0.9em;
color: #0072b8;
}
dd.LSform {
margin-left: 15em;
margin-left: 16em;
padding: 0;
}

View file

@ -20,6 +20,13 @@ h1 {
clear: left;
}
h2 {
margin: 0.7em;
margin-bottom: 1px;
color: #0072b8;
clear: left;
}
a img {
border: none;
}

View file

@ -74,6 +74,7 @@ class LSform {
function display(){
if ($this -> idForm == 'view') {
$GLOBALS['LSsession'] -> addJSscript('LSview.js');
$GLOBALS['LSsession'] -> addJSscript('LSform.js');
}
else {
$GLOBALS['LSsession'] -> addJSscript('LSformElement_field.js');
@ -93,6 +94,12 @@ class LSform {
'dn' => $this -> ldapObject -> getValue('dn')
);
$GLOBALS['Smarty'] -> assign('LSform_object',$LSform_object);
if (is_array($GLOBALS['LSobjects'][$LSform_object['type']]['LSform']['layout'])) {
$GLOBALS['Smarty'] -> assign('LSform_layout',$GLOBALS['LSobjects'][$LSform_object['type']]['LSform']['layout']);
$GLOBALS['Smarty'] -> assign('LSform_layout_nofield_label',_('Aucun champ.'));
}
$fields = array();
foreach($this -> elements as $element) {
$field = array();
@ -100,7 +107,7 @@ class LSform {
if (isset($this -> _elementsErrors[$element -> name])) {
$field['errors']= $this -> _elementsErrors[$element -> name];
}
$fields[] = $field;
$fields[$element -> name] = $field;
}
if ($this -> maxFileSize) {
@ -123,6 +130,7 @@ class LSform {
*/
function displayView(){
$GLOBALS['LSsession'] -> addCssFile('LSform.css');
$GLOBALS['LSsession'] -> addJSscript('LSform.js');
$LSform_object = array(
'type' => $this -> ldapObject -> getType(),
'dn' => $this -> ldapObject -> getDn()
@ -131,9 +139,14 @@ class LSform {
$fields = array();
foreach($this -> elements as $element) {
$field = $element -> getDisplay();
$fields[] = $field;
$fields[$element -> name] = $field;
}
$GLOBALS['Smarty'] -> assign('LSform_fields',$fields);
if (is_array($GLOBALS['LSobjects'][$LSform_object['type']]['LSform']['layout'])) {
$GLOBALS['Smarty'] -> assign('LSform_layout',$GLOBALS['LSobjects'][$LSform_object['type']]['LSform']['layout']);
$GLOBALS['Smarty'] -> assign('LSform_layout_nofield_label',_('Aucun champ.'));
}
}
/**

View file

@ -3,21 +3,67 @@ var LSform = new Class({
this._modules=[];
this._elements=[];
this.objecttype = $('LSform_objecttype').value,
this.objectdn = $('LSform_objectdn').value,
this.idform = $('LSform_idform').value,
if ($type($('LSform_idform'))) {
this.objecttype = $('LSform_objecttype').value;
this.objectdn = $('LSform_objectdn').value;
this.idform = $('LSform_idform').value;
}
this.initializeLSform();
this.initializeLSformLayout();
},
initializeLSform: function(el) {
this.LStips = new Tips('.LStips');
if (typeof(el) == 'undefined') {
el = document;
if (this.idform) {
if (typeof(el) == 'undefined') {
el = document;
}
el.getElements('ul.LSform').each(function(ul) {
this._elements[ul.id] = new LSformElement(this,ul.id,ul);
}, this);
}
el.getElements('ul.LSform').each(function(ul) {
this._elements[ul.id] = new LSformElement(this,ul.id,ul);
}, this);
},
initializeLSformLayout: function(el) {
$$('.LSform_layout').each(function(el) {
el.addClass('LSform_layout_active');
},this);
var LIs = $$('li.LSform_layout');
LIs.each(function(li) {
li.getFirst('a').addEvent('click',this.onTabBtnClick.bindWithEvent(this,li));
},this);
if (LIs.length != 0) {
this._currentTab = 'default_value';
document.getElement('li.LSform_layout').getFirst('a').fireEvent('click');
}
},
onTabBtnClick: function(event,li) {
if ($type(event)) {
new Event(event).stop();
}
if (this._currentTab!='default_value') {
var oldLi = $$('li.LSform_layout[title='+this._currentTab+']');
if ($type(oldLi)) {
oldLi.removeClass('LSform_layout_current');
}
var oldDiv = $$('div.LSform_layout[title='+this._currentTab+']');
if ($type(oldDiv)) {
oldDiv.removeClass('LSform_layout_current');
}
}
this._currentTab = li.title;
li.addClass('LSform_layout_current');
var div = $$('div.LSform_layout[title='+this._currentTab+']');
if ($type(div)) {
div.addClass('LSform_layout_current');
}
},
addModule: function(name,obj) {

View file

@ -50,7 +50,7 @@ var LSformElement_mail = new Class({
if ((mail!="")) {
this.LSmail_open = 1;
this.LSmail.setMails([mail]);
this.LSmail.setObject($('LSform_objecttype').value,$('LSform_objectdn').value);
this.LSmail.setObject(varLSform.objecttype,varLSform.objectdn);
this.LSmail.open(btn);
}
}

View file

@ -97,9 +97,9 @@ var LSformElement_select_object_field = new Class({
template: 'LSform',
action: 'refreshField',
attribute: this.name,
objecttype: $('LSform_objecttype').value,
objectdn: $('LSform_objectdn').value,
idform: $('LSform_idform').value
objecttype: varLSform.objecttype,
objectdn: varLSform.objectdn,
idform: varLSform.idform
};
data.imgload=varLSdefault.loadingImgDisplay(this.addBtn);
new Request({url: 'index_ajax.php', data: data, onSuccess: this.onLSsmoothboxValidComplete.bind(this)}).send();

View file

@ -0,0 +1,80 @@
<form action='{$LSform_action}' method='post' enctype="multipart/form-data" class='LSform'>
{$LSform_header}
{if $LSform_layout}
<!-- Tabs - Start Title -->
<ul class='LSform_layout'>
{foreach from=$LSform_layout item=tab key=tab_key}
<li class='LSform_layout' title='{$tab_key}'><a href="#{$tab_key}">{$tab.label}</a></li>
{/foreach}
</ul>
<!-- Tabs - End Title -->
<!-- Tabs - Start Content -->
{foreach from=$LSform_layout item=tab key=tab_key}
<a name='{$tab_key}'/>
<h2 class='LSform_layout'>{$tab.label}</h2>
<div class='LSform LSform_layout' title='{$tab_key}'>
{if $LSformElement_image!='' && $tab.img==1}
<div class='LSformElement_image{if $LSformElement_image_errors} LSformElement_image_errors{/if}'>
{if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
<ul class='LSformElement_image_actions'>
<li><img src='{$LS_IMAGES_DIR}/zoom.png' class='LSformElement_image_actions LSformElement_image_action_zoom' id='LSformElement_image_action_zoom_{$LSformElement_image.id}' /></li>
{foreach from=$LSformElement_image_actions item=item}
<li><img src='{$LS_IMAGES_DIR}/{$item}.png' class='LSformElement_image_actions LSformElement_image_action_{$item}' id='LSformElement_image_action_{$item}_{$LSformElement_image.id}' /></li>
{/foreach}
</ul>
{/if}
<img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' />
</div>
{/if}
<dl class='LSform'>
{foreach from=$tab.args item=arg}
{if $LSform_fields[$arg]}
<dt class='LSform{if $LSform_fields[$arg].errors != ''} LSform-errors{/if}'>{$LSform_fields[$arg].label}{if $LSform_fields[$arg].required} *{/if}{if $LSform_fields[$arg].help_info!=""} <img class='LStips' src="{$LS_IMAGES_DIR}/help.png" alt='?' title="{$LSform_fields[$arg].help_info}"/>{/if}</dt>
<dd class='LSform'>{$LSform_fields[$arg].html}{if $LSform_fields[$arg].add != ''} <span class='LSform-addfield'>+ Ajouter un champ</span>{/if}</dd>
{if $LSform_fields[$arg].errors != ''}
{foreach from=$LSform_fields[$arg].errors item=error}
<dd class='LSform LSform-errors'>{$error}</dd>
{/foreach}
{/if}
{/if}
{/foreach}
<dd class='LSform'><input type='submit' value='{$LSform_submittxt}' class='LSform' /></dd>
</dl>
</div>
{/foreach}
<!-- Tabs - End Content -->
{else}
{if $LSformElement_image!=''}
<div class='LSformElement_image{if $LSformElement_image_errors} LSformElement_image_errors{/if}'>
{if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
<ul class='LSformElement_image_actions'>
<li><img src='{$LS_IMAGES_DIR}/zoom.png' class='LSformElement_image_actions LSformElement_image_action_zoom' id='LSformElement_image_action_zoom_{$LSformElement_image.id}' /></li>
{foreach from=$LSformElement_image_actions item=item}
<li><img src='{$LS_IMAGES_DIR}/{$item}.png' class='LSformElement_image_actions LSformElement_image_action_{$item}' id='LSformElement_image_action_{$item}_{$LSformElement_image.id}' /></li>
{/foreach}
</ul>
{/if}
<img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' />
</div>
{/if}
<div class='LSform'>
<dl class='LSform'>
{foreach from=$LSform_fields item=field}
<dt class='LSform{if $field.errors != ''} LSform-errors{/if}'>{$field.label}{if $field.required} *{/if}{if $field.help_info!=""} <img class='LStips' src="{$LS_IMAGES_DIR}/help.png" alt='?' title="{$field.help_info}"/>{/if}</dt>
<dd class='LSform'>{$field.html}{if $field.add != ''} <span class='LSform-addfield'>+ Ajouter un champ</span>{/if}</dd>
{if $field.errors != ''}
{foreach from=$field.errors item=error}
<dd class='LSform LSform-errors'>{$error}</dd>
{/foreach}
{/if}
{/foreach}
<dd class='LSform'><input type='submit' value='{$LSform_submittxt}' class='LSform' /></dd>
</dl>
</div>
{/if}
</form>

View file

@ -0,0 +1,58 @@
<input type='hidden' name='LSform_objecttype' id='LSform_objecttype' value='{$LSform_object.type}'/>
<input type='hidden' name='LSform_objectdn' id='LSform_objectdn' value='{$LSform_object.dn}'/>
{if $LSform_layout}
<!-- Tabs - Start Title -->
<ul class='LSform_layout'>
{foreach from=$LSform_layout item=tab key=tab_key}
<li class='LSform_layout' title='{$tab_key}'><a href="#{$tab_key}">{$tab.label}</a></li>
{/foreach}
</ul>
<!-- Tabs - End Title -->
<!-- Tabs - Start Content -->
{foreach from=$LSform_layout item=tab key=tab_key}
<a name='{$tab_key}'/>
<h2 class='LSform_layout'>{$tab.label}</h2>
<div class='LSform LSform_layout' title='{$tab_key}'>
{if $LSformElement_image!='' && $tab.img==1}
<div class='LSformElement_image'>
<a href='{$LSformElement_image.img}.png' rel='rien ici' title='comment' class='mb'><img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' /></a>
</div>
{/if}
<dl class='LSform'>
{assign var='field' value='non'}
{foreach from=$tab.args item=arg}
{if $LSform_fields[$arg]}
{assign var='field' value='oui'}
<dt class='LSform'>{$LSform_fields[$arg].label}</dt>
<dd class='LSform'>{$LSform_fields[$arg].html}</dd>
{/if}
{/foreach}
{if $field=='non'}
<dd class='LSform'>{$LSform_layout_nofield_label}</dd>
{/if}
</dl>
</div>
{/foreach}
<!-- Tabs - End Content -->
{else}
{if $LSformElement_image!=''}
<div class='LSformElement_image'>
<a href='{$LSformElement_image.img}.png' rel='rien ici' title='comment' class='mb'><img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' /></a>
</div>
{/if}
<div class='LSform'>
<dl class='LSform'>
{foreach from=$LSform_fields item=field}
<dt class='LSform'>{$field.label}</dt>
<dd class='LSform'>{$field.html}</dd>
{/foreach}
</dl>
</div>
{/if}

View file

@ -1,19 +1,5 @@
{include file='top.tpl'}
{if $pagetitle != ''}<h1>{$pagetitle}</h1>{/if}
<form action='{$LSform_action}' method='post' class='LSform'>
{$LSform_header}
<dl class='LSform'>
{foreach from=$LSform_fields item=field}
<dt class='LSform{if $field.errors != ''} LSform-errors{/if}'>{$field.label}{if $field.required} *{/if}{if $field.help_info!=""} <img class='LStips' src="{$LS_IMAGES_DIR}/help.png" alt='?' title="{$field.help_info}"/>{/if}</dt>
<dd class='LSform'>{$field.html}{if $field.add != ''} <span class='LSform-addfield'>+ Ajouter un champ</span>{/if}</dd>
{if $field.errors != ''}
{foreach from=$field.errors item=error}
<dd class='LSform LSform-errors'>{$error}</dd>
{/foreach}
{/if}
{/foreach}
<dd class='LSform'><input type='submit' value='{$LSform_submittxt}' class='LSform' /></dd>
</dl>
</form>
{include file='LSform.tpl'}
{include file='bottom.tpl'}

View file

@ -8,33 +8,6 @@
</ul>
{/if}
{if $LSformElement_image!=''}
<div class='LSformElement_image{if $LSformElement_image_errors} LSformElement_image_errors{/if}'>
{if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
<ul class='LSformElement_image_actions'>
<li><img src='{$LS_IMAGES_DIR}/zoom.png' class='LSformElement_image_actions LSformElement_image_action_zoom' id='LSformElement_image_action_zoom_{$LSformElement_image.id}' /></li>
{foreach from=$LSformElement_image_actions item=item}
<li><img src='{$LS_IMAGES_DIR}/{$item}.png' class='LSformElement_image_actions LSformElement_image_action_{$item}' id='LSformElement_image_action_{$item}_{$LSformElement_image.id}' /></li>
{/foreach}
</ul>
{/if}
<img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' />
</div>
{/if}
{include file='LSform.tpl'}
<form action='{$LSform_action}' method='post' enctype="multipart/form-data" class='LSform'>
{$LSform_header}
<dl class='LSform'>
{foreach from=$LSform_fields item=field}
<dt class='LSform{if $field.errors != ''} LSform-errors{/if}'>{$field.label}{if $field.required} *{/if}{if $field.help_info!=""} <img class='LStips' src="{$LS_IMAGES_DIR}/help.png" alt='?' title="{$field.help_info}"/>{/if}</dt>
<dd class='LSform'>{$field.html}{if $field.add != ''} <span class='LSform-addfield'>+ Ajouter un champ</span>{/if}</dd>
{if $field.errors != ''}
{foreach from=$field.errors item=error}
<dd class='LSform LSform-errors'>{$error}</dd>
{/foreach}
{/if}
{/foreach}
<dd class='LSform'><input type='submit' value='{$LSform_submittxt}' class='LSform' /></dd>
</dl>
</form>
{include file='bottom.tpl'}

View file

@ -7,19 +7,8 @@
{/foreach}
</ul>
{/if}
{if $LSformElement_image!=''}
<div class='LSformElement_image'>
<a href='{$LSformElement_image.img}.png' rel='rien ici' title='comment' class='mb'><img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' /></a>
</div>
{/if}
<input type='hidden' name='LSform_objecttype' id='LSform_objecttype' value='{$LSform_object.type}'/>
<input type='hidden' name='LSform_objectdn' id='LSform_objectdn' value='{$LSform_object.dn}'/>
<dl class='LSform'>
{foreach from=$LSform_fields item=field}
<dt class='LSform'>{$field.label}</dt>
<dd class='LSform'>{$field.html}</dd>
{/foreach}
</dl>
{include file='LSform_view.tpl'}
{if $LSrelations!=''}
{foreach from=$LSrelations item=item}