archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1240273 - /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
Date Fri, 03 Feb 2012 18:07:51 GMT
Author: olamy
Date: Fri Feb  3 18:07:51 2012
New Revision: 1240273

URL: http://svn.apache.org/viewvc?rev=1240273&view=rev
Log:
use remote validation for id already exists check for remote repo form

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js?rev=1240273&r1=1240272&r2=1240273&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js
Fri Feb  3 18:07:51 2012
@@ -681,22 +681,21 @@ $(function() {
   activateRemoteRepositoryFormValidation=function(){
     // FIXME find a way to activate cronExpression validation only if downloadRemote is activated
!
     var validator = $("#main-content #remote-repository-edit-form").validate({
-      /*rules: {
-        daysOlder : {
-          digits: true,
-          min: 1
-        },
-        retentionCount : {
-          digits: true,
-          min: 1,
-          max: 100
+      rules: {
+        id: {
+          required: true,
+          remote: {
+            url: "restServices/archivaUiServices/dataValidatorService/remoteRepositoryIdNotExists",
+            type: "get"
+          }
         }
-      },*/
+      },
       showErrors: function(validator, errorMap, errorList) {
         customShowError("#main-content #remote-repository-edit-form",validator,errorMap,errorMap);
       }
     });
     validator.settings.messages["cronExpression"]=$.i18n.prop("cronExpression.notvalid");
+    validator.settings.messages["id"]=$.i18n.prop("id.required.or.alreadyexists");
   }
 
   activateRemoteRepositoriesGridTab=function(){



Mime
View raw message