Fix: Edition of optionnal attributes.
This commit is contained in:
parent
aff4fa60d2
commit
c2814c99df
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
|
* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -36,9 +37,11 @@ class AdherentOptions
|
|||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
// Tableau contenant le nom des champs en clef et la definition de ces champs
|
// Tableau contenant le nom des champs en clef et la definition de ces champs
|
||||||
var $attribute_name;
|
var $attribute_type;
|
||||||
// Tableau contenant le nom des champs en clef et le label de ces champs en value
|
// Tableau contenant le nom des champs en clef et le label de ces champs en value
|
||||||
var $attribute_label;
|
var $attribute_label;
|
||||||
|
// Tableau contenant le nom des champs en clef et la taille de ces champs en value
|
||||||
|
var $attribute_size;
|
||||||
|
|
||||||
var $error;
|
var $error;
|
||||||
/*
|
/*
|
||||||
@ -56,8 +59,9 @@ class AdherentOptions
|
|||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->error = array();
|
$this->error = array();
|
||||||
$this->attribute_name = array();
|
$this->attribute_type = array();
|
||||||
$this->attribute_label = array();
|
$this->attribute_label = array();
|
||||||
|
$this->attribute_size = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,47 +77,11 @@ class AdherentOptions
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief fonction qui verifie les donnees entrees
|
* \brief Add a new attribute
|
||||||
* \param minimum
|
* \param attrname nom de l'atribut
|
||||||
*/
|
* \param type type de l'attribut
|
||||||
function check($minimum=0)
|
* \param length longuer de l'attribut
|
||||||
{
|
* \remarks Ceci correspond a un alter de la table et pas a un insert
|
||||||
$err = 0;
|
|
||||||
|
|
||||||
if (strlen(trim($this->societe)) == 0)
|
|
||||||
{
|
|
||||||
if ((strlen(trim($this->nom)) + strlen(trim($this->prenom))) == 0)
|
|
||||||
{
|
|
||||||
$error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe.";
|
|
||||||
$err++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen(trim($this->adresse)) == 0)
|
|
||||||
{
|
|
||||||
$error_string[$err] = "L'adresse saisie est invalide";
|
|
||||||
$err++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return errors
|
|
||||||
if ($err)
|
|
||||||
{
|
|
||||||
$this->error = $error_string;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief fonction qui cree un attribut optionnel
|
|
||||||
* \param attrname nom de l'atribut
|
|
||||||
* \param type type de l'attribut
|
|
||||||
* \param length longuer de l'attribut
|
|
||||||
* \remarks Ceci correspond a une modification de la table et pas a un rajout d'enregistrement
|
|
||||||
*/
|
*/
|
||||||
function create($attrname,$type='varchar',$length=255) {
|
function create($attrname,$type='varchar',$length=255) {
|
||||||
|
|
||||||
@ -165,13 +133,13 @@ class AdherentOptions
|
|||||||
|
|
||||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label SET ";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label SET";
|
||||||
$sql.= " name = '".$attrname."'";
|
$sql.= " name = '".$attrname."',";
|
||||||
$sql.= ", label = '".addslashes($label)."'";
|
$sql.= " label = '".addslashes($label)."',";
|
||||||
$sql.= ", type = '".$type."'";
|
$sql.= " type = '".$type."',";
|
||||||
$sql.= ", pos = '".$pos."'";
|
$sql.= " pos = '".$pos."',";
|
||||||
$sql.= ", size = '".$size."'";
|
$sql.= " size = '".$size."',";
|
||||||
$sql.= ", entity = ".$conf->entity;
|
$sql.= " entity = ".$conf->entity;
|
||||||
|
|
||||||
dol_syslog("AdherentOptions::create_label sql=".$sql);
|
dol_syslog("AdherentOptions::create_label sql=".$sql);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
@ -227,6 +195,7 @@ class AdherentOptions
|
|||||||
$sql.= " WHERE name = '$attrname'";
|
$sql.= " WHERE name = '$attrname'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
|
dol_syslog("AdherentOptions::delete_label sql=".$sql);
|
||||||
if ( $this->db->query( $sql) )
|
if ( $this->db->query( $sql) )
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
@ -245,17 +214,18 @@ class AdherentOptions
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief fonction qui modifie un attribut optionnel
|
* \brief Fonction qui modifie le type d'un attribut optionnel
|
||||||
* \param attrname nom de l'atribut
|
* \param attrname nom de l'atribut
|
||||||
* \param type type de l'attribut
|
* \param type type de l'attribut
|
||||||
* \param length longuer de l'attribut
|
* \param length longuer de l'attribut
|
||||||
|
* \return int >0 if OK, <=0 if error
|
||||||
* \TODO pouvoir gerer les entités
|
* \TODO pouvoir gerer les entités
|
||||||
*/
|
*/
|
||||||
function update($attrname,$type='varchar',$length=255)
|
function update($attrname,$type='varchar',$length=255)
|
||||||
{
|
{
|
||||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
||||||
{
|
{
|
||||||
$sql = "ALTER TABLE ".MAIN_DB_PREFIX."adherent_options ";
|
$sql = "ALTER TABLE ".MAIN_DB_PREFIX."adherent_options";
|
||||||
switch ($type){
|
switch ($type){
|
||||||
case 'varchar' :
|
case 'varchar' :
|
||||||
case 'interger' :
|
case 'interger' :
|
||||||
@ -272,7 +242,8 @@ class AdherentOptions
|
|||||||
}
|
}
|
||||||
//$sql .= "MODIFY COLUMN $attrname $type($length)";
|
//$sql .= "MODIFY COLUMN $attrname $type($length)";
|
||||||
|
|
||||||
if ( $this->db->query( $sql) )
|
dol_syslog("AdherentOptions::update sql=".$sql);
|
||||||
|
if ( $this->db->query($sql) )
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -281,7 +252,8 @@ class AdherentOptions
|
|||||||
print dol_print_error($this->db);
|
print dol_print_error($this->db);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -289,39 +261,52 @@ class AdherentOptions
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief fonction qui modifie un label
|
* \brief Modify an optionnal attribute
|
||||||
* \param attrname nom de l'atribut
|
* \param attrname nom de l'atribut
|
||||||
* \param label nom du label
|
* \param label nom du label
|
||||||
|
* \param type type
|
||||||
|
* \param size size
|
||||||
*/
|
*/
|
||||||
function update_label($attrname,$label='')
|
function update_label($attrname,$label,$type,$size)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
dol_syslog("AdherentOptions::update_label $attrname,$label,$type,$size");
|
||||||
|
|
||||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
||||||
{
|
{
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options_label";
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options_label";
|
||||||
$sql_del.= " WHERE name = '".$attrname."'";
|
$sql_del.= " WHERE name = '".$attrname."'";
|
||||||
$sql_del.= " AND entity = ".$conf->entity;
|
$sql_del.= " AND entity = ".$conf->entity;
|
||||||
|
dol_syslog("AdherentOptions::update_label sql=".$sql_del);
|
||||||
|
$resql1=$this->db->query($sql_del);
|
||||||
|
|
||||||
$this->db->query($sql_del);
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label(";
|
||||||
|
$sql.= " name,";
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label (";
|
$sql.= " entity,";
|
||||||
$sql.= "name";
|
$sql.= " label,";
|
||||||
$sql.= ", label";
|
$sql.= " type,";
|
||||||
$sql.= ", entity";
|
$sql.= " size";
|
||||||
$sql.= ") VALUES (";
|
$sql.= ") VALUES (";
|
||||||
$sql.= "'".$attrname."'";
|
$sql.= "'".$attrname."',";
|
||||||
$sql.= ", '".addslashes($escaped_label)."'";
|
$sql.= " ".$conf->entity.",";
|
||||||
$sql.= ", ".$conf->entity;
|
$sql.= " '".addslashes($label)."',";
|
||||||
|
$sql.= " '".$type."',";
|
||||||
|
$sql.= " '".$size."'";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
//$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options_label SET name='$attrname',label='$escaped_label'";
|
//$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options_label SET name='$attrname',label='$escaped_label'";
|
||||||
|
dol_syslog("AdherentOptions::update_label sql=".$sql);
|
||||||
|
$resql2=$this->db->query($sql);
|
||||||
|
|
||||||
if ( $this->db->query( $sql) )
|
if ($resql1 && $resql2)
|
||||||
{
|
{
|
||||||
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->db->rollback();
|
||||||
print dol_print_error($this->db);
|
print dol_print_error($this->db);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -352,12 +337,12 @@ class AdherentOptions
|
|||||||
|
|
||||||
$array_name_label=array();
|
$array_name_label=array();
|
||||||
|
|
||||||
$sql = "SELECT name,label,type";
|
$sql = "SELECT name,label,type,size";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_options_label";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_options_label";
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
$sql.= " ORDER BY pos";
|
$sql.= " ORDER BY pos";
|
||||||
|
|
||||||
dol_syslog("Adherent_options::fetch_name_optionals_label");
|
dol_syslog("Adherent_options::fetch_name_optionals_label sql=".$sql);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -367,8 +352,9 @@ class AdherentOptions
|
|||||||
{
|
{
|
||||||
// we can add this attribute to adherent object
|
// we can add this attribute to adherent object
|
||||||
$array_name_label[$tab->name]=$tab->label;
|
$array_name_label[$tab->name]=$tab->label;
|
||||||
$this->attribute_name[$tab->name]=$tab->type;
|
$this->attribute_type[$tab->name]=$tab->type;
|
||||||
$this->attribute_label[$tab->name]=$tab->label;
|
$this->attribute_label[$tab->name]=$tab->label;
|
||||||
|
$this->attribute_size[$tab->name]=$tab->size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $array_name_label;
|
return $array_name_label;
|
||||||
|
|||||||
@ -61,6 +61,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->configurer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rename field
|
||||||
if ($_POST["action"] == 'update' && $user->rights->adherent->configurer)
|
if ($_POST["action"] == 'update' && $user->rights->adherent->configurer)
|
||||||
{
|
{
|
||||||
if ($_POST["button"] != $langs->trans("Cancel"))
|
if ($_POST["button"] != $langs->trans("Cancel"))
|
||||||
@ -70,7 +71,7 @@ if ($_POST["action"] == 'update' && $user->rights->adherent->configurer)
|
|||||||
$adho->update($_POST['attrname'],$_POST['type'],$_POST['size']);
|
$adho->update($_POST['attrname'],$_POST['type'],$_POST['size']);
|
||||||
if (isset($_POST['label']))
|
if (isset($_POST['label']))
|
||||||
{
|
{
|
||||||
$adho->update_label($_POST['attrname'],$_POST['label']);
|
$adho->update_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['size']);
|
||||||
}
|
}
|
||||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
@ -108,31 +109,33 @@ if ($_GET["action"] == 'delete' && $user->rights->adherent->configurer)
|
|||||||
llxHeader('',$langs->trans("OptionalFieldsSetup"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
llxHeader('',$langs->trans("OptionalFieldsSetup"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||||
|
|
||||||
|
|
||||||
print_titre($langs->trans("OptionalFieldsSetup"));
|
print_fiche_titre($langs->trans("OptionalFieldsSetup"));
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
if ($mesg) print '<div class="error">'.$mesg.'</div><br>';
|
if ($mesg) print '<div class="error">'.$mesg.'</div><br>';
|
||||||
|
|
||||||
// Load attribute_label
|
// Load attribute_label
|
||||||
$adho->fetch_name_optionals_label();
|
$adho->fetch_name_optionals_label();
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Label").'</td>';
|
|
||||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
print '<td>'.$langs->trans("Type").'</td><td width="80"> </td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||||
|
print '<td width="80"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
foreach($adho->attribute_name as $key => $value)
|
foreach($adho->attribute_type as $key => $value)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td>".$adho->attribute_label[$key]." </td>\n";
|
print "<td>".$key."</td>\n";
|
||||||
print "<td>$key</td>\n";
|
print "<td>".$adho->attribute_label[$key]."</td>\n";
|
||||||
print "<td>$value</td>\n";
|
print "<td>".$adho->attribute_type[$key]."</td>\n";
|
||||||
print "<td align=\"right\"><a href=\"options.php?action=edit&attrname=$key\">".img_edit()."</a>";
|
print '<td align="right">'.$adho->attribute_size[$key]."</td>\n";
|
||||||
|
print '<td align="right"><a href="options.php?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||||
print " <a href=\"options.php?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
print " <a href=\"options.php?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
// $i++;
|
// $i++;
|
||||||
@ -144,7 +147,7 @@ print "</table>";
|
|||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] != 'create')
|
if ($_GET["action"] != 'create' && $_GET["action"] != 'edit')
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print "<a class=\"butAction\" href=\"options.php?action=create\">".$langs->trans("NewAttribute")."</a>";
|
print "<a class=\"butAction\" href=\"options.php?action=create\">".$langs->trans("NewAttribute")."</a>";
|
||||||
@ -161,12 +164,11 @@ if ($_GET["action"] != 'create')
|
|||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
print_titre($langs->trans('NewAttribute'));
|
print_titre($langs->trans('NewAttribute'));
|
||||||
|
|
||||||
print '<form action="options.php" method="post">';
|
print '<form action="options.php" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table summary="listofattributes" class="border" width="100%">';
|
||||||
|
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
@ -194,7 +196,7 @@ if ($_GET["action"] == 'create')
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($_GET["attrname"] && $_GET["action"] == 'edit')
|
if ($_GET["attrname"] && $_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
|
print "<br>";
|
||||||
print_titre($langs->trans("FieldEdition",$_GET["attrname"]));
|
print_titre($langs->trans("FieldEdition",$_GET["attrname"]));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -204,17 +206,29 @@ if ($_GET["attrname"] && $_GET["action"] == 'edit')
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="attrname" value="'.$_GET["attrname"].'">';
|
print '<input type="hidden" name="attrname" value="'.$_GET["attrname"].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table summary="listofattributes" class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur"><input type="text" name="label" size="40" value="'.$adho->attribute_label[$_GET["attrname"]].'"></td></tr>';
|
// Code
|
||||||
print '<tr><td>'.$langs->trans("AttributeName").'</td><td class="valeur">'.$_GET["attrname"].' </td></tr>';
|
print '<tr>';
|
||||||
list($type,$size)=preg_split('/\(|\)/',$adho->attribute_name[$_GET["attrname"]]);
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">';
|
print '<td class="valeur">'.$_GET["attrname"].' </td>';
|
||||||
$form->select_array('type',array('varchar'=>$langs->trans('String'),
|
print '</tr>';
|
||||||
|
// Label
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans("Label").'</td><td class="valeur"><input type="text" name="label" size="40" value="'.$adho->attribute_label[$_GET["attrname"]].'"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
$type=$adho->attribute_type[$_GET["attrname"]];
|
||||||
|
$size=$adho->attribute_size[$_GET["attrname"]];
|
||||||
|
print '<tr><td>'.$langs->trans("Type").'</td>';
|
||||||
|
print '<td class="valeur">';
|
||||||
|
$type2label=array('varchar'=>$langs->trans('String'),
|
||||||
'text'=>$langs->trans('Text'),
|
'text'=>$langs->trans('Text'),
|
||||||
'int'=>$langs->trans('Int'),
|
'int'=>$langs->trans('Int'),
|
||||||
'date'=>$langs->trans('Date'),
|
'date'=>$langs->trans('Date'),
|
||||||
'datetime'=>$langs->trans('DateAndTime')),$type);
|
'datetime'=>$langs->trans('DateAndTime'));
|
||||||
|
//$form->select_array('type',$type2label,$type);
|
||||||
|
print $type2label[$type];
|
||||||
|
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Size").'</td><td class="valeur"><input type="text" name="size" size="5" value="'.$size.'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Size").'</td><td class="valeur"><input type="text" name="size" size="5" value="'.$size.'"></td></tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user