Commit 874231d0 authored by Pegane Nestor's avatar Pegane Nestor
Browse files

FIX #6457 control added on mail category and on id type + validation rules modified

parent bcefd0e6
......@@ -727,11 +727,17 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module
$frm_str .= '</div>';
$frm_str .='<div id =\'show_tab\' module=\'\'>';
$frm_str .='</div>';
if($data['category_id']['value'] == "outgoing"){
$watermark_outgoing = "true";
} else {
$watermark_outgoing = "false";
}
//RESOURCE FRAME
$frm_str .= '<iframe src="' . $_SESSION['config']['businessappurl']
. 'index.php?display=true&dir=indexing_searching&page=view_resource_controler&id='
. $res_id . '&watermark_outgoing=true" name="viewframe" id="viewframe" scrolling="auto" frameborder="0" width="100%" style="width:100% !important;"></iframe>';
. $res_id . '&watermark_outgoing='.$watermark_outgoing.'" name="viewframe" id="viewframe" scrolling="auto" frameborder="0" width="100%" style="width:100% !important;"></iframe>';
$frm_str .= '</div>';
......
......@@ -58,10 +58,17 @@ if ($watermarkTab['text'] == '') {
} elseif ($matches[1][$z] == 'hour_now') {
$currentText = date('H:m:i');
} elseif($matches[1][$z] == 'alt_identifier'){
if($_REQUEST['watermark_outgoing'] == "true"){
$res_id = $_REQUEST['res_id_master'];
} else {
$res_id = $s_id;
}
$dbView = new Database();
$query = " select " . $matches[1][$z]
. " as thecolumn from mlb_coll_ext where res_id = ?";
$stmt = $dbView->query($query, array($_REQUEST['res_id_master']));
$stmt = $dbView->query($query, array($res_id));
$returnQuery = $stmt->fetchObject();
$currentText = $returnQuery->thecolumn;
} else {
......
......@@ -511,6 +511,7 @@
<parameter name="original" type="boolean" />
<parameter name="aVersion" type="boolean" />
<parameter name="dir" type="identifier" />
<parameter name="watermark_outgoing" type="string" />
</validationRule>
<validationRule name="multi_contacts" extends="standardForm" mode="error">
......@@ -759,7 +760,6 @@
<validationRule name="url_path" extends="standardForm" mode="error">
<!-- <parameter name="url" type="url" /> -->
<parameter name="watermark_outgoing" type="string" />
<parameter name="url" type="string" />
<parameter name="baskets" type="identifier" />
<parameter name="origin" type="identifier" />
......
......@@ -79,6 +79,7 @@
<parameter name="module" type="identifier" />
<parameter name="res_id_master" type="integer" />
<parameter name="id" type="identifier" />
<parameter name="watermark_outgoing" type="string" />
</validationRule>
</validationRules>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment