fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10555] property: More on condition survey


From: Sigurd Nes
Subject: [Fmsystem-commits] [10555] property: More on condition survey
Date: Thu, 29 Nov 2012 13:55:28 +0000

Revision: 10555
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10555
Author:   sigurdne
Date:     2012-11-29 13:55:27 +0000 (Thu, 29 Nov 2012)
Log Message:
-----------
property: More on condition survey

Modified Paths:
--------------
    trunk/property/inc/class.bolocation.inc.php
    trunk/property/inc/class.uicondition_survey.inc.php
    trunk/property/js/portico/condition_survey_edit.js
    trunk/property/templates/base/condition_survey.xsl
    trunk/property/templates/base/location_form2.xsl

Modified: trunk/property/inc/class.bolocation.inc.php
===================================================================
--- trunk/property/inc/class.bolocation.inc.php 2012-11-29 11:23:42 UTC (rev 
10554)
+++ trunk/property/inc/class.bolocation.inc.php 2012-11-29 13:55:27 UTC (rev 
10555)
@@ -314,6 +314,7 @@
                                $location['location'][$i]['name']               
                        = $location_types[($i)]['name'];
                                $location['location'][$i]['value']              
                        = isset($data['values']['loc' . ($i+1)]) ? 
$data['values']['loc' . ($i+1)] : '';
                                $location['location'][$i]['statustext']         
                = lang('click this link to select') . ' ' . 
$location_types[($i)]['name'];
+                               $location['location'][$i]['required']           
                = isset($data['required_level']) && $data['required_level'] == 
($i+1);
 
                                
$location['location'][$i]['extra'][0]['input_name']             = 'loc' . 
($i+1).'_name';
                                $input_name[]                                   
                = $location['location'][$i]['extra'][0]['input_name'];

Modified: trunk/property/inc/class.uicondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.uicondition_survey.inc.php 2012-11-29 11:23:42 UTC 
(rev 10554)
+++ trunk/property/inc/class.uicondition_survey.inc.php 2012-11-29 13:55:27 UTC 
(rev 10555)
@@ -310,6 +310,7 @@
                                (
                                        'values'        => 
$values['location_data'],
                                        'type_id'       => 2,
+                                       'required_level' => 1,
                                        'no_link'       => $_no_link, // 
disable lookup links for location type less than type_id
                                        'lookup_type'   => $mode == 'edit' ? 
'form2' : 'view2',
                                        'tenant'        => false,

Modified: trunk/property/js/portico/condition_survey_edit.js
===================================================================
--- trunk/property/js/portico/condition_survey_edit.js  2012-11-29 11:23:42 UTC 
(rev 10554)
+++ trunk/property/js/portico/condition_survey_edit.js  2012-11-29 13:55:27 UTC 
(rev 10555)
@@ -25,6 +25,7 @@
                    var form = new Y.Validator(
                         {
                             form:'form',
+                                                       checkOnSubmit:true,
                             defaultIncorrectIndicatorCss:'validator',
                             defaultCorrectIndicatorCss:'indicator',
                             createCorrectIndicator:true,

Modified: trunk/property/templates/base/condition_survey.xsl
===================================================================
--- trunk/property/templates/base/condition_survey.xsl  2012-11-29 11:23:42 UTC 
(rev 10554)
+++ trunk/property/templates/base/condition_survey.xsl  2012-11-29 13:55:27 UTC 
(rev 10555)
@@ -25,7 +25,8 @@
                                </dl>
                                <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
                                <div class="yui-content">
-                                       <div id="generic">
+                               <div id="generic" class="content-wrp">
+                               
                                <dl class="proplist-col">
                                        <xsl:choose>
                                                <xsl:when test="survey/id!=''">
@@ -322,30 +323,26 @@
 </xsl:template>
 
        <xsl:template xmlns:php="http://php.net/xsl"; name="file_upload">
-               
-                       <dt>
-                               <label><xsl:value-of 
select="php:function('lang', 'upload file')"/></label>
-                       </dt>
-                       <dd>
-                               <input type="file" name="file" size="40">
-                                       <xsl:attribute name="title">
-                                               <xsl:value-of 
select="php:function('lang', 'Select file to upload')"/>
-                                       </xsl:attribute>
-                               </input>
-                       </dd>
-               
+               <dt>
+                       <label><xsl:value-of select="php:function('lang', 
'upload file')"/></label>
+               </dt>
+               <dd>
+                       <input type="file" name="file" size="40">
+                               <xsl:attribute name="title">
+                                       <xsl:value-of 
select="php:function('lang', 'Select file to upload')"/>
+                               </xsl:attribute>
+                       </input>
+               </dd>
                <xsl:choose>
                        <xsl:when test="multiple_uploader!=''">
-                               
-                                       <dt>
-                                               <label><a 
href="javascript:fileuploader()">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="php:function('lang', 'upload multiple files')"/>
-                                                       </xsl:attribute>
+                               <dt>
+                                       <label><a 
href="javascript:fileuploader()">
+                                               <xsl:attribute name="title">
                                                        <xsl:value-of 
select="php:function('lang', 'upload multiple files')"/>
-                                               </a></label>
-                                       </dt>
-                               
+                                               </xsl:attribute>
+                                               <xsl:value-of 
select="php:function('lang', 'upload multiple files')"/>
+                                       </a></label>
+                               </dt>
                        </xsl:when>
                </xsl:choose>
        </xsl:template>

Modified: trunk/property/templates/base/location_form2.xsl
===================================================================
--- trunk/property/templates/base/location_form2.xsl    2012-11-29 11:23:42 UTC 
(rev 10554)
+++ trunk/property/templates/base/location_form2.xsl    2012-11-29 13:55:27 UTC 
(rev 10555)
@@ -4,7 +4,7 @@
        </xsl:template>
 
        <!-- New template-->
-       <xsl:template match="location_data2">
+       <xsl:template match="location_data2" 
xmlns:formvalidator="http://www.w3.org/TR/html4/"; 
xmlns:php="http://php.net/xsl";>
                <xsl:for-each select="location">
                        <dt>
                                <label title="{statustext}">
@@ -24,16 +24,26 @@
                                <xsl:choose>
                                        <xsl:when test="readonly=1">
                                                <input size="{size}" 
type="{input_type}" name="{input_name}" value="{value}" 
onClick="{lookup_function_call}" readonly="readonly">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="statustext"/>
-                                                       </xsl:attribute>
+                                                       <xsl:if 
test="input_type != 'hidden' and required = 1">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="statustext"/>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="formvalidator:FormField">
+                                                                       
<xsl:text>yes</xsl:text>
+                                                               </xsl:attribute>
+                                                               <xsl:attribute 
name="formvalidator:Type">
+                                                                       
<xsl:text>TextBaseField</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
                                                </input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                                <input size="{size}" 
type="{input_type}" name="{input_name}" value="{value}" 
onClick="{lookup_function_call}">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="statustext"/>
-                                                       </xsl:attribute>
+                                                       <xsl:if 
test="input_type != 'hidden'">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="statustext"/>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
                                                </input>
                                        </xsl:otherwise>
                                </xsl:choose>




reply via email to

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