/[openfoncier]/trunk/obj/task.class.php
ViewVC logotype

Diff of /trunk/obj/task.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9490 by softime, Tue Aug 25 16:40:48 2020 UTC revision 9585 by gmalvolti, Fri Oct 9 15:22:13 2020 UTC
# Line 29  class task extends task_gen { Line 29  class task extends task_gen {
29          }          }
30      }      }
31    
32        function setType(&$form, $maj) {
33            parent::setType($form, $maj);
34            // Récupération du mode de l'action
35            $crud = $this->get_action_crud($maj);
36    
37            if ($maj < 2) {
38                $form->setType("state", "select");
39            }
40        }
41    
42        /**
43         *
44         */
45        function setSelect(&$form, $maj, &$dnu1 = null, $dnu2 = null) {
46            if($maj < 2) {
47                $contenu=array();
48    
49                $contenu[0][0]="draft";
50                $contenu[1][0]=_('draft');
51                $contenu[0][1]="new";
52                $contenu[1][1]=_('new');
53                $contenu[0][2]="pending";
54                $contenu[1][2]=_('pending');
55                $contenu[0][3]="done";
56                $contenu[1][3]=_('done');
57                $contenu[0][4]="archived";
58                $contenu[1][4]=_('archived');
59                $contenu[0][5]="error";
60                $contenu[1][5]=_('error');
61                $contenu[0][6]="debug";
62                $contenu[1][6]=_('debug');
63    
64                $form->setSelect("state", $contenu);
65            }
66        }
67    
68      public function verifier($val = array(), &$dnu1 = null, $dnu2 = null) {      public function verifier($val = array(), &$dnu1 = null, $dnu2 = null) {
69          parent::verifier($val, $dnu1, $dnu2);          parent::verifier($val, $dnu1, $dnu2);
70          //          //
# Line 82  class task extends task_gen { Line 118  class task extends task_gen {
118              'timestamp_log' => $timestamp_log,              'timestamp_log' => $timestamp_log,
119              'state' => isset($params['val']['state']) === true ? $params['val']['state'] : 'new',              'state' => isset($params['val']['state']) === true ? $params['val']['state'] : 'new',
120              'object_id' => $params['val']['object_id'],              'object_id' => $params['val']['object_id'],
121                'dossier' => $params['val']['dossier'],
122          );          );
123          $task_exists = $this->task_exists($valF['type'], $valF['object_id']);          $task_exists = $this->task_exists($valF['type'], $valF['object_id']);
124          if ($valF['type'] === 'modification_DI' && $task_exists === false) {          if ($valF['type'] === 'modification_DI' && $task_exists === false) {

Legend:
Removed from v.9490  
changed lines
  Added in v.9585

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26