dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06865
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1916: Temportary disabled the restriction "first letter must be alphabet" and minor fixed in additional...
------------------------------------------------------------
revno: 1916
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-08-11 15:52:40 +0700
message:
Temportary disabled the restriction "first letter must be alphabet" and minor fixed in additional-methods.js file
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/additional-methods.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/additional-methods.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/additional-methods.js 2010-07-19 13:19:26 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/validate/additional-methods.js 2010-08-11 08:52:40 +0000
@@ -72,7 +72,8 @@
jQuery.validator.addMethod("alphanumericwithbasicpuncspaces", function(value,
element) {
- return this.optional(element) || /^[\w-.,()\/'\"\s]+$/i.test(value);
+ //return this.optional(element) || /^[\w-.,()\/'\"\s]+$/i.test(value);
+ return this.optional(element) || !(/^[~`!@#^*+{}:;?|[]]$/i.test(value));
}, "Please Letters, numbers, spaces or some special chars like .,-,(,) only ");
jQuery.validator
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2010-07-24 15:40:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm 2010-08-11 08:52:40 +0000
@@ -34,11 +34,11 @@
<tbody>
<tr>
<td><label>$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em" maxlength="150" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+ <td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em" maxlength="150" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}"/></td>
</tr>
<tr>
<td><label>$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="shortName" name="shortName" style="width:20em" maxlength="20" class="{validate:{required:true,rangelength:[2,20],alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"/></td>
+ <td><input type="text" id="shortName" name="shortName" style="width:20em" maxlength="20" class="{validate:{required:true,rangelength:[2,20],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}"/></td>
</tr>
<tr>
<td><label>$i18n.getString( "code" )</label></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2010-07-24 15:40:31 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2010-08-11 08:52:40 +0000
@@ -38,11 +38,11 @@
<tbody>
<tr>
<td><label>$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" style="width:20em" value="$!encoder.htmlEncode( $dataSet.name )" maxlength="150" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"></td>
+ <td><input type="text" id="name" name="name" style="width:20em" value="$!encoder.htmlEncode( $dataSet.name )" maxlength="150" class="{validate:{required:true,rangelength:[4,150],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}"></td>
</tr>
<tr>
<td><label>$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
- <td><input type="text" id="shortName" name="shortName" style="width:20em" value="$!encoder.htmlEncode( $dataSet.shortName )" maxlength="20" class="{validate:{required:true,rangelength:[2,20],alphanumericwithbasicpuncspaces:true,firstletteralphabet:true}}"> </td>
+ <td><input type="text" id="shortName" name="shortName" style="width:20em" value="$!encoder.htmlEncode( $dataSet.shortName )" maxlength="20" class="{validate:{required:true,rangelength:[2,20],alphanumericwithbasicpuncspaces:true,firstletteralphabet:false}}"> </td>
</tr>
<tr>
<td><label>$i18n.getString( "code" )</label></td>