fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10981] property:save workorder before send


From: Sigurd Nes
Subject: [Fmsystem-commits] [10981] property:save workorder before send
Date: Wed, 13 Mar 2013 09:18:32 +0000

Revision: 10981
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10981
Author:   sigurdne
Date:     2013-03-13 09:18:32 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
property:save workorder before send

Modified Paths:
--------------
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/templates/base/workorder.xsl

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2013-03-12 14:17:10 UTC 
(rev 10980)
+++ trunk/property/inc/class.uiworkorder.inc.php        2013-03-13 09:18:32 UTC 
(rev 10981)
@@ -1294,6 +1294,18 @@
                                        }
                                }
 
+
+                               if( phpgw::get_var('send_workorder', 'bool') && 
!$receipt['error'])
+                               {
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php',array(
+                                               'menuaction'    
=>'property.uiwo_hour.view',
+                                               'workorder_id'  => $id,
+                                               'from'                  
=>'index'
+                                               )
+                                       );
+                               }
+
+
                                if( phpgw::get_var('phpgw_return_as') == 'json' 
)
                                {
 
@@ -1959,7 +1971,6 @@
                                'lang_calculate'                                
                => lang('Calculate Workorder'),
                                'lang_calculate_statustext'                     
        => lang('Calculate workorder by adding items from vendors prizebook or 
adding general hours'),
 
-                               'send_action'                                   
                => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'property.uiwo_hour.view',
 'from'=>'index')),
                                'lang_send'                                     
                        => $this->bo->order_sent_adress ? lang('ReSend 
Workorder') :lang('Send Workorder'),
                                'lang_send_statustext'                          
        => lang('send this workorder to vendor'),
 

Modified: trunk/property/templates/base/workorder.xsl
===================================================================
--- trunk/property/templates/base/workorder.xsl 2013-03-12 14:17:10 UTC (rev 
10980)
+++ trunk/property/templates/base/workorder.xsl 2013-03-13 09:18:32 UTC (rev 
10981)
@@ -86,7 +86,8 @@
                        }
                        function send_workorder()
                        {
-                               document.send_workorder_form.submit();
+                               
document.getElementsByName("send_workorder")[0].value = 1;
+                               document.form.submit();
                        }
                        function set_tab(tab)
                        {
@@ -166,6 +167,7 @@
                        <xsl:value-of select="form_action"/>
                </xsl:variable>
                <form ENCTYPE="multipart/form-data" method="post" 
id='workorder_edit' name="form" action="{$form_action}">
+                       <input type="hidden" id='send_workorder' 
name="send_workorder" value=""/>
                        <input type="hidden" name="tab" value=""/>
                        <div class="yui-navset" id="workorder_tabview">
                                <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
@@ -948,9 +950,6 @@
                                <xsl:variable 
name="calculate_action"><xsl:value-of 
select="calculate_action"/>&amp;workorder_id=<xsl:value-of 
select="value_workorder_id"/></xsl:variable>
                                <form method="post" 
name="calculate_workorder_form" action="{$calculate_action}">
                                </form>
-                               <xsl:variable name="send_action"><xsl:value-of 
select="send_action"/>&amp;workorder_id=<xsl:value-of 
select="value_workorder_id"/></xsl:variable>
-                               <form method="post" name="send_workorder_form" 
action="{$send_action}">
-                               </form>
                        </xsl:when>
                </xsl:choose>
        </xsl:template>




reply via email to

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