Task #1153 - Boite de dialogue modale
#1153 Dialog box : confirm_form in javascript , use of smoke, add style
This commit is contained in:
parent
8f855f8a50
commit
7e7407575a
26 changed files with 239 additions and 170 deletions
|
|
@ -292,9 +292,13 @@ case 'file':
|
|||
echo '<div class="op_detail_frame">';
|
||||
$x='';
|
||||
if ($access=='W' && $g_user->check_action (RMRECEIPT) == 1)
|
||||
{
|
||||
// Not possible to remove the file thanks a modal dialog box,
|
||||
// because of the frameset
|
||||
$x=sprintf('<a class="smallbutton" style="margin-left:12;margin-right:12" href="ajax_ledger.php?gDossier=%d&div=%s&jr_id=%s&act=rmf" onclick="return confirm(\'Effacer le document ?\')">'.SMALLX.'</a>',
|
||||
$gDossier,$div,$jr_id);
|
||||
|
||||
|
||||
}
|
||||
$filename= $obj->det->jr_pj_name;
|
||||
if ( strlen($obj->det->jr_pj_name) > 20 )
|
||||
{
|
||||
|
|
@ -334,6 +338,8 @@ case 'loadfile':
|
|||
|
||||
// check if the user can remove a document
|
||||
if ($g_user->check_action (RMRECEIPT) == 1) {
|
||||
// Not possible to remove the file thanks a modal dialog box,
|
||||
// because of the frameset
|
||||
$x=sprintf('<a class="mtitle" class="notice" style="margin-left:12;margin-right:12px" href="ajax_ledger.php?gDossier=%d&div=%s&jr_id=%s&act=rmf" onclick="return confirm(\'Effacer le document ?\')">'.SMALLX.'</a>',
|
||||
$gDossier,$div,$jr_id);
|
||||
echo $x;
|
||||
|
|
@ -509,7 +515,8 @@ case 'save':
|
|||
// Save related
|
||||
//////////////////////////////////////////////////////////////////
|
||||
$related=HtmlInput::default_value_post("related", "0");
|
||||
if ($related == "0" ) throw new Exception('Parameter not send -> related'.__FILE__.__LINE__,10);
|
||||
if ($related == "0" )
|
||||
throw new Exception('Parameter not send -> related'.__FILE__.__LINE__,10);
|
||||
$op->insert_related_action($related);
|
||||
|
||||
}
|
||||
|
|
@ -525,9 +532,9 @@ case 'save':
|
|||
ob_end_clean();
|
||||
|
||||
break;
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// remove a reconciliation
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
case 'rmr':
|
||||
if ( $access=='W')
|
||||
{
|
||||
|
|
@ -536,20 +543,25 @@ case 'rmr':
|
|||
$rec->remove($_GET['jr_id2']);
|
||||
}
|
||||
break;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// ask for a date for reversing the operation
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
case 'ask_extdate':
|
||||
$date=new IDate('p_date');
|
||||
$html.="<form id=\"form_".$div."\" onsubmit=\"return reverseOperation(this);\">";
|
||||
$html.=HtmlInput::hidden('jr_id',$_REQUEST['jr_id']).HtmlInput::hidden('div',$div).dossier::hidden().HtmlInput::hidden('act','reverseop');
|
||||
$html.=HtmlInput::hidden('jr_id',$_REQUEST['jr_id']).
|
||||
HtmlInput::hidden('div',$div).
|
||||
dossier::hidden().
|
||||
HtmlInput::hidden('act','reverseop');
|
||||
|
||||
$html.='<h2 class="info">'._('entrez une date').' </H2>'.$date->input();
|
||||
$html.=HtmlInput::submit('x','accepter');
|
||||
$html=HtmlInput::button_close($div);
|
||||
$html.=HtmlInput::button_close($div);
|
||||
$html.='</form>';
|
||||
break;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Reverse an operation
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
case 'reverseop':
|
||||
if ( $access=='W')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -172,14 +172,17 @@ EOF;
|
|||
case 'rem_cat_doc':
|
||||
require_once NOALYSS_INCLUDE.'/class_document_type.php';
|
||||
// if user can not return error message
|
||||
$message="";
|
||||
if ($g_user->check_action(PARCATDOC) == 0)
|
||||
{
|
||||
$html = "nok";
|
||||
$message=_('Action non autorisée');
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo <<<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<data>
|
||||
<dtid>$html</dtid>
|
||||
<message>$message</message>
|
||||
</data>
|
||||
EOF;
|
||||
return;
|
||||
|
|
@ -190,12 +193,14 @@ EOF;
|
|||
|
||||
if ($count_md != 0 || $count_a != 0)
|
||||
{
|
||||
$message=_('Des actions dépendent de cette catégorie');
|
||||
$html = "nok";
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo <<<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<data>
|
||||
<dtid>$html</dtid>
|
||||
<message>$message</message>
|
||||
</data>
|
||||
EOF;
|
||||
exit;
|
||||
|
|
@ -205,9 +210,10 @@ EOF;
|
|||
header('Content-type: text/xml; charset=UTF-8');
|
||||
echo <<<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<data>
|
||||
<dtid>$html</dtid>
|
||||
</data>
|
||||
<data>
|
||||
<dtid>$html</dtid>
|
||||
<message>$message</message>
|
||||
</data>
|
||||
EOF;
|
||||
return;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1111,4 +1111,19 @@ function gestion_add_row()
|
|||
alert_box(e.message);
|
||||
}
|
||||
|
||||
}
|
||||
function document_remove(p_dossier,p_div,p_jrid)
|
||||
{
|
||||
smoke.confirm('Effacer ?', function (e)
|
||||
{
|
||||
if (e) {
|
||||
new Ajax.Request('ajax_ledger.php',
|
||||
{
|
||||
parameters:{"p_dossier":p_dossier,"div":p_div,"p_jrid":p_jrid,'act':'rmf'},
|
||||
onSuccess : function(x) {
|
||||
$('receipt'+p_div).innerHTML=x.responseText;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -84,8 +84,7 @@ function deleteRow(tb, obj)
|
|||
}
|
||||
function deleteRowRec(tb, obj)
|
||||
{
|
||||
var td = obj.parentNode;
|
||||
var tr = td.parentNode;
|
||||
var tr = obj;
|
||||
var lidx = tr.rowIndex;
|
||||
g(tb).deleteRow(lidx);
|
||||
}
|
||||
|
|
@ -417,7 +416,40 @@ function cat_doc_remove(p_dt_id, p_dossier)
|
|||
{
|
||||
var queryString = "gDossier=" + p_dossier + "&op=rem_cat_doc" + "&dt_id=" + p_dt_id;
|
||||
var action = new Ajax.Request(
|
||||
"ajax_misc.php", {method: 'get', parameters: queryString, onFailure: ajax_misc_failure, onSuccess: success_cat_doc_remove}
|
||||
"ajax_misc.php", {method: 'get',
|
||||
parameters: queryString,
|
||||
onFailure: ajax_misc_failure,
|
||||
onSuccess: function (req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var answer = req.responseXML;
|
||||
var html = answer.getElementsByTagName('dtid');
|
||||
if (html.length === 0)
|
||||
{
|
||||
var rec = req.responseText;
|
||||
alert_box('erreur <br>' + rec );
|
||||
return;
|
||||
}
|
||||
nodeXML = html[0];
|
||||
row_id = getNodeText(nodeXML);
|
||||
if (row_id === 'nok')
|
||||
{
|
||||
var message_node = answer.getElementsByTagName('message');
|
||||
var message_text = getNodeText(message_node[0]);
|
||||
alert_box('erreur <br>' + message_text);
|
||||
return;
|
||||
}
|
||||
$('row' + row_id).style.textDecoration = "line-through";
|
||||
$('X' + row_id).style.display='none';
|
||||
$('M' + row_id).style.display='none';
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
alert_box(e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
/**
|
||||
|
|
@ -447,32 +479,6 @@ function cat_doc_change(p_dt_id, p_dossier)
|
|||
);
|
||||
}
|
||||
|
||||
function success_cat_doc_remove(req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var answer = req.responseXML;
|
||||
var html = answer.getElementsByTagName('dtid');
|
||||
if (html.length === 0)
|
||||
{
|
||||
var rec = req.responseText;
|
||||
alert_box('erreur :' + rec);
|
||||
}
|
||||
nodeXML = html[0];
|
||||
row_id = getNodeText(nodeXML);
|
||||
if (row_id === 'nok')
|
||||
{
|
||||
alert_box('Error');
|
||||
return;
|
||||
}
|
||||
$('row' + row_id).style.textDecoration = "line-through";
|
||||
$('X' + row_id).style.display = 'none';
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
alert_box(e.message);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*@brief display the popup with vat and explanation
|
||||
*@param obj with 4 attributes gdossier, ctl,popup
|
||||
|
|
@ -2862,39 +2868,40 @@ function init_scroll()
|
|||
<form onsubmit="return confirm_form(this,'message')">
|
||||
</form>
|
||||
* @endcode
|
||||
* @param p_obj form element id
|
||||
* @param p_obj form element (object) or element id (string)
|
||||
* @param p_message message to display
|
||||
* @returns true or false
|
||||
*/
|
||||
function confirm_form(p_obj, p_message)
|
||||
function confirm_form(p_obj, p_message,p_callback_true)
|
||||
{
|
||||
try {
|
||||
// Find id of the end
|
||||
var name="";
|
||||
if ( typeof (p_obj) == "object") {
|
||||
name=p_obj.id;
|
||||
} else {
|
||||
name=p_obj;
|
||||
if ( p_obj != null )
|
||||
{
|
||||
if ( typeof (p_obj) === "object") {
|
||||
name=p_obj.id;
|
||||
} else {
|
||||
name=p_obj;
|
||||
}
|
||||
}
|
||||
|
||||
// execute the callback function or submit the form
|
||||
if ( p_callback_true == undefined || p_callback_true==null)
|
||||
{
|
||||
smoke.confirm(p_message,function (e) {
|
||||
if ( e ) {
|
||||
$(name).submit();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
smoke.confirm(p_message,function (e)
|
||||
{
|
||||
if ( e ) { p_callback_true.apply();}
|
||||
});
|
||||
}
|
||||
var background_block = document.createElement('DIV');
|
||||
background_block.id = 'background_block';
|
||||
background_block.addClassName('popup_back');
|
||||
document.body.appendChild(background_block);
|
||||
|
||||
var newdiv = document.createElement('DIV');
|
||||
newdiv.id = 'confirm_12';
|
||||
newdiv.addClassName("inner_box confirm_box");
|
||||
//newdiv.innerHTML="<h2 class='title'></h2>";
|
||||
newdiv.innerHTML += '<p style="text-align:center">';
|
||||
newdiv.innerHTML += p_message;
|
||||
newdiv.innerHTML += '</p>';
|
||||
newdiv.innerHTML += '<p style="text-align:center">';
|
||||
newdiv.innerHTML += '<input type="button" class="button" value="ok" onclick="$(\'' + name + '\').submit()">';
|
||||
newdiv.innerHTML += '<input type="button" class="button" value="cancel" onclick="$(\'background_block\').remove();$(\'confirm_12\').remove()">';
|
||||
newdiv.innerHTML += '</p>';
|
||||
document.body.appendChild(newdiv);
|
||||
|
||||
} catch (e) {
|
||||
console.debug(e);
|
||||
alert_box(e.getMessage);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -383,8 +383,11 @@ function html_min_page_start($p_theme="", $p_script="", $p_script2="")
|
|||
<META http-equiv=\"Content-Type\" content=\"text/html; charset=UTF8\">
|
||||
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\" media=\"screen\">
|
||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"style-print.css\" media=\"print\">" .
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"smoke.css\" media=\"screen\">" .
|
||||
$p_script2 . "
|
||||
<script src=\"js/scripts.js\" type=\"text/javascript\"></script>";
|
||||
<script src=\"js/scripts.js\" type=\"text/javascript\"></script>
|
||||
<script src=\"js/acc_ledger.js\" type=\"text/javascript\"></script>
|
||||
<script src=\"js/smoke.js\" type=\"text/javascript\"></script>";
|
||||
echo '</HEAD>
|
||||
';
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if (isset($_POST['generate']))
|
|||
$sub_action = 'detail';
|
||||
}
|
||||
/* for delete */
|
||||
if (isset($_POST['delete']))
|
||||
if (isset($_POST['delete']) && $_POST['delete'] == "1")
|
||||
$sub_action = 'delete';
|
||||
if ($sub_action == "")
|
||||
$sub_action = "list";
|
||||
|
|
@ -196,15 +196,16 @@ if ($sub_action == 'detail')
|
|||
|
||||
if ($g_user->can_write_action($ag_id) == true)
|
||||
{
|
||||
echo '<form enctype="multipart/form-data" class="print" action="do.php" method="post" >';
|
||||
echo '<form enctype="multipart/form-data" id="action_common_frm" class="print" action="do.php" method="post" >';
|
||||
echo $supl_hidden;
|
||||
echo HtmlInput::hidden('ac', $_REQUEST['ac']);
|
||||
echo dossier::hidden();
|
||||
echo $act->Display('UPD', false, $base, $retour);
|
||||
echo '<input type="hidden" name="sa" value="update">';
|
||||
echo HtmlInput::submit("save", "Sauve");
|
||||
echo HtmlInput::submit("add_action_here", _("Ajoute un événement à celui-ci"));
|
||||
echo HtmlInput::submit("delete", _("Efface cet événement "), ' onclick="return confirm(\'' . _("Vous confirmez l\'effacement") . '\')" ');
|
||||
echo '<input type="hidden" id="delete" name="delete" value="0">';
|
||||
echo HtmlInput::submit("save", "Sauve",' onclick="$(\'delete\').value=0"');
|
||||
echo HtmlInput::submit("add_action_here", _("Ajoute un événement à celui-ci"),' onclick="$(\'delete\').value=0"');
|
||||
echo HtmlInput::submit("delete_bt", _("Efface cet événement "), ' onclick="$(\'delete\').value=1;return confirm_form(\'action_common_frm\',\''. _("Vous confirmez l\'effacement") . '\')" ');
|
||||
echo $retour;
|
||||
echo '</form>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
|||
$msg=($new==1)?_("Nouvelle extension"):_("Modification"). " ".$me_menu->value;
|
||||
echo HtmlInput::title_box($msg, $ctl);
|
||||
?>
|
||||
<form method="POST" onsubmit="return confirm('<?php echo _("Vous confirmez");?>')">
|
||||
<form method="POST" id="plugin_detail_frm" onsubmit="return confirm_form('plugin_detail_frm','<?php echo _("Vous confirmez");?>')">
|
||||
<table>
|
||||
<tr>
|
||||
<TD><?php echo _("Label");?></td>
|
||||
|
|
@ -51,11 +51,13 @@ echo HtmlInput::title_box($msg, $ctl);
|
|||
<?php
|
||||
if ($new ==1 )
|
||||
{
|
||||
echo HtmlInput::submit("save_plugin",_("Ajouter ce plugin"));
|
||||
echo HtmlInput::hidden('save_plugin',1);
|
||||
echo HtmlInput::submit("save_plugin_sbt",_("Ajouter ce plugin"));
|
||||
} else {
|
||||
$delete=new ICheckBox('delete_pl');
|
||||
echo "<p>"._("Voulez-vous effacer ce plugin ?")." ".$delete->input()."</p>";
|
||||
echo HtmlInput::submit("mod_plugin",_("Modifier ce plugin"));
|
||||
echo HtmlInput::hidden('mod_plugin',1);
|
||||
echo HtmlInput::submit("mod_plugin_sbt",_("Modifier ce plugin"));
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -147,8 +147,8 @@ if ( isset($_REQUEST['sa']))
|
|||
$ret.=$po->form();
|
||||
$ret.=HtmlInput::hidden('sa','po_update');
|
||||
$ret.=HtmlInput::submit('Correction','Correction');
|
||||
$ret.=sprintf('<A class="mtitle" HREF="?ac='.$_REQUEST['ac'].'&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'">'.
|
||||
'<input type="button" class="smallbutton" value="Efface" onClick="return confirm(\' Voulez-vous vraiment effacer cette activité\');"></A>',
|
||||
$ret.=sprintf('<input type="button" class="smallbutton" value="Efface" onClick="return confirm_form(\'anchor_del\',\' Voulez-vous vraiment effacer cette activité\','
|
||||
. 'function () { window.location=\'do.php?ac='.$_REQUEST['ac'].'&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'\'}) ;"',
|
||||
$po->id,
|
||||
$_REQUEST['pa_id']
|
||||
);
|
||||
|
|
@ -192,7 +192,11 @@ if ( isset($_REQUEST['sa']))
|
|||
$ret.= $new->form();
|
||||
$ret.= $wSa;
|
||||
$ret.=HtmlInput::submit("submit",_("Enregistre"));
|
||||
$ret.=HtmlInput::button_anchor(_('Efface'),"?ac=".$_REQUEST['ac']."&pa_id=".$_GET['pa_id']."&sa=pa_delete&$str_dossier",_('Efface'),'onclick="return confirm(\'Effacer ?\')"','smallbutton');
|
||||
$ret.=HtmlInput::button_anchor(_('Efface'),
|
||||
'',
|
||||
'remove_analytic_plan',
|
||||
'onclick="return confirm_form(\'remove_analytic_plan\',\'Effacer ?\',function () {window.location=\'do.php?ac='.$_REQUEST['ac'].'&pa_id='.$_GET['pa_id'].'&sa=pa_delete&'.$str_dossier.'\';})"',
|
||||
'smallbutton');
|
||||
$ret.= '</form>';
|
||||
/**
|
||||
* Detail now
|
||||
|
|
|
|||
|
|
@ -82,8 +82,7 @@ $select_type->value=array(
|
|||
array('value'=>'card','label'=>_('Fiche')),
|
||||
array('value'=>'select','label'=>_('Selection'))
|
||||
);
|
||||
$remove=new IButton('rmfa');
|
||||
$remove->label=_('Effacer');
|
||||
|
||||
echo '<div class="content">';
|
||||
echo '<form method="post">';
|
||||
|
||||
|
|
@ -106,6 +105,8 @@ for ($e=0;$e<count($array);$e++)
|
|||
$desc->value=$row->get_parameter('desc');
|
||||
$size->value=$row->get_parameter('size');
|
||||
$extra->value=$row->get_parameter('extra');
|
||||
$remove=new IButton('rmfa'.$e);
|
||||
$remove->label=_('Effacer');
|
||||
if ( $row->get_parameter('id')>= 9000)
|
||||
{
|
||||
$select_type->readOnly=false;
|
||||
|
|
@ -119,8 +120,8 @@ for ($e=0;$e<count($array);$e++)
|
|||
$r.=td($size->input());
|
||||
$r.=td($extra->input());
|
||||
|
||||
$remove->javascript=sprintf('if ( confirm(\'Vous confirmez ?\')) { removeCardAttribut(%d,%d,\'tb_rmfa\',this);}',
|
||||
$row->get_parameter('id'),$gDossier);
|
||||
$remove->javascript=sprintf('confirm_form(\'tb_rmfa\',\'Vous confirmez ?\',function() { removeCardAttribut(%d,%d,\'tb_rmfa\',$(\'rmfa%d\') );})',
|
||||
$row->get_parameter('id'),$gDossier,$e);
|
||||
$msg='<span class="notice">'._("Attention : effacera les données qui y sont liées").' </span>';
|
||||
$r.=td($remove->input().$msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ if ( isset($_POST['mod'])) echo hb(_('Information sauvée'));
|
|||
|
||||
$supplier=new Fiche($cn,$f_id);
|
||||
$p_readonly=($g_user->check_action(FICADD)==0)?true:false;
|
||||
if ( ! $p_readonly) echo '<form method="post">';
|
||||
if ( ! $p_readonly) echo '<form id="catergory_detail_frm" method="post">';
|
||||
echo dossier::hidden();
|
||||
echo HtmlInput::hidden('sb','detail');
|
||||
echo HtmlInput::hidden('dc','cc');
|
||||
|
|
@ -67,7 +67,7 @@ if ( ! $p_readonly)
|
|||
{
|
||||
echo HtmlInput::submit('mod',_('Sauver les modifications'));
|
||||
echo HtmlInput::reset(_("Annuler"));
|
||||
echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"');
|
||||
echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick="return confirm_form(\'catergory_detail_frm\',\''.('Confirmer effacement ?').'\');"');
|
||||
echo '</form>';
|
||||
}
|
||||
echo '</div>';
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ require_once NOALYSS_INCLUDE.'/class_fiche_def.php';
|
|||
require_once NOALYSS_INCLUDE.'/class_tool_uos.php';
|
||||
|
||||
$retour=HtmlInput::button_anchor("Retour à la liste", HtmlInput::get_to_string(array("gDossier","ac")));
|
||||
|
||||
$action=HtmlInput::default_value_post('action', '');
|
||||
/*******************************************************************************************/
|
||||
// Add an attribut
|
||||
/*******************************************************************************************/
|
||||
if ( isset($_POST['add_line']))
|
||||
if ( $action == 'add_line')
|
||||
{
|
||||
$fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']);
|
||||
$fiche_def->InsertAttribut($_REQUEST['ad_id']);
|
||||
|
|
@ -48,7 +48,7 @@ if ( isset($_POST['add_line']))
|
|||
/*******************************************************************************************/
|
||||
// Remove an attribut
|
||||
/*******************************************************************************************/
|
||||
if ( isset ($_POST['remove_line']))
|
||||
if ( $action == 'remove_line' )
|
||||
{
|
||||
$fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']);
|
||||
$fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']);
|
||||
|
|
@ -60,7 +60,7 @@ if ( isset ($_POST['remove_line']))
|
|||
/*******************************************************************************************/
|
||||
// Try to remove a category
|
||||
/*******************************************************************************************/
|
||||
if ( isset ($_POST['remove_cat']))
|
||||
if ( $action == 'remove_cat' )
|
||||
{
|
||||
$post_id=HtmlInput::default_value_post('fd_id', 0);
|
||||
if ($post_id == 0 || $post_id >= 500000)
|
||||
|
|
@ -104,7 +104,7 @@ if ( isset ($_POST['change_name']))
|
|||
/*******************************************************************************************/
|
||||
// Save order of the attributes
|
||||
/*******************************************************************************************/
|
||||
if ( isset($_POST['save_line']))
|
||||
if ( $action == 'save_line' )
|
||||
{
|
||||
$fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']);
|
||||
$fiche_def->save_order($_POST);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ $sa=HtmlInput::default_value("sa","",$_REQUEST);
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// Perform request action : update
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (isset($_POST['update']))
|
||||
$action_frm = HtmlInput::default_value_post('action_frm', '');
|
||||
if ( $action_frm == 'update')
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -60,7 +61,7 @@ if (isset($_POST['update']))
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// Perform request action : delete
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
if (isset($_POST['efface']))
|
||||
if ($action_frm == 'delete' )
|
||||
{
|
||||
$ledger->jrn_def_id=$_POST['p_jrn'];
|
||||
$ledger->id=$_POST['p_jrn'];
|
||||
|
|
@ -115,11 +116,12 @@ switch ($sa)
|
|||
{
|
||||
$ledger->id=$_REQUEST['p_jrn'];
|
||||
echo '<div class="content">';
|
||||
echo '<form method="POST">';
|
||||
echo '<form id="cfg_ledger_frm" method="POST">';
|
||||
echo $ledger->display_ledger();
|
||||
echo '<INPUT TYPE="SUBMIT" class="smallbutton" VALUE="'._("Sauve").'" name="update">
|
||||
echo HtmlInput::hidden('action_frm','');
|
||||
echo '<INPUT TYPE="SUBMIT" class="smallbutton" VALUE="'._("Sauve").'" name="update" onClick="$(\'action_frm\').value=\'update\';return confirm_form(\'cfg_ledger_frm\',\'Valider ?\')">
|
||||
<INPUT TYPE="RESET" class="smallbutton" VALUE="Reset">
|
||||
<INPUT TYPE="submit" class="smallbutton" name="efface" value="'._("Efface").'" onClick="return confirm(\'Vous effacez ce journal ?\')">';
|
||||
<INPUT TYPE="submit" class="smallbutton" name="efface" value="'._("Efface").'" onClick="$(\'action_frm\').value=\'delete\';return confirm_form(\'cfg_ledger_frm\',\'Vous effacez ce journal ?\')">';
|
||||
$href=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier']));
|
||||
echo '<a style="display:inline" class="smallbutton" href="do.php?'.$href.'">'._('Retour').'</a>';
|
||||
echo '</FORM>';
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ class Acc_Ledger extends jrn_def_sql
|
|||
|
||||
// Check return code
|
||||
if ($Res == false)
|
||||
throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
|
||||
throw new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]");
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Reverse in jrnx* tables
|
||||
|
|
@ -264,7 +264,7 @@ class Acc_Ledger extends jrn_def_sql
|
|||
FROM quant_sold where j_id=$3", array($p_internal, $j_id, $row));
|
||||
|
||||
if ($Res == false)
|
||||
throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
|
||||
throw new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]");
|
||||
$Res = $this->db->exec_sql("INSERT INTO quant_purchase(
|
||||
qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat,
|
||||
qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier,
|
||||
|
|
@ -275,7 +275,7 @@ class Acc_Ledger extends jrn_def_sql
|
|||
FROM quant_purchase where j_id=$3", array($p_internal, $j_id, $row));
|
||||
|
||||
if ($Res == false)
|
||||
throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
|
||||
throw new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]");
|
||||
}
|
||||
$sql = "insert into jrn (
|
||||
jr_id,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class Document_type
|
|||
$tmp['dt_value'] = $r[$i]['dt_value'];
|
||||
$tmp['dt_prefix'] = $r[$i]['dt_prefix'];
|
||||
|
||||
$bt = new IButton('X' . $r[$i]['dt_id']);
|
||||
$bt = new IButton('M' . $r[$i]['dt_id']);
|
||||
$bt->label = _('Modifier');
|
||||
$bt->javascript = "cat_doc_change('" . $r[$i]['dt_id'] . "','" . Dossier::id() . "');";
|
||||
|
||||
|
|
@ -80,9 +80,8 @@ class Document_type
|
|||
|
||||
$bt = new IButton('X' . $r[$i]['dt_id']);
|
||||
$bt->label = _('Effacer');
|
||||
$bt->javascript = "if (confirm('" . _('Vous confirmez') . "')==true) {";
|
||||
$bt->javascript.="cat_doc_remove('" . $r[$i]['dt_id'] . "','" . Dossier::id() . "');";
|
||||
$bt->javascript.='}';
|
||||
$bt->javascript = "confirm_form('X{$r[$i]['dt_id']}','" . _('Vous confirmez') . "',";
|
||||
$bt->javascript.="function () { cat_doc_remove('{$r[$i]['dt_id']}','" . Dossier::id() . "');})";
|
||||
|
||||
$tmp['js_remove'] = $bt->input();
|
||||
|
||||
|
|
|
|||
|
|
@ -766,17 +766,22 @@ $order
|
|||
/* attributes */
|
||||
$r.='<fieldset><legend>'._('Détails').'</legend>';
|
||||
|
||||
$r.= '<FORM method="POST">';
|
||||
$r.= '<FORM id="input_detail_frm" method="POST">';
|
||||
$r.=dossier::hidden();
|
||||
$r.=HtmlInput::hidden("fd_id", $this->id);
|
||||
$r.=HtmlInput::hidden("action", "");
|
||||
$r.= $this->DisplayAttribut("remove");
|
||||
$r.= HtmlInput::submit('add_line', _('Ajoutez cet élément'));
|
||||
$r.= HtmlInput::submit("save_line", _("Sauvez"));
|
||||
$r.=HtmlInput::submit('remove_cat', _('Effacer cette catégorie'), 'onclick="return confirm(\'' . _('Vous confirmez ?') . '\')"');
|
||||
$r.= HtmlInput::submit('add_line_bt', _('Ajoutez cet élément'),
|
||||
'onclick="$(\'action\').value=\'add_line\'"');
|
||||
$r.= HtmlInput::submit("save_line_bt", _("Sauvez"),
|
||||
'onclick="$(\'action\').value=\'save_line\'"');
|
||||
|
||||
$r.=HtmlInput::submit('remove_cat_bt', _('Effacer cette catégorie'), 'onclick="$(\'action\').value=\'remove_cat\';return confirm_form(\'input_detail_frm\',\'' . _('Vous confirmez ?') . '\')"');
|
||||
// if there is nothing to remove then hide the button
|
||||
if (strpos($r, "chk_remove") != 0)
|
||||
{
|
||||
$r.=HtmlInput::submit('remove_line', _("Enleve les éléments cochés"), "onclick=\"return confirm('Vous confirmez?')\"");
|
||||
$r.=HtmlInput::submit('remove_line_bt', _("Enleve les éléments cochés"),
|
||||
'onclick="$(\'action\').value=\'remove_line\';return confirm_form(\'input_detail_frm\',\'' . _('Vous confirmez ?') . '\')"');
|
||||
}
|
||||
$r.= "</form>";
|
||||
$r.=" <p class=\"notice\"> " . _("Attention : il n'y aura pas de demande de confirmation pour enlever les
|
||||
|
|
|
|||
|
|
@ -1083,7 +1083,7 @@ class Follow_Up
|
|||
function get_last($p_limit)
|
||||
{
|
||||
|
||||
$sql="select coalesce(vw_name,'Interne') as vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ".
|
||||
$sql="select coalesce(vw_name,'Interne') as vw_name,quick_code,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ".
|
||||
" from action_gestion join document_type ".
|
||||
" on (ag_type=dt_id) "
|
||||
. "left join vw_fiche_attr on (f_id=f_id_dest) "
|
||||
|
|
|
|||
|
|
@ -901,10 +901,10 @@ class HtmlInput
|
|||
*/
|
||||
static function button_action_remove_operation($p_operation)
|
||||
{
|
||||
$rmOperation=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer cette relation ')."')==true ) {remove_operation('%s','%s');}",
|
||||
$rmOperation=sprintf("javascript:confirm_form(null,'"._('Voulez-vous effacer cette relation ')."',function () {remove_operation('%s','%s');});",
|
||||
dossier::id(),
|
||||
$p_operation);
|
||||
$js= '<a class="tinybutton" id="acop'.$p_operation.'" href="'.$rmOperation.'">'.SMALLX.'</a>';
|
||||
$js= '<a class="tinybutton" id="acop'.$p_operation.'" href="javascript:void(0)" onclick="'.$rmOperation.'">'.SMALLX.'</a>';
|
||||
return $js;
|
||||
}
|
||||
static function button_action_add_concerned_card($p_agid)
|
||||
|
|
|
|||
|
|
@ -239,7 +239,8 @@ class Periode
|
|||
$change='<TD></TD>';
|
||||
$remove=sprintf(_('Nombre opérations %d'),$l_line['count_op']);
|
||||
$remove=td($remove,' class="mtitle" ');
|
||||
$change=td ('<A class="mtitle" HREF="?ac='.$_REQUEST['ac'].'&action=reopen&p_per='.$l_line['p_id'].'&'.$str_dossier.'" onclick="return confirm(\''._('Confirmez Réouverture').' ?\')"> Réouverture</A>',' class="mtitle"');
|
||||
$change=td ('<A class="mtitle" HREF="javascript:void(0)"'
|
||||
. ' onclick="return confirm_form(null,\''._('Confirmez Réouverture').' ?\',function() {window.location=\'do.php?ac='.$_REQUEST['ac'].'&action=reopen&p_per='.$l_line['p_id'].'&'.$str_dossier.'\';} )"> Réouverture</A>',' class="mtitle"');
|
||||
|
||||
}
|
||||
else
|
||||
|
|
@ -261,8 +262,14 @@ class Periode
|
|||
|
||||
if ($l_line['count_op'] == 0 )
|
||||
{
|
||||
$remove.='<A class="mtitle" HREF="?ac='.$_REQUEST['ac'].'&action=delete_per&p_per='.
|
||||
$l_line['p_id']."&$str_dossier\" onclick=\"return confirm ('"._('Confirmez effacement ?')."')\" > Efface</A>";
|
||||
$go='do.php?'.http_build_query(array('ac'=>$_REQUEST['ac'],
|
||||
'action'=>'delete_per',
|
||||
'p_per'=>$l_line['p_id'],
|
||||
'gDossier'=>Dossier::id()));
|
||||
|
||||
$remove.='<A class="mtitle" HREF="javascript:void(0)" '
|
||||
. 'onclick="return confirm_form (null,\''._('Confirmez effacement ?').'\',function() { window.location=\''.$go.'\'});" >'
|
||||
. ' Efface</A>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -358,8 +365,14 @@ class Periode
|
|||
$closed="";
|
||||
if ( $l_line['status'] != 'OP' )
|
||||
{
|
||||
$closed=td ('<A class="mtitle" HREF="?ac='.$_REQUEST['ac'].'&action=reopen&p_per='.$l_line['p_id'].'&'.$str_dossier.'&jrn_def_id='.$this->jrn_def_id.'" onclick="return confirm(\''._('Confirmez Réouverture').' ?\')"> Réouverture</A>',' class="mtitle"');
|
||||
// $closed=($l_line['status']=='CE')?'<TD>Centralisee</TD>':'<TD>Fermée</TD>';
|
||||
$go='do.php?'.http_build_query(array('ac'=>$_REQUEST['ac'],
|
||||
'action'=>'reopen',
|
||||
'p_per'=>$l_line['p_id'],
|
||||
'gDossier'=>Dossier::id(),
|
||||
'jrn_def_id'=>$this->jrn_def_id));
|
||||
|
||||
$closed=td ('<A class="mtitle" HREF="javascript:void(0)" '
|
||||
. 'onclick="return confirm_form(null,\''._('Confirmez Réouverture').' ?\',function() {window.location=\''.$go.'\';} );"> Réouverture</A>',' class="mtitle"');
|
||||
}
|
||||
|
||||
echo "$closed";
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
||||
require_once NOALYSS_INCLUDE.'/class_anticipation.php';
|
||||
$action=HtmlInput::default_value_get('action','');
|
||||
|
||||
echo '<div class="content">';
|
||||
|
||||
$sa = (isset($_REQUEST['sa'])) ? $_REQUEST['sa'] : 'list';
|
||||
|
|
@ -34,7 +36,7 @@ $sa = (isset($_REQUEST['sa'])) ? $_REQUEST['sa'] : 'list';
|
|||
*
|
||||
*
|
||||
* ******************************************************************** */
|
||||
if (isset($_GET['del']))
|
||||
if ( $action == 'del' )
|
||||
{
|
||||
$forecast = new Forecast($cn, $_GET['f_id']);
|
||||
$forecast->delete();
|
||||
|
|
@ -42,7 +44,7 @@ if (isset($_GET['del']))
|
|||
/*
|
||||
* Cloning
|
||||
*/
|
||||
if (isset($_REQUEST ['clone']))
|
||||
if ( $action == 'clone' )
|
||||
{
|
||||
echo "<h2> cloning</h2>";
|
||||
/*
|
||||
|
|
@ -274,7 +276,7 @@ if ($sa == 'new')
|
|||
*
|
||||
*
|
||||
* ******************************************************************** */
|
||||
if (isset($_GET['mod_cat']))
|
||||
if ( $action == 'mod_cat')
|
||||
{
|
||||
$anc = new Anticipation($cn, $_GET['f_id']);
|
||||
echo '<div class="content">';
|
||||
|
|
@ -295,20 +297,13 @@ if (isset($_GET['mod_cat']))
|
|||
*
|
||||
*
|
||||
* ******************************************************************** */
|
||||
if (isset($_GET['mod_item']))
|
||||
if ($action == 'mod_item' )
|
||||
{
|
||||
|
||||
/* Propose a form for the items
|
||||
*/
|
||||
$anticip = new Anticipation($cn, $_GET['f_id']);
|
||||
echo '<div class="content">';
|
||||
echo ICard::ipopup('ipopcard');
|
||||
echo IPoste::ipopup('ipop_account');
|
||||
$search_card = new IPopup('ipop_card');
|
||||
$search_card->title = _('Recherche de fiche');
|
||||
$search_card->value = '';
|
||||
echo $search_card->input();
|
||||
|
||||
echo '<form method="post" action="?">';
|
||||
echo dossier::hidden();
|
||||
echo HtmlInput::hidden('sa', 'new');
|
||||
|
|
@ -334,14 +329,15 @@ if (isset($_REQUEST['f_id']) && $sa == "vw")
|
|||
{
|
||||
echo $forecast->display();
|
||||
echo '<div class="noprint">';
|
||||
echo '<form method="get">';
|
||||
echo '<form id="forecast_frm" method="get">';
|
||||
echo dossier::hidden();
|
||||
echo HtmlInput::hidden('action','');
|
||||
echo HtmlInput::hidden('f_id', $_REQUEST['f_id']);
|
||||
echo HtmlInput::submit('mod_cat', _('Modifier nom ou catégories'));
|
||||
echo HtmlInput::submit('mod_item', _('Modifier éléments'));
|
||||
echo HtmlInput::submit('mod_cat_bt', _('Modifier nom ou catégories'),'onclick="$(\'action\').value=\'mod_cat\';"');
|
||||
echo HtmlInput::submit('mod_item_bt', _('Modifier éléments'),'onclick="$(\'action\').value=\'mod_item\';"');
|
||||
//echo HtmlInput::submit('cvs',_('Export CVS'));
|
||||
echo HtmlInput::submit('del', _('Effacer'), 'onclick="return confirm(\'' . _('Vous confirmez l\\\' effacement') . '\')"');
|
||||
echo HtmlInput::submit('clone', _('Cloner'), 'onclick="return confirm(\'' . _('Vous confirmez le clonage ') . '\')"');
|
||||
echo HtmlInput::submit('del_bt', _('Effacer'), 'onclick="$(\'action\').value=\'del\';return confirm_form(\'forecast_frm\',\'' . _('Vous confirmez l\\\' effacement') . '\')"');
|
||||
echo HtmlInput::submit('clone_bt', _('Cloner'), 'onclick="$(\'action\').value=\'clone\';return confirm_form(\'forecast_frm\',\'' . _('Vous confirmez le clonage ') . '\')"');
|
||||
echo HtmlInput::hidden('ac', $_REQUEST['ac']);
|
||||
$href=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier']));
|
||||
echo '<a style="display:inline" class="smallbutton" href="do.php?'.$href.'">'._('Retour').'</a>';
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ if ( isset($_POST['save_plugin']))
|
|||
$plugin->me_description=$me_description;
|
||||
$plugin->me_parameter='plugin_code='.$me_code;
|
||||
$plugin->insert_plugin();
|
||||
$plugin->insert_profile_module();
|
||||
}
|
||||
/**
|
||||
* if post update then we update
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if ( $request_sa== 'jrn' )
|
|||
echo '<td>'.h($row['od_name']).'</td>';
|
||||
echo '<td>'.h($row['od_description']).'</td>';
|
||||
echo '<td>';
|
||||
echo '<form method="POST" class="print" style="margin:0px;padding:0px;">';
|
||||
echo '<form method="POST" id="preod_frm" class="print" style="margin:0px;padding:0px;">';
|
||||
echo dossier::hidden();
|
||||
echo $hid->input("sa","del");
|
||||
echo $hid->input("ac",$request_ac);
|
||||
|
|
@ -106,7 +106,7 @@ if ( $request_sa== 'jrn' )
|
|||
echo $hid->input("jrn",$get_jrn);
|
||||
|
||||
$b='<input type="submit" class="smallbutton" value="'._("Effacer").'"'.
|
||||
' onClick="return confirm(\''._("Voulez-vous vraiment effacer cette operation ?").'\');" >';
|
||||
' onClick="return confirm_form(\'preod_frm\',\''._("Voulez-vous vraiment effacer cette operation ?").'\');" >';
|
||||
echo $b;
|
||||
echo '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -203,10 +203,10 @@
|
|||
</div>
|
||||
<?php echo HtmlInput::submit('save_key', _('Sauver')); ?>
|
||||
</form>
|
||||
<form style="display:inline" action="do.php" method="post">
|
||||
<form style="display:inline" action="do.php" id="anc_key_input_frm" method="post">
|
||||
<?php
|
||||
echo HtmlInput::request_to_hidden(array('gDossier', 'ac'));
|
||||
echo HtmlInput::hidden('op','delete_key');
|
||||
echo HtmlInput::hidden('key', $this->key->getp('id'));
|
||||
if ($this->key->getp('id') != -1) echo HtmlInput::submit('delete_key', _('Effacer'),'onclick="return confirm(\''._('Confirmer effacement?').'\')"'); ?>
|
||||
if ($this->key->getp('id') != -1) echo HtmlInput::submit('delete_key', _('Effacer'),'onclick="return confirm_form(\'anc_key_input_frm\',\''._('Confirmer effacement?').'\')"'); ?>
|
||||
</form>
|
||||
|
|
@ -286,7 +286,6 @@ for($i=0;$i<count($last_ledger);$i++):
|
|||
<div id="last_operation_management_div" class="box">
|
||||
<?php
|
||||
echo HtmlInput::title_box(_('Suivi'),"last_operation_management_div",'zoom','onclick="action_show('.dossier::id().')"');
|
||||
//echo HtmlInput::title_box(_('Suivi'),"last_operation_management_div");
|
||||
?>
|
||||
<?php
|
||||
require_once NOALYSS_INCLUDE.'/class_follow_up.php';
|
||||
|
|
@ -306,7 +305,7 @@ for($i=0;$i<count($last_ledger);$i++):
|
|||
<?php echo HtmlInput::detail_action($array[$i]['ag_id'], $array[$i]['ag_ref'], 1) ?>
|
||||
</td>
|
||||
<td class="box">
|
||||
<?php echo mb_substr(h($array[$i]['vw_name']),0,15)?>
|
||||
<?php echo mb_substr(h($array[$i]['quick_code']),0,15)?>
|
||||
</td>
|
||||
<td class="box cut">
|
||||
<?php echo h($array[$i]['ag_title'])?>
|
||||
|
|
|
|||
|
|
@ -193,11 +193,11 @@
|
|||
{
|
||||
if ( $p_view != 'READ' && $p_base != 'ajax')
|
||||
{
|
||||
$rmAction=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer cette action ')."')==true ) {remove_action('%s','%s','%s');}",
|
||||
$rmAction=sprintf("return confirm_form(null,'"._('Voulez-vous effacer cette action ')."', function () {remove_action('%s','%s','%s');});",
|
||||
dossier::id(),
|
||||
$action[$o]['ag_id'],$_REQUEST['ag_id']);
|
||||
$showAction='<a class="line" href="'.$base."&ag_id=".$action[$o]['ag_id'].'">';
|
||||
$js= '<a class="tinybutton" id="acact'.$action[$o]['ag_id'].'" href="'.$rmAction.'">'.SMALLX.'</a>';
|
||||
$js= '<a class="tinybutton" id="acact'.$action[$o]['ag_id'].'" href="javascript:void(0)" onclick="'.$rmAction.'">'.SMALLX.'</a>';
|
||||
echo '<li id="act'.$action[$o]['ag_id'].'">'.$showAction.$action[$o]['str_date']." ".$action[$o]['ag_ref']." ".
|
||||
h($action[$o]['sub_title']).'('.h($action[$o]['dt_value']).')</a>'." "
|
||||
.$js.'</li>';
|
||||
|
|
@ -271,10 +271,10 @@ for( $c=0;$c<count($acomment);$c++){
|
|||
<?php
|
||||
if ( $p_view != 'READ')
|
||||
{
|
||||
$rmComment=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer ce commentaire')." ?')==true ) {remove_comment('%s','%s');}",
|
||||
$rmComment=sprintf("return confirm_form(null,'"._('Voulez-vous effacer ce commentaire')." ?',function() {remove_comment('%s','%s');});",
|
||||
dossier::id(),
|
||||
$acomment[$c]['agc_id']);
|
||||
$js= '<a class="tinybutton" id="accom'.$acomment[$c]['agc_id'].'" href="'.$rmComment.'">'.SMALLX.'</a>';
|
||||
$js= '<a class="tinybutton" id="accom'.$acomment[$c]['agc_id'].'" href="javascript:void(0)" onclick="'.$rmComment.'">'.SMALLX.'</a>';
|
||||
echo hb('n°'.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." ".$acomment[$c]['str_agc_date'].')').$js.
|
||||
'<pre style="white-space: -moz-pre-wrap;white-space: pre-wrap;border:1px solid blue;width:80%;" id="com'.$acomment[$c]['agc_id'].'"> '.
|
||||
" ".h($acomment[$c]['agc_comment']).'</pre>'
|
||||
|
|
@ -462,14 +462,14 @@ for ($i=0;$i<sizeof($aAttachedFile);$i++) :
|
|||
<?php else: ?>
|
||||
</span>
|
||||
<?php endif;?>
|
||||
<?php $rmDoc=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer le document')." %s')==true ) {remove_document('%s','%s');}",
|
||||
<?php $rmDoc=sprintf("return confirm_form(null,'"._('Voulez-vous effacer le document')." %s' , function(){remove_document('%s','%s');});",
|
||||
$aAttachedFile[$i]['d_filename'],
|
||||
dossier::id(),
|
||||
$aAttachedFile[$i]['d_id']);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($p_view != 'READ') : ?> <a class="line" id="<?php echo "ac".$aAttachedFile[$i]['d_id'];?>" href="<?php echo $rmDoc;?>"><?php echo _("Effacer")?></a><?php endif;?>
|
||||
<?php if ($p_view != 'READ') : ?> <a class="line" id="<?php echo "ac".$aAttachedFile[$i]['d_id'];?>" href="javascript:void(0)" onclick="<?php echo $rmDoc;?>"><?php echo _("Effacer")?></a><?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -168,13 +168,14 @@ if ($aRap != null ) {
|
|||
$rmReconciliation=new IButton('rmr');
|
||||
$rmReconciliation->label=SMALLX;
|
||||
$rmReconciliation->class="tinybutton";
|
||||
$rmReconciliation->javascript="if (confirm ('vous confirmez?') ) {";
|
||||
$rmReconciliation->javascript.=sprintf('dropLink(\'%s\',\'%s\',\'%s\',\'%s\');deleteRowRec(\'%s\',this);}',
|
||||
$rmReconciliation->javascript="return confirm_form(null,'"._("vous confirmez?")."',";
|
||||
$rmReconciliation->javascript.=sprintf('function () { dropLink(\'%s\',\'%s\',\'%s\',\'%s\');deleteRowRec(\'%s\',$(\'row%d\'));})',
|
||||
$gDossier,
|
||||
$div,
|
||||
$jr_id,
|
||||
$aRap[$e],
|
||||
$tableid
|
||||
$tableid,
|
||||
$e
|
||||
);
|
||||
if ( $access=='W')
|
||||
$remove=$rmReconciliation->input();
|
||||
|
|
@ -182,7 +183,11 @@ if ($aRap != null ) {
|
|||
$remove='';
|
||||
|
||||
$comment=strip_tags($array_jr[0]['jr_comment']);
|
||||
echo tr (td(format_date($array_jr[0]['jr_date'])).td('<a class="line" href="javascript:void(0)" onclick="'.$str.'" >'.$internal.'</A>').td($comment).td(nbm($amount)).td($remove));
|
||||
echo tr (td(format_date($array_jr[0]['jr_date'])).
|
||||
td('<a class="line" href="javascript:void(0)" onclick="'.$str.'" >'.$internal.'</A>').
|
||||
td($comment).
|
||||
td(nbm($amount)).
|
||||
td($remove),' id = "row'.$e.'"');
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
|
|
@ -291,7 +296,7 @@ if ( $div != 'popup' ) {
|
|||
{
|
||||
$remove=new IButton('Effacer');
|
||||
$remove->label=_('Effacer');
|
||||
$remove->javascript="if ( confirm('Vous confirmez effacement ?')) {removeOperation('".$obj->det->jr_id."',".dossier::id().",'".$div."')}";
|
||||
$remove->javascript="return confirm_form(null,'Vous confirmez effacement ?',function () {removeOperation('".$obj->det->jr_id."',".dossier::id().",'".$div."')})";
|
||||
echo $remove->input();
|
||||
}
|
||||
|
||||
|
|
@ -304,8 +309,9 @@ echo '</form>';
|
|||
|
||||
echo '<div id="ext'.$div.'" class="inner_box" style="position:relative;top:-150px;display:none">';
|
||||
$date=new IDate('ext_date');
|
||||
$r="<form id=\"form_".$div."\" onsubmit=\"this.divname='$div';return reverseOperation(this);\">";
|
||||
$r.=HtmlInput::hidden('jr_id',$_REQUEST['jr_id']).HtmlInput::hidden('div',$div).dossier::hidden().HtmlInput::hidden('act','reverseop');
|
||||
$r="<form id=\"form_".$div."\" onsubmit=\"return false;\">";
|
||||
$r.=HtmlInput::hidden('jr_id',$_REQUEST['jr_id'])
|
||||
. HtmlInput::hidden('div',$div).dossier::hidden().HtmlInput::hidden('act','reverseop');
|
||||
$r.=HtmlInput::title_box(_('Extourner'), 'ext'.$div, 'hide');
|
||||
$r.="<p>";
|
||||
$r.= _("Extourner une opération vous permet de l'annuler par son écriture inverse");
|
||||
|
|
@ -313,7 +319,8 @@ echo '</form>';
|
|||
|
||||
$r.=_("entrez une date")." :".$date->input();
|
||||
$r.='<p style="text-align:center">';
|
||||
$r.=HtmlInput::submit('x','accepter','onclick="return confirm(\'Vous confirmez ? \');"');
|
||||
$r.=HtmlInput::submit('x','accepter',
|
||||
'onclick="confirm_form($(\'form_'.$div.'\'),\'Vous confirmez ? \',function () {$(\'form_'.$div.'\').divname=\''.$div.'\';reverseOperation($(\'form_'.$div.'\'))}); return false"');
|
||||
$r.="</p>";
|
||||
$r.='</form>';
|
||||
echo $r;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ if ($UserChange->id == false)
|
|||
/*
|
||||
* Update user changes
|
||||
*/
|
||||
if (isset($_POST['SAVE']))
|
||||
$sbaction=HtmlInput::default_value_post('sbaction', "");
|
||||
if ($sbaction == "save")
|
||||
{
|
||||
$uid = $_POST['UID'];
|
||||
|
||||
|
|
@ -81,28 +82,25 @@ if (isset($_POST['SAVE']))
|
|||
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ($sbaction == "delete")
|
||||
{
|
||||
//
|
||||
// Delete the user
|
||||
//
|
||||
if (isset($_POST["DELETE"]))
|
||||
{
|
||||
$cn = new Database();
|
||||
$Res = $cn->exec_sql("delete from jnt_use_dos where use_id=$1", array($uid));
|
||||
$Res = $cn->exec_sql("delete from ac_users where use_id=$1", array($uid));
|
||||
//
|
||||
// Delete the user
|
||||
//
|
||||
$cn = new Database();
|
||||
$Res = $cn->exec_sql("delete from jnt_use_dos where use_id=$1", array($uid));
|
||||
$Res = $cn->exec_sql("delete from ac_users where use_id=$1", array($uid));
|
||||
|
||||
echo "<center><H2 class=\"info\"> Utilisateur " . h($_POST['fname']) . " " . h($_POST['lname']) . " est effacé</H2></CENTER>";
|
||||
require_once NOALYSS_INCLUDE.'/class_iselect.php';
|
||||
require_once NOALYSS_INCLUDE.'/user.inc.php';
|
||||
return;
|
||||
}
|
||||
echo "<center><H2 class=\"info\"> Utilisateur " . h($_POST['fname']) . " " . h($_POST['lname']) . " est effacé</H2></CENTER>";
|
||||
require_once NOALYSS_INCLUDE.'/class_iselect.php';
|
||||
require_once NOALYSS_INCLUDE.'/user.inc.php';
|
||||
return;
|
||||
}
|
||||
$UserChange->load();
|
||||
$it_pass=new IText('password');
|
||||
$it_pass->value="";
|
||||
?>
|
||||
<FORM METHOD="POST">
|
||||
<FORM id="user_detail_frm" METHOD="POST">
|
||||
|
||||
<?php echo HtmlInput::hidden('UID',$uid)?>
|
||||
<TABLE BORDER=0>
|
||||
|
|
@ -173,10 +171,10 @@ $it_pass->value="";
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="sbaction" id="sbaction" value="">
|
||||
<input type="Submit" class="button" NAME="SAVE" VALUE="Sauver les changements" onclick="$('sbaction').value='save';return confirm_form('user_detail_frm','Confirmer changement ?');">
|
||||
|
||||
<input type="Submit" class="button" NAME="SAVE" VALUE="Sauver les changements" onclick="return confirm('Confirmer changement ?');">
|
||||
|
||||
<input type="Submit" class="button" NAME="DELETE" VALUE="Effacer" onclick="return confirm('Confirmer effacement ?');" >
|
||||
<input type="Submit" class="button" NAME="DELETE" VALUE="Effacer" onclick="$('sbaction').value='delete';return confirm_form('user_detail_frm','Confirmer effacement ?');" >
|
||||
|
||||
</FORM>
|
||||
<?php
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue