[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16699] more on eventplanner
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16699] more on eventplanner |
Date: |
Fri, 5 May 2017 08:31:01 -0400 (EDT) |
Revision: 16699
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16699
Author: sigurdne
Date: 2017-05-05 08:31:01 -0400 (Fri, 05 May 2017)
Log Message:
-----------
more on eventplanner
Modified Paths:
--------------
trunk/eventplanner/js/portico/application.edit.js
trunk/eventplanner/templates/base/application.xsl
Modified: trunk/eventplanner/js/portico/application.edit.js
===================================================================
--- trunk/eventplanner/js/portico/application.edit.js 2017-05-05 12:07:45 UTC
(rev 16698)
+++ trunk/eventplanner/js/portico/application.edit.js 2017-05-05 12:31:01 UTC
(rev 16699)
@@ -438,3 +438,34 @@
);
}
};
+
+ $.formUtils.addValidator({
+ name: 'application_types',
+ validatorFunction: function (value, $el, config, language,
$form)
+ {
+ var n = 0;
+ $('#application_tbody_types input').each(function ()
+ {
+ if($(this).prop("checked"))
+ {
+ n++;
+ }
+ });
+ var v = (n > 0) ? true : false;
+
+ if(v === false)
+ {
+
$('#application_tbody_types').css("background-color", "#f2dede");
+ $('#application_tbody_types').css("border",
"#b94a48 1px solid");
+ }
+ else
+ {
+
$('#application_tbody_types').css("background-color", "white");
+ $('#application_tbody_types').css("border",
"black");
+ }
+
+ return v;
+ },
+ errorMessage: 'Type is required',
+ errorMessageKey: 'application_types'
+ });
Modified: trunk/eventplanner/templates/base/application.xsl
===================================================================
--- trunk/eventplanner/templates/base/application.xsl 2017-05-05 12:07:45 UTC
(rev 16698)
+++ trunk/eventplanner/templates/base/application.xsl 2017-05-05 12:31:01 UTC
(rev 16699)
@@ -228,6 +228,12 @@
<xsl:value-of select="php:function('lang', 'program description')"/>
</label>
<textarea
cols="47" rows="7" name="description" class="pure-input-1-2" >
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="php:function('lang', 'program description')"/>
+
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="php:function('lang', 'might be published')"/>
</xsl:attribute>
@@ -250,7 +256,7 @@
</th>
</tr>
</thead>
-
<tbody>
+
<tbody id="application_tbody_types">
<xsl:for-each select="application_type_list">
<tr>
<td>
@@ -268,7 +274,11 @@
</tbody>
</table>
</div>
-
+ <input
type="text" data-validation="application_types" size="1" style="visibility:
hidden;">
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="php:function('lang', 'program type')"/>
+
</xsl:attribute>
+ </input>
</div>
<div
class="pure-control-group">
@@ -392,6 +402,12 @@
<xsl:value-of select="php:function('lang', 'case officer')"/>
</label>
<select
id="case_officer_id" name="case_officer_id">
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="php:function('lang', 'case officer')"/>
+
</xsl:attribute>
<xsl:apply-templates select="list_case_officer/options"/>
</select>
</div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16699] more on eventplanner,
sigurdne <=