[pve-devel] r6334 - in pve-manager/pve2: . www/manager www/manager/storage

svn-commits at proxmox.com svn-commits at proxmox.com
Wed Jul 20 13:14:06 CEST 2011


Author: dietmar
Date: 2011-07-20 13:14:06 +0200 (Wed, 20 Jul 2011)
New Revision: 6334

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/Utils.js
   pve-manager/pve2/www/manager/storage/DirEdit.js
Log:
impl. 'ConfigID' vtype


Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2011-07-20 10:40:23 UTC (rev 6333)
+++ pve-manager/pve2/ChangeLog	2011-07-20 11:14:06 UTC (rev 6334)
@@ -1,5 +1,7 @@
 2011-07-20  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/Utils.js: impl. 'ConfigID' vtype
+
 	* www/manager/storage/DirEdit.js: impl.
 
 	* www/manager/form/ContentTypeSelector.js: impl.

Modified: pve-manager/pve2/www/manager/Utils.js
===================================================================
--- pve-manager/pve2/www/manager/Utils.js	2011-07-20 10:40:23 UTC (rev 6333)
+++ pve-manager/pve2/www/manager/Utils.js	2011-07-20 11:14:06 UTC (rev 6334)
@@ -52,10 +52,15 @@
     QemuStartDate: function(v) {
 	return (/^(now|\d{4}-\d{1,2}-\d{1,2}(T\d{1,2}:\d{1,2}:\d{1,2})?)$/).test(v);
     },
-    QemuStartDateText: 'Valid format for date are: "now" or "2006-06-17T16:01:21" or "2006-06-17"'
+    QemuStartDateText: 'Valid format for date are: "now" or "2006-06-17T16:01:21" or "2006-06-17"',
+
+    ConfigId:  function(v) {
+        return (/^[a-z][a-z0-9\-\_\.]*[a-z0-9]$/i).test(v);
+    },
+    ConfigIdText: "ID contains illegal characters (allowed characters: 'a-z', '0-9', '-', '_' and '.')"
 });
 
-// we dont want that a display field set the form dirty flag! 
+// we dont want that a displayfield set the form dirty flag! 
 Ext.override(Ext.form.field.Display, {
     isDirty: function() { return false; }
 });

Modified: pve-manager/pve2/www/manager/storage/DirEdit.js
===================================================================
--- pve-manager/pve2/www/manager/storage/DirEdit.js	2011-07-20 10:40:23 UTC (rev 6333)
+++ pve-manager/pve2/www/manager/storage/DirEdit.js	2011-07-20 11:14:06 UTC (rev 6334)
@@ -24,7 +24,8 @@
 		name: 'storage',
 		height: 22, // hack: set same height as text fields
 		value: me.storageId || '',
-		fieldLabel: 'Storage name',
+		fieldLabel: 'Storage ID',
+		vtype: 'ConfigId',
 		allowBlank: false
 	    },
 	    {



More information about the pve-devel mailing list