clean up duplicates of jquery.validate.js
[myslice.git] / portal / static / js / my_account.register.js
diff --git a/portal/static/js/my_account.register.js b/portal/static/js/my_account.register.js
new file mode 100644 (file)
index 0000000..bb7fba4
--- /dev/null
@@ -0,0 +1,56 @@
+/* 
+# Jquery for password matching and Affiliation list
+
+Authors:
+  Mohammed Yasin Rahman <mohammed-yasin.rahman@lip6.fr>
+Copyright 2013, UPMC Sorbonne Universités / LIP6
+
+*/
+jQuery(document).ready(function(){
+    
+    jQuery("#commentForm").validate({
+        rules: {
+          password: { 
+                required: true
+          }, 
+          confirmpassword: { 
+                required: true, equalTo: "#password"
+          }
+        }
+    });
+    // upload button
+    jQuery("#question").change(function(){
+        if(this.value=="upload"){
+            jQuery("#upload_key").show();
+        }else{
+            jQuery("#upload_key").hide();
+        }
+    });
+
+});
+
+jQuery(function() {
+    var availableTags = [
+      "iMinds",
+      "IT Innovation",
+      "UPMC",
+      "Fraunhofer",
+      "TUB",
+      "UEDIN",
+      "INRIA",
+      "NICTA",
+      "ATOS",
+      "UTH",
+      "NTUA",
+      "UNIVBRIS",
+      "i2CAT",
+      "EUR",
+      "DANTE Limited",
+      "UC",
+      "NIA"
+    ];
+    jQuery( "#aff_list" ).autocomplete({
+      source: availableTags
+    });
+  });
+