[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10472] property: condition survey
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10472] property: condition survey |
Date: |
Mon, 05 Nov 2012 13:57:38 +0000 |
Revision: 10472
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10472
Author: sigurdne
Date: 2012-11-05 13:57:38 +0000 (Mon, 05 Nov 2012)
Log Message:
-----------
property: condition survey
Modified Paths:
--------------
trunk/property/inc/class.bogeneric.inc.php
trunk/property/inc/class.uicondition_survey.inc.php
trunk/property/setup/tables_current.inc.php
trunk/property/setup/tables_update.inc.php
trunk/property/templates/base/condition_survey.xsl
Modified: trunk/property/inc/class.bogeneric.inc.php
===================================================================
--- trunk/property/inc/class.bogeneric.inc.php 2012-11-05 13:27:08 UTC (rev
10471)
+++ trunk/property/inc/class.bogeneric.inc.php 2012-11-05 13:57:38 UTC (rev
10472)
@@ -218,6 +218,11 @@
$values = $this->so->get_list($data);
}
+ if(isset($data['add_empty']) && $data['add_empty'])
+ {
+ array_unshift($values,array('id'=> '', 'name'=>
lang('select')));
+ }
+
if(isset($data['selected']) &&
is_array($data['selected']))
{
foreach ($values as &$entry)
Modified: trunk/property/inc/class.uicondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.uicondition_survey.inc.php 2012-11-05 13:27:08 UTC
(rev 10471)
+++ trunk/property/inc/class.uicondition_survey.inc.php 2012-11-05 13:57:38 UTC
(rev 10472)
@@ -264,19 +264,20 @@
}
}
- $survey = array();
+ $values = array();
if ($id)
{
- $survey = $this->so->read_single( array('id' =>
$id, 'view' => $mode == 'view') );
+ $values = $this->so->read_single( array('id' =>
$id, 'view' => $mode == 'view') );
}
$categories =
$this->_get_categories($survey['category']);
$data = array
(
- 'survey' => $survey,
+ 'survey' => $values,
'categories' => array('options' =>
$categories),
+ 'status_list' => array('options' =>
execMethod('property.bogeneric.get_list',array('type' =>
'condition_survey_status', 'selected' => $values['status_id'], 'add_empty' =>
true))),
'editable' => $mode == 'edit'
);
Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2012-11-05 13:27:08 UTC (rev
10471)
+++ trunk/property/setup/tables_current.inc.php 2012-11-05 13:57:38 UTC (rev
10472)
@@ -802,7 +802,7 @@
'loc3' => array('type' => 'varchar','precision'
=> '4','nullable' => True),
'loc4' => array('type' => 'varchar','precision'
=> '4','nullable' => True),
'descr' => array('type' => 'text','nullable' =>
True),
- 'status' => array('type' => 'int','precision'
=> '4','nullable' => false),
+ 'status_id' => array('type' =>
'int','precision' => '4','nullable' => false),
'category' => array('type' => 'int','precision'
=> '4','nullable' => True),
'coordinator' => array('type' =>
'int','precision' => '4','nullable' => True),
'vendor_id' => array('type' => 'int',
'precision' => 4,'nullable' => True),
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2012-11-05 13:27:08 UTC (rev
10471)
+++ trunk/property/setup/tables_update.inc.php 2012-11-05 13:57:38 UTC (rev
10472)
@@ -6850,7 +6850,7 @@
'loc3' => array('type' =>
'varchar','precision' => '4','nullable' => True),
'loc4' => array('type' =>
'varchar','precision' => '4','nullable' => True),
'descr' => array('type' =>
'text','nullable' => True),
- 'status' => array('type' =>
'int','precision' => '4','nullable' => false),
+ 'status_id' => array('type' =>
'int','precision' => '4','nullable' => false),
'category' => array('type' =>
'int','precision' => '4','nullable' => True),
'coordinator' => array('type' =>
'int','precision' => '4','nullable' => True),
'vendor_id' => array('type' => 'int',
'precision' => 4,'nullable' => True),
Modified: trunk/property/templates/base/condition_survey.xsl
===================================================================
--- trunk/property/templates/base/condition_survey.xsl 2012-11-05 13:27:08 UTC
(rev 10471)
+++ trunk/property/templates/base/condition_survey.xsl 2012-11-05 13:57:38 UTC
(rev 10472)
@@ -82,6 +82,28 @@
<div
class="clearDiv"></div>
</div>
+
+ <div class="row">
+ <div class="label">
+ <label
for="status"><xsl:value-of select="php:function('lang', 'status')" /></label>
+ </div>
+ <xsl:choose>
+ <xsl:when
test="editable = 1">
+ <select
id="status_id" name="values[status_id]"
+
formvalidator:FormField="yes"
+
formvalidator:Type="SelectField">
+
<xsl:apply-templates select="status_list/options"/>
+ </select>
+ </xsl:when>
+ <xsl:otherwise>
+ <select
id="status_id" disabled="disabled">
+
<xsl:apply-templates select="status_list/options"/>
+ </select>
+ </xsl:otherwise>
+ </xsl:choose>
+ <div class="clearDiv"></div>
+ </div>
+
<!--
<div class="row">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10472] property: condition survey,
Sigurd Nes <=