fiche_attr add a new attribut = select
This commit is contained in:
parent
a1f4d14bea
commit
a2c92eccab
3 changed files with 25 additions and 10 deletions
|
|
@ -31,7 +31,7 @@ PROJECT_NAME = phpcompta
|
|||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = Version5
|
||||
PROJECT_NUMBER = Version-6
|
||||
|
||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# base path where the generated documentation will be put.
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ class Fiche
|
|||
|
||||
}
|
||||
$w->table=$table;
|
||||
if ( $attr->ad_type != 'select') $w->label=$attr->ad_text;
|
||||
$w->label=$attr->ad_text;
|
||||
$w->name="av_text".$attr->ad_id;
|
||||
|
||||
$r.="<TR>".td($w->label,' class="input_text" ').td($w->input())."$msg </TR>";
|
||||
|
|
@ -557,8 +557,7 @@ class Fiche
|
|||
$attr=$this->attribut;
|
||||
/* show card type here */
|
||||
$type_card=$this->cn->get_value('select fd_label from fiche_def join fiche using (fd_id) where f_id=$1',array($this->id));
|
||||
$ret=h2("Type de fiche : ".h($type_card),"");
|
||||
|
||||
$ret=h2("Type de fiche : ".h($type_card)." (id ".$this->id.")","");
|
||||
$ret.="<table>";
|
||||
if ( empty ($attr) )
|
||||
{
|
||||
|
|
@ -688,9 +687,25 @@ class Fiche
|
|||
$w->table=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch($r->ad_type)
|
||||
{
|
||||
case 'select':
|
||||
$x=new ISelect();
|
||||
$x->value=$this->cn->make_array($r->ad_extra);
|
||||
$x->selected=$r->av_text;
|
||||
$value=$x->display();
|
||||
$w->value=$value;
|
||||
break;
|
||||
default:
|
||||
$w->value=$r->av_text;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$w->name="av_text".$r->ad_id;
|
||||
$w->readonly=$p_readonly;
|
||||
$w->readOnly=$p_readonly;
|
||||
|
||||
|
||||
$ret.="<TR>".td($r->ad_text.$bulle).td($w->input()).td($msg)." </TR>";
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ $g_failed="<span style=\"font-size:18px;color:red\">✖</span>";
|
|||
$g_succeed="<span style=\"font-size:18px;color:green\">✓</span>";
|
||||
/*set to none for production */
|
||||
/* uncomment for production */
|
||||
// $version_phpcompta=4444;
|
||||
$version_phpcompta=4620;
|
||||
define ("DEBUG",true);
|
||||
|
||||
|
||||
//$version_phpcompta=SVNINFO;
|
||||
//define ("DEBUG",false);
|
||||
|
||||
|
||||
$version_phpcompta=SVNINFO;
|
||||
define ("DEBUG",false);
|
||||
|
||||
|
||||
|
||||
define ("DBVERSION",100);
|
||||
define ("DBVERSIONREPO",14);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue