[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12363] property: fix save dates as custom fields
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12363] property: fix save dates as custom fields |
Date: |
Sat, 22 Nov 2014 14:02:37 +0000 |
Revision: 12363
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12363
Author: sigurdne
Date: 2014-11-22 14:02:36 +0000 (Sat, 22 Nov 2014)
Log Message:
-----------
property: fix save dates as custom fields
Modified Paths:
--------------
trunk/property/inc/class.custom_fields.inc.php
trunk/property/inc/class.uitts.inc.php
trunk/property/templates/base/wo_hour.xsl
Modified: trunk/property/inc/class.custom_fields.inc.php
===================================================================
--- trunk/property/inc/class.custom_fields.inc.php 2014-11-21 22:10:32 UTC
(rev 12362)
+++ trunk/property/inc/class.custom_fields.inc.php 2014-11-22 14:02:36 UTC
(rev 12363)
@@ -538,15 +538,8 @@
$data['value_set'][$entry['name']] = isset($entry['value']) &&
$entry['value'] ? $_value : '';
break;
case 'D':
- $ts =
phpgwapi_datetime::date_to_timestamp($entry['value']) -
phpgwapi_datetime::user_timezone();
- $_value =
date($this->_dateformat, $ts);
-
$data['value_set'][$entry['name']] = isset($entry['value']) &&
$entry['value'] ? $_value : '';
- break;
case 'DT':
- $date_array =
phpgwapi_datetime::date_array($attrib['value']['date']);
- $ts = mktime
((int)$attrib['value']['hour'], (int)$attrib['value']['min'], 0,
$date_array['month'], $date_array['day'], $date_array['year']) -
phpgwapi_datetime::user_timezone();
- $_value =
date($this->_datetimeformat, $ts);
-
$data['value_set'][$entry['name']] = isset($entry['value']) &&
$entry['value'] ? $_value : '';
+
$data['value_set'][$entry['name']] = isset($entry['value']) &&
$entry['value'] ? $entry['value'] : '';
break;
case 'pwd':
if($entry['value'] &&
$entry['value2'])
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2014-11-21 22:10:32 UTC (rev
12362)
+++ trunk/property/inc/class.uitts.inc.php 2014-11-22 14:02:36 UTC (rev
12363)
@@ -3590,35 +3590,6 @@
$this->cat_id = $ticket['cat_id'];
}
-
- $dateformat =
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
- $sep = '/';
- $dlarr[strpos($dateformat,'y')] = 'yyyy';
- $dlarr[strpos($dateformat,'m')] = 'MM';
- $dlarr[strpos($dateformat,'d')] = 'DD';
- ksort($dlarr);
-
- $dateformat= (implode($sep,$dlarr));
-
- switch(substr($dateformat,0,1))
- {
- case 'M':
- $dateformat_validate=
"javascript:vDateType='1'";
- $onKeyUp =
"DateFormat(this,this.value,event,false,'1')";
- $onBlur =
"DateFormat(this,this.value,event,true,'1')";
- break;
- case 'y':
- $dateformat_validate="javascript:vDateType='2'";
- $onKeyUp =
"DateFormat(this,this.value,event,false,'2')";
- $onBlur =
"DateFormat(this,this.value,event,true,'2')";
- break;
- case 'D':
- $dateformat_validate="javascript:vDateType='3'";
- $onKeyUp =
"DateFormat(this,this.value,event,false,'3')";
- $onBlur =
"DateFormat(this,this.value,event,true,'3')";
- break;
- }
-
$msgbox_data = $this->bocommon->msgbox_data($receipt);
if (isset($ticket['origin']) AND
is_array($ticket['origin']))
@@ -3647,15 +3618,9 @@
}
}
-
$GLOBALS['phpgw']->js->validate_file('dateformat','dateformat','property');
-
$data = array
(
'value_origin'
=> (isset($ticket['origin'])?$ticket['origin']:''),
- 'lang_dateformat'
=> strtolower($dateformat),
- 'dateformat_validate'
=> $dateformat_validate,
- 'onKeyUp'
=> $onKeyUp,
- 'onBlur'
=> $onBlur,
'lang_finnish_date'
=> lang('finnish date'),
'value_finnish_date'
=> $ticket['finnish_date'],
Modified: trunk/property/templates/base/wo_hour.xsl
===================================================================
--- trunk/property/templates/base/wo_hour.xsl 2014-11-21 22:10:32 UTC (rev
12362)
+++ trunk/property/templates/base/wo_hour.xsl 2014-11-22 14:02:36 UTC (rev
12363)
@@ -199,14 +199,14 @@
</xsl:when>
</xsl:choose>
</table>
+ <xsl:variable name="add_action">
+ <xsl:value-of select="add_action"/>
+ </xsl:variable>
+ <xsl:variable name="lang_add">
+ <xsl:value-of select="lang_add"/>
+ </xsl:variable>
+ <form method="post" action="{$add_action}">
<table width="50%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:variable name="add_action">
- <xsl:value-of select="add_action"/>
- </xsl:variable>
- <xsl:variable name="lang_add">
- <xsl:value-of select="lang_add"/>
- </xsl:variable>
- <form method="post" action="{$add_action}">
<tr height="50">
<td>
<xsl:value-of
select="lang_name"/>
@@ -249,7 +249,10 @@
</input>
</td>
</tr>
+ </table>
+
</form>
+ <table>
<tr height="50">
<td>
</td>
@@ -2193,6 +2196,10 @@
}
</script>
<div align="left">
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <form method="post" name="form" action="{$form_action}">
<table cellpadding="2" cellspacing="2" width="80%"
align="center">
<xsl:choose>
<xsl:when test="msgbox_data != ''">
@@ -2203,10 +2210,6 @@
</tr>
</xsl:when>
</xsl:choose>
- <xsl:variable name="form_action">
- <xsl:value-of select="form_action"/>
- </xsl:variable>
- <form method="post" name="form"
action="{$form_action}">
<xsl:choose>
<xsl:when test="value_hour_id
!=''">
<xsl:choose>
@@ -2486,7 +2489,9 @@
</input>
</td>
</tr>
+ </table>
</form>
+ <table>
<tr>
<td>
<xsl:variable
name="done_action">
@@ -2513,6 +2518,10 @@
<!-- add_deviation / edit_deviation -->
<xsl:template match="edit_deviation">
<div align="left">
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <form method="post" action="{$form_action}">
<table cellpadding="2" cellspacing="2" width="80%"
align="center">
<xsl:choose>
<xsl:when test="msgbox_data != ''">
@@ -2523,10 +2532,6 @@
</tr>
</xsl:when>
</xsl:choose>
- <xsl:variable name="form_action">
- <xsl:value-of select="form_action"/>
- </xsl:variable>
- <form method="post" action="{$form_action}">
<tr>
<td class="th_text"
align="left">
<xsl:value-of
select="lang_workorder"/>
@@ -2609,7 +2614,9 @@
</input>
</td>
</tr>
+ </table>
</form>
+ <table>
<tr>
<td>
<xsl:variable
name="done_action">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12363] property: fix save dates as custom fields,
Sigurd Nes <=