[opencourrier-Commits] r1112 - in branches/5.1.0: dyn obj

1 view
Skip to first unread message

fray...@hephaestos.ovh.adullact.org

unread,
Jun 12, 2020, 6:12:25 AM6/12/20
to openmairie-...@googlegroups.com
Author: fraynaud
Date: 2020-06-12 12:12:23 +0200 (Fri, 12 Jun 2020)
New Revision: 1112

Modified:
branches/5.1.0/dyn/debug.inc.php
branches/5.1.0/obj/courrier.class.php
branches/5.1.0/obj/courrier_arrivee_traitement.class.php
branches/5.1.0/obj/courrier_edition.class.php
Log:

correction edition courrier



Modified: branches/5.1.0/dyn/debug.inc.php
===================================================================
--- branches/5.1.0/dyn/debug.inc.php 2020-06-12 08:51:36 UTC (rev 1111)
+++ branches/5.1.0/dyn/debug.inc.php 2020-06-12 10:12:23 UTC (rev 1112)
@@ -18,6 +18,6 @@
//define('DEBUG', EXTRA_VERBOSE_MODE);
//define('DEBUG', VERBOSE_MODE);
//define('DEBUG', DEBUG_MODE);
-define('DEBUG', PRODUCTION_MODE);
+//define('DEBUG', PRODUCTION_MODE);

?>

Modified: branches/5.1.0/obj/courrier.class.php
===================================================================
--- branches/5.1.0/obj/courrier.class.php 2020-06-12 08:51:36 UTC (rev 1111)
+++ branches/5.1.0/obj/courrier.class.php 2020-06-12 10:12:23 UTC (rev 1112)
@@ -638,7 +638,7 @@
// verification des champs obligatoires dans la table
parent::verifier($val, $db, $DEBUG);
// verification du champ traitement obligatoire en ajout
- if ($maj == 0 and $val['traitement']== null) {
+ if ($this->maj == 0 and $val['traitement']== null) {
$this->addToMessage( _('Le champ').' <span class="bold">'.
_("service de traitement").'</span> '._('est obligatoire'));
$this->correct = false;

Modified: branches/5.1.0/obj/courrier_arrivee_traitement.class.php
===================================================================
--- branches/5.1.0/obj/courrier_arrivee_traitement.class.php 2020-06-12 08:51:36 UTC (rev 1111)
+++ branches/5.1.0/obj/courrier_arrivee_traitement.class.php 2020-06-12 10:12:23 UTC (rev 1112)
@@ -34,7 +34,7 @@
'ajax' => false,
"class" => "edit-16",
'order' => 50,
- 'url' => '../scr/form.php?obj=courrier_edition&amp;idx=',
+ 'url' => '../app/index.php?module=form&amp;obj=courrier_edition&amp;action=1&amp;idx=',
'id' => '',
),
);

Modified: branches/5.1.0/obj/courrier_edition.class.php
===================================================================
--- branches/5.1.0/obj/courrier_edition.class.php 2020-06-12 08:51:36 UTC (rev 1111)
+++ branches/5.1.0/obj/courrier_edition.class.php 2020-06-12 10:12:23 UTC (rev 1112)
@@ -10,6 +10,7 @@

class courrier_edition extends courrier {

+ protected $_absolute_class_name = "courrier_arrivee_traitement";

var $required_field = array(
"texte",
@@ -16,11 +17,24 @@
"om_etat",
);

+
function init_class_actions() {
- parent::init_class_actions();
- // validation de courrier
- }
+ parent::init_class_actions();

+ $this->class_actions[1] = array(
+ "identifier" => "modifier",
+ "portlet" => array(
+ "type" => "action-self",
+ "libelle" => _("modifier"),
+ "class" => "edit-16",
+ "order" => 10,
+ ),
+ "permission_suffix" => "modifier",
+ "crud" => "update",
+ );
+ }
+
+
function setvalF($val = array()) {
//affectation valeur formulaire
// modification que du texte et des états
@@ -90,8 +104,8 @@
echo "\n<a class=\"retour\" ";
echo "href=\"";
//
- echo "form.php";
- echo "?obj=";
+ echo "../app/index.php?module=form";
+ echo "&amp;obj=";
echo "courrier_arrivee_traitement";
echo "&amp;premier=".$this->getParameter("premier");
echo "&amp;tricol=".$this->getParameter("tricol");
@@ -109,7 +123,7 @@

}

- function verifier($val, &$dnu1=null, $dnu2=null) {
+ function verifier($val=array(), &$dnu1=null, $dnu2=null) {
// Vérification des champs requis
$this->checkRequired();
if($val['om_etat']==""){
@@ -120,6 +134,16 @@

}

+ // retour sur form de registre
+ function get_parameter_or_override($parameter = "", $override=array()) {
+ $override["retour"]="form";
+ if (array_key_exists($parameter, $override)) {
+ return $override[$parameter];
+ } else {
+ return $this->getParameter($parameter);
+ }
+ //~ }
+
}

?>

Reply all
Reply to author
Forward
0 new messages