fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [10826] Added functionality related to adding nes fie


From: Torstein
Subject: [Fmsystem-commits] [10826] Added functionality related to adding nes field location code in table case
Date: Thu, 14 Feb 2013 12:21:32 +0000

Revision: 10826
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10826
Author:   vator
Date:     2013-02-14 12:21:31 +0000 (Thu, 14 Feb 2013)
Log Message:
-----------
Added functionality related to adding nes field location code in table case

Modified Paths:
--------------
    trunk/controller/inc/class.socase.inc.php
    trunk/controller/inc/class.uicase.inc.php
    trunk/controller/templates/base/check_list/add_case.xsl

Modified: trunk/controller/inc/class.socase.inc.php
===================================================================
--- trunk/controller/inc/class.socase.inc.php   2013-02-14 12:13:24 UTC (rev 
10825)
+++ trunk/controller/inc/class.socase.inc.php   2013-02-14 12:21:31 UTC (rev 
10826)
@@ -83,6 +83,7 @@
                                
$case->set_modified_date($this->unmarshal($this->db->f('modified_date'), 
'int'));
                                
$case->set_modified_by($this->unmarshal($this->db->f('modified_by'), 'int'));
                                
$case->set_measurement($this->unmarshal($this->db->f('measurement'), 'string'));
+        
$case->set_location_code($this->unmarshal($this->db->f('location_code'), 
'string'));
                                        
                                return $case;
                        }
@@ -122,6 +123,7 @@
                                
$case->set_modified_date($this->unmarshal($this->db->f('modified_date'), 
'int'));
                                
$case->set_modified_by($this->unmarshal($this->db->f('modified_by'), 'int'));
                                
$case->set_measurement($this->unmarshal($this->db->f('measurement'), 'string'));
+        
$case->set_location_code($this->unmarshal($this->db->f('location_code'), 
'string'));
                                
                                $cases_array[] = $case;
                        }
@@ -148,6 +150,7 @@
                                        'modified_date',
                                        'modified_by',
                                        'measurement',
+          'location_code'
                        );
 
                        $values = array(
@@ -160,10 +163,12 @@
                                $this->marshal($case->get_entry_date(), 'int'),
                                $this->marshal($case->get_modified_date(), 
'int'),
                                $this->marshal($case->get_modified_by(), 'int'),
-                               $this->marshal($case->get_measurement(), 
'string')
+                               $this->marshal($case->get_measurement(), 
'string'),
+        $this->marshal($case->get_location_code(), 'string')
                        );
 
-                       $result = $this->db->query('INSERT INTO 
controller_check_item_case (' . join(',', $cols) . ') VALUES (' . join(',', 
$values) . ')', __LINE__,__FILE__);
+      $sql = 'INSERT INTO controller_check_item_case (' . join(',', $cols) . 
') VALUES (' . join(',', $values) . ')';
+      $result = $this->db->query( $sql, __LINE__,__FILE__);
 
                        return $result ? 
$this->db->get_last_insert_id('controller_check_item_case', 'id') : 0;
                }
@@ -188,7 +193,8 @@
                                'entry_date = ' . 
$this->marshal($case->get_entry_date(), 'int'),
                                'modified_date = ' . 
$this->marshal($case->get_modified_date(), 'int'),
                                'modified_by = ' . 
$this->marshal($case->get_modified_by(), 'int'),
-                               'measurement = ' . 
$this->marshal($case->get_measurement(), 'string')
+                               'measurement = ' . 
$this->marshal($case->get_measurement(), 'string'),
+        'location_code = ' . $this->marshal($case->get_location_code(), 
'string')
                        );
 
                        $result = $this->db->query('UPDATE 
controller_check_item_case SET ' . join(',', $values) . " WHERE id=$id", 
__LINE__,__FILE__);

Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php   2013-02-14 12:13:24 UTC (rev 
10825)
+++ trunk/controller/inc/class.uicase.inc.php   2013-02-14 12:21:31 UTC (rev 
10826)
@@ -137,7 +137,7 @@
                        }
                        else{
                                return json_encode( array( "status" => 
"not_saved" ) );
-                       }       
+                       }
                }
                
                function save_case(){

Modified: trunk/controller/templates/base/check_list/add_case.xsl
===================================================================
--- trunk/controller/templates/base/check_list/add_case.xsl     2013-02-14 
12:13:24 UTC (rev 10825)
+++ trunk/controller/templates/base/check_list/add_case.xsl     2013-02-14 
12:21:31 UTC (rev 10826)
@@ -56,9 +56,10 @@
                                                                                
                <form class="frm_register_case expand_item" 
action="{$action_url}" method="post">
                                                                                
                        <xsl:variable name="control_item_id"><xsl:value-of 
select="id"/></xsl:variable>
                                                                                
                        <input type="hidden" name="control_item_id" 
value="{$control_item_id}" /> 
-                                                                               
                        <input name="check_list_id" 
type="hidden"><xsl:attribute name="value"><xsl:value-of 
select="//check_list/id"/></xsl:attribute></input>
-                                                                               
                  <input name="status" type="hidden" value="0" />
-                          <input name="type" type="hidden" 
value="control_item_type_1" />
+                                                                               
                        <input type="hidden" 
name="check_list_id"><xsl:attribute name="value"><xsl:value-of 
select="//check_list/id"/></xsl:attribute></input>
+                                                                               
                  <input type="hidden" name="status" value="0" />
+                          <input type="hidden" name="type" 
value="control_item_type_1" />
+                          <input type="hidden" name="location_code"  value="" 
/>
                                                                                
                          
                           <!--  WHAT TO DO -->
                           <div class="row what-to-do">




reply via email to

[Prev in Thread] Current Thread [Next in Thread]