[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11860] property: revert som of the ui for voucher sp
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11860] property: revert som of the ui for voucher split |
Date: |
Mon, 24 Mar 2014 17:43:31 +0000 |
Revision: 11860
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11860
Author: sigurdne
Date: 2014-03-24 17:43:30 +0000 (Mon, 24 Mar 2014)
Log Message:
-----------
property: revert som of the ui for voucher split
Modified Paths:
--------------
trunk/property/inc/class.uiinvoice2.inc.php
trunk/property/js/portico/ajax_invoice.js
trunk/property/templates/base/invoice2.xsl
Modified: trunk/property/inc/class.uiinvoice2.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice2.inc.php 2014-03-24 13:08:06 UTC (rev
11859)
+++ trunk/property/inc/class.uiinvoice2.inc.php 2014-03-24 17:43:30 UTC (rev
11860)
@@ -273,12 +273,20 @@
'line_id' => $line_id
);
- if( $receipt = phpgwapi_cache::session_get('phpgwapi',
'phpgw_messages'))
+
+ if(phpgw::get_var('phpgw_return_as') == 'json')
{
- phpgwapi_cache::session_clear('phpgwapi',
'phpgw_messages');
- $result['receipt'] = $receipt;
+ if( $receipt =
phpgwapi_cache::session_get('phpgwapi', 'phpgw_messages'))
+ {
+
phpgwapi_cache::session_clear('phpgwapi', 'phpgw_messages');
+ $result['receipt'] = $receipt;
+ }
+ return $result;
}
- return $result;
+ else
+ {
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'property.uiinvoice2.index', 'voucher_id' => $voucher_id,
'line_id' => $line_id));
+ }
}
function update_voucher()
@@ -931,7 +939,7 @@
foreach($categories['cat_list'] as &$cat)
{
$cat['id'] = $cat['cat_id'];
- $cat['selected'] = $cat['selected'] ? 1 : 0;
+ $cat['selected'] = $cat['selected'] ? 1 : '';
}
$voucher_info['generic']['dime_list'] = array('options'
=> $categories['cat_list']);
$voucher_info['generic']['approved_list'] =
$approved_list;
Modified: trunk/property/js/portico/ajax_invoice.js
===================================================================
--- trunk/property/js/portico/ajax_invoice.js 2014-03-24 13:08:06 UTC (rev
11859)
+++ trunk/property/js/portico/ajax_invoice.js 2014-03-24 17:43:30 UTC (rev
11860)
@@ -162,18 +162,23 @@
var submitBnt = $(thisForm).find("input[type='submit']");
var requestUrl = $(thisForm).attr("action");
+// var oArgs = { menuaction:'property.uiinvoice2.update_voucher'};
+
+// var requestUrl = phpGWLink('index.php', oArgs, true);
+/*
var fileInput = document.getElementById('file');
var file = fileInput.files[0];
var formData = new FormData();
formData.append('file', file);
document.getElementsByName("file")[0].value = "";
-
+*/
$.ajax({
type: 'POST',
+// url: requestUrl + $(thisForm).serialize(),
url: requestUrl + "&phpgw_return_as=json&" +
$(thisForm).serialize(),
- data: formData,
- processData: false,
- contentType: false,
+// data: formData,
+// processData: false,
+// contentType: false,
success: function(data) {
if(data)
{
Modified: trunk/property/templates/base/invoice2.xsl
===================================================================
--- trunk/property/templates/base/invoice2.xsl 2014-03-24 13:08:06 UTC (rev
11859)
+++ trunk/property/templates/base/invoice2.xsl 2014-03-24 17:43:30 UTC (rev
11860)
@@ -105,7 +105,7 @@
<xsl:apply-templates
select="filter_form" />
<xsl:apply-templates
select="filter_invoice" />
</table>
- <form action="{update_action}"
name="voucher_form" id="voucher_form" method="post"
ENCTYPE="multipart/form-data">
+ <form action="{update_action}"
name="voucher_form" id="voucher_form" method="post">
<table align = "center"
width="95%">
<tr>
<td
colspan = '6'>
@@ -113,6 +113,7 @@
<xsl:apply-templates select="datatable"/>
</td>
</tr>
+<!--
<tr>
<td
valign="top">
<xsl:value-of select="php:function('lang', 'upload file')"/>
@@ -127,6 +128,7 @@
<input type="button" id = "template" name="template" value="{$lang_template}"
title = "{$lang_template}" />
</td>
</tr>
+-->
<tr>
<td
colspan = '6'>
<xsl:variable name="label_submit"><xsl:value-of select="php:function('lang',
'save')" /></xsl:variable>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11860] property: revert som of the ui for voucher split,
Sigurd Nes <=