Follow up add followup action
This commit is contained in:
parent
fd8811cafd
commit
37cfa14491
2 changed files with 22 additions and 33 deletions
|
|
@ -517,8 +517,7 @@ class Follow_Up
|
|||
function save()
|
||||
{
|
||||
|
||||
// Get The sequence id,
|
||||
$seq_name="seq_doc_type_".$this->dt_id;
|
||||
|
||||
$str_file="";
|
||||
$add_file='';
|
||||
|
||||
|
|
@ -538,6 +537,8 @@ class Follow_Up
|
|||
$this->ag_title=$doc_mod->dt_value;
|
||||
}
|
||||
$this->ag_id=$this->db->get_next_seq('action_gestion_ag_id_seq');
|
||||
// Get The sequence id,
|
||||
$seq_name="seq_doc_type_".$this->dt_id;
|
||||
|
||||
// Create the reference
|
||||
$ag_ref=$this->db->get_value('select dt_prefix from document_type where dt_id=$1', array($this->dt_id)).'-'.$this->db->get_next_seq($seq_name);
|
||||
|
|
@ -564,7 +565,7 @@ class Follow_Up
|
|||
$this->dt_id, /* 3 */
|
||||
$this->ag_title, /* 4 */
|
||||
$exp->id, /* 5 */
|
||||
$ag_ref, /* 6 */
|
||||
$this->ag_ref, /* 6 */
|
||||
$this->ag_dest, /* 7 */
|
||||
$this->ag_hour, /* 8 */
|
||||
$this->ag_priority, /* 9 */
|
||||
|
|
@ -797,7 +798,6 @@ class Follow_Up
|
|||
$old=new Follow_Up($this->db);
|
||||
$old->ag_id=$this->ag_id;
|
||||
$old->get();
|
||||
|
||||
// If ag_ref changed then check if unique
|
||||
if ($old->ag_ref!=$this->ag_ref)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,39 +26,28 @@
|
|||
* @brief show button in the list of actions
|
||||
*
|
||||
*/
|
||||
require_once NOALYSS_INCLUDE."/lib/select_box.class.php";
|
||||
$http=new HttpInput();
|
||||
// Create select box for new Action
|
||||
$selbox=new Select_Box(uniqid(), _("Ajout action"));
|
||||
$selbox->set_position("normal");
|
||||
$selbox->set_filter("yes");
|
||||
$aDocumentType=$cn->get_array("select dt_id,dt_value from document_type order by 2");
|
||||
$nbDocumentType=count($aDocumentType);
|
||||
$ac=$http->request("ac");
|
||||
$dossier_id=Dossier::id();
|
||||
$sup_parameter=HtmlInput::array_to_string(["sc","sb","f_id","qcode"], $_REQUEST,"&");
|
||||
for ($i=0;$i<$nbDocumentType;$i++) {
|
||||
$selbox->add_url($aDocumentType[$i]['dt_value'],
|
||||
"do.php?".http_build_query([ "ac"=>$ac,"gDossier"=>$dossier_id,"sa"=>"add_action"
|
||||
,"action_type"=>$aDocumentType[$i]["dt_id"]]).$sup_parameter);
|
||||
|
||||
}
|
||||
?>
|
||||
<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="hidden" name="ac" value="<?php echo $http->request('ac')?>">
|
||||
<input type="hidden" name="sa" value="add_action">
|
||||
<?php echo $supl_hidden?>
|
||||
<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>
|
||||
<?=$selbox->input();?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue