Follow-up : tag enable when create doc
This commit is contained in:
parent
e2b76d52c4
commit
dbea6cee68
5 changed files with 36 additions and 14 deletions
|
|
@ -284,12 +284,13 @@ if ($sub_action == "save_action_st2")
|
|||
$act->fromArray($_POST);
|
||||
try {
|
||||
$act->d_id = 0;
|
||||
$act->ag_id=$http->request("ag_id","number");
|
||||
$act->md_id = (isset($_POST['gen_doc'])) ? $_POST['gen_doc'] : 0;
|
||||
|
||||
$act->verify();
|
||||
|
||||
// insert into action_gestion
|
||||
echo $act->save();
|
||||
echo $act->update();
|
||||
$url = "?$base&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get();
|
||||
echo '<p><a class="mtitle" href="' . $url . '">' . hb(_('Evènement Sauvée').' : ' . $act->ag_ref) . '</a></p>';
|
||||
|
||||
|
|
@ -312,8 +313,9 @@ if ($sub_action == "add_action")
|
|||
{
|
||||
$act = new Follow_Up($cn);
|
||||
$act->fromArray($_POST);
|
||||
$act->ag_id = 0;
|
||||
$act->dt_id = $http->request("action_type","number");
|
||||
$act->d_id = 0;
|
||||
$act->save();
|
||||
echo '<div class="content">';
|
||||
// Add hidden tag
|
||||
echo '<form method="post" action="do.php" name="form_add" id="form_add" enctype="multipart/form-data" >';
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ $ag_id=$http->request("ag_id","string","0");
|
|||
|
||||
$ac=$http->request("ac");
|
||||
$base=HtmlInput::request_to_string(array('ac','gDossier'),"");
|
||||
|
||||
echo '<div class="content">';
|
||||
require_once NOALYSS_INCLUDE.'/action.common.inc.php';
|
||||
echo "</div>";
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,6 @@ class Follow_Up
|
|||
{
|
||||
$upd=false;
|
||||
$readonly=false;
|
||||
$this->ag_ref=_("Nouveau");
|
||||
}
|
||||
elseif ($p_view=='READ')
|
||||
{
|
||||
|
|
@ -390,7 +389,7 @@ class Follow_Up
|
|||
$h_agrefid=new IHidden();
|
||||
$iag_ref=new IText("ag_ref");
|
||||
$iag_ref->value=$this->ag_ref;
|
||||
$iag_ref->readOnly=($p_view=="NEW"||$p_view=='READ')?true:false;
|
||||
$iag_ref->readOnly=false;
|
||||
$str_ag_ref=$iag_ref->input();
|
||||
// Preparing the return string
|
||||
$r="";
|
||||
|
|
@ -871,7 +870,9 @@ class Follow_Up
|
|||
$doc->Upload($this->ag_id);
|
||||
|
||||
/* save action details */
|
||||
for ($i=0; $i<$_POST['nb_item']; $i++)
|
||||
$http=new HttpInput();
|
||||
$nb_item=$http->post("nb_item","number",0);
|
||||
for ($i=0; $i< $nb_item ; $i++)
|
||||
{
|
||||
$act=new Follow_Up_Detail($this->db);
|
||||
$act->from_array($_POST, $i);
|
||||
|
|
|
|||
|
|
@ -26,19 +26,39 @@
|
|||
* @brief show button in the list of actions
|
||||
*
|
||||
*/
|
||||
$http=new HttpInput();
|
||||
?>
|
||||
<div class="content" style="display:inline" >
|
||||
<div style="display:inline">
|
||||
<input id="bt_search" type="button" class="smallbutton" onclick="$('search_action').style.display='block'" value="<?php echo _('Recherche') ?>">
|
||||
<input id="bt_add" type="button" class="smallbutton" onclick="$('b_add_action').style.display='block';document.getElementById('action_type').focus()" value="<?php echo _('Ajout') ?>">
|
||||
<div id="b_add_action" style="display:none" class="inner_box">
|
||||
<?php echo HtmlInput::title_box(_("Ajout d'une action"), "b_add_action","hide");?>
|
||||
<form method="get" style="display:inline" action="do.php">
|
||||
<?php echo dossier::hidden();
|
||||
$a_typeAction=new ISelect("action_type");
|
||||
$a_typeAction->rowsize=10;
|
||||
$a_typeAction->value=$cn->make_array("select dt_id,dt_value from document_type order by 2");
|
||||
echo _("Type action ");
|
||||
echo $a_typeAction->input();
|
||||
?>
|
||||
<input type="submit" class="smallbutton" name="submit_query" value="<?php echo _("Ajout Action")?>">
|
||||
<input type="hidden" name="ac" value="<?php echo $_REQUEST['ac']?>">
|
||||
|
||||
<input type="hidden" name="ac" value="<?php echo $http->request('ac')?>">
|
||||
<input type="hidden" name="sa" value="add_action">
|
||||
<?php echo $supl_hidden?>
|
||||
<input id="bt_search" type="button" class="smallbutton" onclick="$('search_action').style.display='block'" value="<?php echo _('Recherche')?>">
|
||||
|
||||
<ul class="aligned-block">
|
||||
<li>
|
||||
|
||||
<input type="submit" class="smallbutton" name="submit_query" value="<?php echo _("Ajout Action")?>">
|
||||
</li>
|
||||
<li>
|
||||
<?php echo HtmlInput::button_hide("b_add_action");?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -31,8 +31,7 @@ $tot_vat=0;
|
|||
$text=new IText();
|
||||
$num=new INum();
|
||||
$itva=new ITva_Popup();
|
||||
$readonly=$p_view;
|
||||
|
||||
$readonly=($p_view == "READ")?true:false;
|
||||
// default menu for invoice
|
||||
$menu=new Default_Menu();
|
||||
?>
|
||||
|
|
@ -59,7 +58,7 @@ $menu=new Default_Menu();
|
|||
$icard->noadd="no";
|
||||
$icard->extra='all';
|
||||
$icard->name="e_march".$i;
|
||||
$tmp_ad=(isset($p_follow_up->aAction_detail[$i]))?$p_follow_up->aAction_detail[$i]:$readonly;
|
||||
$tmp_ad=(isset($p_follow_up->aAction_detail[$i]))?$p_follow_up->aAction_detail[$i]:false;
|
||||
$icard->readOnly=$readonly;
|
||||
$icard->value='';
|
||||
$aCard[$i]=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue