oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject [40/88] [abbrv] [partial] oodt git commit: Record change for OODT-836, OODT-837.
Date Mon, 17 Jul 2017 23:05:55 GMT
http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/classes/LDAPAuthenticationProvider.class.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/classes/LDAPAuthenticationProvider.class.php b/balance/modules/profile/classes/LDAPAuthenticationProvider.class.php
deleted file mode 100644
index ca69159..0000000
--- a/balance/modules/profile/classes/LDAPAuthenticationProvider.class.php
+++ /dev/null
@@ -1,263 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LDAPAuthenticationProvider
- * 
- * This class provides an extension of the OODT Security 'Single-sign on'
- * functionality that complies with the contract specified in the OODT Balance
- * ApplicationAuthenticationProvider interface.
- * 
- * For more information on the functions available here, consult either the
- * OODT Security package or the Balance ApplicationAuthenticationProvider 
- * interface documentation.
- * 
- * Note: This class has a dependency on the OODT CAS-SSO package 
- *      (http://oodt.jpl.nasa.gov/repo/framework/cas-sso/trunk/src/php/pear)
- *      
- *      To build this dependency, check out the above project and then:
- *      1) cd into the checked out project (you should see a package.xml file)
- *      2) pear package
- *      3) (sudo) pear install --force Gov_Nasa_Jpl...tar.gz
- * 
- * @author s.khudikyan
- * @author ahart
- * 
- */
-
-require("Org/Apache/Oodt/Security/SingleSignOn.php");
-
-class LDAPAuthenticationProvider
-	extends Org_Apache_Oodt_Security_SingleSignOn 
-	implements Org_Apache_Oodt_Balance_Interfaces_IApplicationAuthenticationProvider {
-	
-	// The LDAP server name
-	protected $ldapHost;
-	
-	// The port on which the LDAP server listens
-	protected $ldapPort;
-
-
-	/**
-	 * Constructor
-	 */
-	public function __construct() {
-		
-		// set LDAP constants
-		define("CAS_SECURITY",true);
-		define("SSO_LDAP_HOST", App::Get()->settings['ldap_host']);
-		define("SSO_LDAP_PORT", App::Get()->settings['ldap_port']);
-		define("SSO_BASE_DN", App::Get()->settings['ldap_base_dn']);
-		define("SSO_GROUPS_DN", App::Get()->settings['ldap_group_dn']);
-		define("SSO_COOKIE_KEY", App::Get()->settings['cookie_key']);
-		
-		$this->ldapHost = SSO_LDAP_HOST;
-		$this->ldapPort = SSO_LDAP_PORT;
-	}
-	
-	/**
-	 * Connect to the LDAP server
-	 */
-	public function connect() {
-		return parent::connect($this->ldapHost,$this->ldapPort);
-	}
-	
-	/**
-	 * Disconnect from the LDAP server
-	 */
-	public function disconnect() {
-		ldap_close($this->conn);
-	}
-	
-	/**
-	 * Determine whether or not a user has authenticated
-	 * 
-	 * @return boolean Whether or not the current user has authenticated
-	 */
-	public function isLoggedIn() {
-		return parent::isLoggedIn();
-	}
-	
-	/**
-	 * Process a user login
-	 * 
-	 * @param string $username The provided username
-	 * @param string $password The provided password
-	 */
-	public function login( $username, $password ) {
-		return parent::login( $username, $password );
-	}
-	
-	/**
-	 * End an authenticated user's session
-	 */
-	public function logout() {
-		parent::logout();
-	}
-
-	/**
-	 * Return the unique username of the currently authenticated user
-	 */
-	public function getCurrentUsername() {
-		return parent::getCurrentUsername();
-	}
-	
-	/**
-	 * Process a password change request for the currently authenticated
-	 * user
-	 * 
-	 * @param string $newPassword The new password to associate with the user
-	 */
-	public function changePassword( $newPassword ) {
-		if ( App::Get()->settings['auth_encryption_method'] ) {
-			return parent::changePassword( $newPassword, App::Get()->settings['auth_encryption_method'] );
-		}
-		return parent::changePassword( $newPassword );
-	}
-	
-	/**
-	 * Attempt to validate a candidate value for new user password
-	 * 
-	 * @param string $newPass The candidate password value
-	 * @param string $encryptionMethod The encryption method to use
-	 */
-	public function validateChangePassword( $newPass, $encryptionMethod = "SHA" ) {
-		$isValid = true;
-		$messages = array();
-		// validate rules from config file
-		$rules = App::Get()->settings['security_password_rules'];
-
-		if ( isset($rules) ) {
-			foreach( $rules as $rule ){
-				
-				// Separate the rule from the error message
-				list($regularExpression,$errorMessage) = explode('|',$rule,2);
-				
-				// Test the rule
-				$rulePassed = preg_match($regularExpression, $newPass);
-				
-				// If the rule failed, append the error message
-				if (!$rulePassed) {
-					$messages[] = $errorMessage;
-					$isValid    = false;
-				}
-			}
-		}
-
-		if ($isValid && $this->connect(SSO_LDAP_HOST,SSO_LDAP_PORT)) {
-		  $result = $this->changePassword($newPass,$encryptionMethod);
-		  return true;
-		} else
-		  return $messages;
-	}
-	
-	/**
-	 * Obtain detailed information about the specified user. 
-	 * 
-	 * This function accepts both a username and an array of attributes 
-	 * corresponding to the variables in the LDAP user record for which 
-	 * values should be returned. 
-	 * 
-	 * @param string $username   The username to obtain information for
-	 * @param array  $attributes The set of variables to return values for
-	 */
-	public function retrieveUserAttributes( $username, $attributes ) {
-		$rawArray 		= parent::retrieveUserAttributes( $username, $attributes );
-		$userAttributes = array();
-		
-		if ( count($rawArray) > 1 ) {
-			$rawArray = $rawArray[0];
-			// Get only necessary attributes to return
-			foreach ( $rawArray as $key=>$keyValue ) {
-				foreach ( $attributes as $value ) {
-					if ( $key === $value ) {
-						$userAttributes[$key] = $keyValue[0];
-					}
-				}
-			}
-		}
-		return $userAttributes;
-	}
-	
-	/**
-	 * Add a user record to the LDAP directory
-	 * 
-	 * This function accepts an associative array of information about 
-	 * a user. The keys in this array correspond to the named variables
-	 * in the user object in the LDAP directory. At a minimum, this 
-	 * array must contain a key 'uid' which must be unique across users
-	 * so that a proper dn can be generated for the new user.
-	 * 
-	 * @param array $userInfo The information to include in the record
-	 */
-	public function addUser($userInfo) {
-		$ldapconn = $this->connect(SSO_LDAP_HOST,SSO_LDAP_PORT);
-		if ($ldapconn) {
-			$user  = "uid={$userInfo[ "uid" ]}," . SSO_BASE_DN;
-			return ldap_add($ldapconn,$user,$userInfo);
-		}
-		// connection failed
-		return false;
-	}
-	
-	/**
-	 * Determine if the specified username is available
-	 * 
-	 * This function uses the value of the config setting 'username_attr' when
-	 * determining which key in the LDAP user record to use as the username
-	 * attribute. 
-	 * 
-	 * @param string $username The username to test for availability
-	 */
-	public function usernameAvailability( $username ) {
-		$justthese = array( App::Get()->settings['username_attr'] );
-		$profile = $this->retrieveUserAttributes($username, $justthese);
-		if (count($profile) > 0) {
-			return false;
-		} else {
-			// available
-			return true;
-		}
-	}
-	
-	/**
-	 * Update an existing user profile with new information
-	 * 
-	 * This function accepts an associative array containing named key/value
-	 * pairs. The keys in this array correspond to the named variables
-	 * in the user object in the LDAP directory. The function can only update
-	 * the record for the currently authenticated user.
-	 * 
-	 * @param array $newInfo The updated information for the user's profile
-	 */
-	public function updateProfile($newInfo) {
-
-		if ($this->isLoggedIn()) {
-			$user  = "uid={$this->getCurrentUsername()}," . SSO_BASE_DN ;
-			$ldapconn = $this->connect(SSO_LDAP_HOST,SSO_LDAP_PORT);
-			
-			if (ldap_mod_replace($ldapconn,$user,$newInfo)) {
-				return true;
-			} else {
-				return false;
-			}
-		} else {
-			return false;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/classes/LDAPAuthorizationProvider.class.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/classes/LDAPAuthorizationProvider.class.php b/balance/modules/profile/classes/LDAPAuthorizationProvider.class.php
deleted file mode 100644
index 1ac95fb..0000000
--- a/balance/modules/profile/classes/LDAPAuthorizationProvider.class.php
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * LDAPAuthorizationProvider
- * 
- * This class provides an implementation of the OODT Balance Application 
- * Authorization Provider interface that makes use of the Lightweight
- * Directory Access Protocol (LDAP).
- * 
- * For more information on the functions available here, consult the
- * OODT Balance ApplicationAuthenticationProvider interface documentation.
- *
- * @author s.khudikyan
- * @author ahart
- * 
- */
-
-class LDAPAuthorizationProvider 
-	implements Org_Apache_Oodt_Balance_Interfaces_IApplicationAuthorizationProvider {
-
-	
-	// The LDAP server name
-	protected $ldapHost;
-	
-	// The port on which the LDAP server listens
-	protected $ldapPort;
-	
-	/**
-	 * Constructor
-	 */
-	public function __construct() {
-		
-		// Set LDAP constants
-		define("AUTH_BASE_DN",   App::Get()->settings['authorization_ldap_base_dn']);
-		define("AUTH_GROUPS_DN", App::Get()->settings['authorization_ldap_group_dn']);
-		define("AUTH_LDAP_HOST", App::Get()->settings['authorization_ldap_host']);
-		define("AUTH_LDAP_PORT", App::Get()->settings['authorization_ldap_port']);
-		
-		$this->ldapHost = AUTH_LDAP_HOST;
-		$this->ldapPort = AUTH_LDAP_PORT;
-	}
-	
-	/**
-	 * Obtain the groups/roles for the current username
-	 * 
-	 * This function searches {$searchDirectory} for groupOfUniqueName objects whose
-	 * uniqueMember attribute contains {$username}. The cn attribute of all matching
-	 * groups is returned as a numeric array.
-	 * 
-	 * @param string $username The username to test for. Note that just the username 
-	 *                         portion should be specified, as both 'uid=' and AUTH_BASE_DN
-	 *                         are added to the value before searching.
-	 * @param string $searchDirectory The fully qualified DN (e.g.: ou=system,ou=groups)
-	 *                         of the LDAP directory in which to search for groups
-	 */
-	public function retrieveGroupsForUser($username,$searchDirectory = AUTH_GROUPS_DN) {
-		
-		// attempt to connect to ldap server 
-		$ldapconn = $this->connect(AUTH_LDAP_HOST,AUTH_LDAP_PORT);
-		$groups   = array();
-		if ($ldapconn) {
-			$filter = "(&(objectClass=groupOfUniqueNames)"
-				."(uniqueMember=uid={$username}," . AUTH_BASE_DN . "))";
-			$result = ldap_search($ldapconn,$searchDirectory,$filter,array('cn'));
-			
-			if ($result) {
-				$entries = ldap_get_entries($ldapconn,$result);
-				foreach ($entries as $rawGroup) {
-					if (isset($rawGroup['cn'][0]) 
-					&& $rawGroup['cn'][0] != '') {
-						$groups[] = $rawGroup['cn'][0];
-					}
-				}
-			}
-		} 
-		return $groups;
-	}
-			
-	/**
-	 * Connect to the LDAP server
-	 */
-	public function connect() {
-		if ($conn = ldap_connect($this->ldapHost,$this->ldapPort)) {
-			
-			// Connection established
-			$this->connectionStatus = 1;
-			ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
-			ldap_set_option($conn, LDAP_OPT_DEBUG_LEVEL, 7);
-			ldap_set_option($conn, LDAP_OPT_REFERRALS, 0);	
-			$this->conn = $conn;
-			return $conn;
-		} else {
-			// Connection failed
-			return false;
-		}
-	}		
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/classes/NullAuthenticationProvider.class.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/classes/NullAuthenticationProvider.class.php b/balance/modules/profile/classes/NullAuthenticationProvider.class.php
deleted file mode 100644
index 6449d10..0000000
--- a/balance/modules/profile/classes/NullAuthenticationProvider.class.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */ 
-
-/**
- * NullAuthenticationProvider
- * 
- * An implementation of the iApplicationAuthenticationProvider interface with
- * no external dependencies (and also limited functionality) intended to be used
- * as a development tool for quickly testing and debugging applications without
- * having to set up detailed auth&auth dependencies. 
- * 
- * This class utilizes the PHP Session construct for storing a provided username.
- * Any username / password combination is treated as valid.
- * 
- */
-class Org_Apache_Oodt_Balance_Providers_Authentication_NullAuthenticationProvider
-	implements Org_Apache_Oodt_Balance_Interfaces_IApplicationAuthenticationProvider {
-
-	public function __construct() {}
-	
-	public function connect() {
-		return true;
-	}
-	
-	public function disconnect() {
-		return true;
-	}
-	
-	public function isLoggedIn() {
-		return isset($_SESSION['_auth']);
-	}
-	
-	public function login( $username, $password ) {
-        $_SESSION['_auth'] = array(
-            'username' => $username
-        );
-	}
-	
-	public function logout() { 
-        unset($_SESSION['_auth']);
-	}
-
-	public function getCurrentUsername() {
-		return ($this->isLoggedIn())
-            ? $_SESSION['_auth']['username']
-            : false;
-	}
-	
-	public function changePassword( $newPassword ) {
-	       return true;
-	}
-	
-	public function validateChangePassword( $newPass, $encryptionMethod = "SHA" ) {
-	       return true;
-	}
-	
-	public function retrieveUserAttributes( $username, $attributes ) {
-		return ($this->isLoggedIn())
-            ? array(
-		       "cn"        => $this->getCurrentUsername(),
-		       "givenname" => $this->getCurrentUsername(),
-		       "sn"        => '',
-		       "uid"       => $this->getCurrentUsername(),
-		       "mail"      => 'guest@example.org'
-		    )
-            : false;
-	}
-	
-	public function addUser($userInfo) {
-	       return false;
-	}
-	
-	public function usernameAvailability( $username ) {
-	       return false;
-	}
-	
-	public function updateProfile($newInfo) {
-	       return false;
-
-	}	
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/classes/NullAuthorizationProvider.class.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/classes/NullAuthorizationProvider.class.php b/balance/modules/profile/classes/NullAuthorizationProvider.class.php
deleted file mode 100644
index 3f4a220..0000000
--- a/balance/modules/profile/classes/NullAuthorizationProvider.class.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * NullAuthorizationProvider
- * 
- * An implementation of the iApplicationAuthorizationProvider interface with
- * no external dependencies (and also limited functionality) intended to be used
- * as a development tool for quickly testing and debugging applications without
- * having to set up detailed auth&auth dependencies. 
- * 
- * This class simply returns an empty array for all usernames, indicating that 
- * the user is not part of any groups/roles.
- * 
- */
-class Org_Apache_Oodt_Balance_Providers_Authorization_NullAuthorizationProvider
-implements Org_Apache_Oodt_Balance_Interfaces_IApplicationAuthorizationProvider {
-
-	public function __construct() {
-
-	}
-
-	public function retrieveGroupsForUser($username) {
-		return array();
-	}
-		
-	public function connect() {
-		return true;
-	}
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/config.ini
----------------------------------------------------------------------
diff --git a/balance/modules/profile/config.ini b/balance/modules/profile/config.ini
deleted file mode 100644
index 5e5e24d..0000000
--- a/balance/modules/profile/config.ini
+++ /dev/null
@@ -1,180 +0,0 @@
- ; Licensed to the Apache Software Foundation (ASF) under one or more
- ; contributor license agreements.  See the NOTICE file distributed with
- ; this work for additional information regarding copyright ownership.
- ; The ASF licenses this file to You under the Apache License, Version 2.0
- ; (the "License"); you may not use this file except in compliance with
- ; the License.  You may obtain a copy of the License at
- ;
- ;     http://www.apache.org/licenses/LICENSE-2.0
- ;
- ; Unless required by applicable law or agreed to in writing, software
- ; distributed under the License is distributed on an "AS IS" BASIS,
- ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ; See the License for the specific language governing permissions and
- ; limitations under the License.
- 
-
-; Profile module configuration file
-; ---------------------------------------------------------------------------
-;
-; The Profile module simplifies the process of managing users of your web 
-; application. The primary use case for this module involves authentication
-; and authorization using LDAP, although it should be possible to support 
-; additional back-ends with moderate customization.
-;
-
-
-; ***************************************************************************
-; PROFILE AUTHENTICATION SETTINGS
-; ***************************************************************************
-;
-; Responsibility for authentication is delegated to the class specified here.
-; The only requirement of the delegated class is that it implement the 
-; Org_Apache_Oodt_Balance_Interfaces_IApplicationAuthenticationProvider 
-; interface.
-;
-; The following settings define both the class name (authentication_class) and
-; the filesystem path to the class itself (authentication_class_path). Both 
-; are required for authentication to function. 
-;
-; Tip: When specifying the authentication_class_path, the token [MODULE_PATH] 
-; will be expanded to the root directory of this module (i.e.: the location of 
-; this file)
-;
-; If authentication is not required, both of these settings should be left 
-; blank.
-;
-authentication_class      = LDAPAuthenticationProvider
-authentication_class_path = [MODULE_PATH]/classes/LDAPAuthenticationProvider.class.php
-
-
-; LDAP authentication server connection details
-ldap_host            = "host"
-ldap_port            = 686
-ldap_base_dn         = "dc=people,dc=project"
-cookie_key           = "__ac__sc__"
-
-
-; Encryption method used to encrypt user passwords 
-; Supported options are:
-; 		1. SHA
-; 		2. MD5
-auth_encryption_method 	= SHA
-
-
-; ***************************************************************************
-; PROFILE AUTHORIZATION SETTINGS
-; ***************************************************************************
-;
-; Responsibility for authorization is delegated to the class specified here. 
-; The only requirement of the delegated class is that it implement the
-; Org_Apache_Oodt_Balance_Interfaces_IApplicationAuthorizationProvider
-; interface. 
-;
-; The following settings define both the class name (authorization_class) and
-; the filesystem path to the class itself (authorization_class_path). Both 
-; are required for authentication to function. 
-;
-; Tip: When specifying the authorization_class_path, the token [MODULE_PATH] 
-; will be expanded to the root directory of this module (i.e.: the location
-; of this file)
-;
-; If authorization is not required, both of these settings should be left 
-; blank.
-;
-authorization_class		 = LDAPAuthorizationProvider
-authorization_class_path = [MODULE_PATH]/classes/LDAPAuthorizationProvider.class.php
-
-
-; LDAP authorization filter details
-authorization_ldap_filter = '&(objectClass=groupOfUniqueNames)'
-authorization_ldap_filter_userid = 'uniqueMember=uid'
-
-; LDAP authorization server connection details
-authorization_ldap_host            = 'host'
-authorization_ldap_port            = 686
-authorization_ldap_base_dn         = 'dc=people,dc=project'
-authorization_ldap_group_dn        = 'dc=group,dc=project'
-authorization_cookie_key           = '__ac__sc__'
-
-; Page to redirect users to when authorization is required
-authorization_redirect_url = [MODULE_ROOT]/login
-
-
-
-; ***************************************************************************
-; PROFILE ATTRIBUTE SETTINGS
-; ***************************************************************************
-; User profiles consist of various attributes (name, telephone, email, etc.).
-; This section defines the attributes that the profile will expose.
-
-; Attribute Mapping
-; The profile module natively understands the following profile attributes, 
-; which are widely applicable across projects. This section defines a mapping
-; between these profile attributes and your specific environment. 
-;
-; commonname_attr: The common name of the user (usually first and last name)
-commonname_attr = cn
-; firstname_attr: The first (given) name of the user
-firstname_attr  = givenname
-; lastname_attr: The last (surname) name of the user
-lastname_attr   = sn
-; username_attr: The unique id/name of the user
-username_attr   = uid
-; email_attr: The email address of the user
-email_attr      = mail
-
-; Visible Attributes
-; The profile module will expose the profile attributes specified here. 
-; These attributes will be displayed for the user to view.
-; 
-; Specify the profile attributes to expose here:
-profile_attributes[] = givenname
-profile_attributes[] = sn
-profile_attributes[] = uid
-profile_attributes[] = mail
-
-; Attributes allowed to modify
-; The profile module will expose the profile attributes specified here. 
-; These attributes will be displayed for the user to view and the user 
-; will be allowed to change values in the ldap directory.
-; 
-; Specify the profile attributes to modify here:
-profile_modify_attributes[] = givenname
-profile_modify_attributes[] = sn
-profile_modify_attributes[] = mail
-
-; When displaying the attributes specified above, a human readable label can
-; be defined. This will help users better understand which values they are
-; seeing and/or modifying. 
-;
-; Specify an attribute-to-label mapping for each of the above attributes here:
-attr_titles[ 'First name' ] = givenname
-attr_titles[ 'Last name' ]  = sn
-attr_titles[ 'Username' ]   = uid
-attr_titles[ 'Email' ]      = mail
-
-
-; ***************************************************************************
-; PASSWORD VALIDATION SETTINGS
-; ***************************************************************************
-; In the event that there are requirements that define a valid password, they
-; can be specified here as an array of 'tests'. These tests will be invoked
-; whenever the user attempts to set / change his or her password.
-;
-; The general format of these rules is a regular expression followed by a
-; pipe (|) followed by the human-readable exception to display when a password
-; fails to validate.
-; 
-; EXAMPLES:
-; - To require passwords with length of 5 or greater:
-;   security_password_rules[] = "/.{5,}/|Password must have a length of 5 or greater"
-; - To enfoce the presence of at least one uppercase letter
-;   security_password_rules[] = "/[A-Z]+/|Password must contain at least one uppercase letter"
-;
-; The security rules will be enforced in series, and processing will halt
-; after the first failure.
-;
-security_password_rules[] =
-
-

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/hooks.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/hooks.php b/balance/modules/profile/hooks.php
deleted file mode 100644
index ac66c81..0000000
--- a/balance/modules/profile/hooks.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * HOOKS.PHP
- * 
- * Hooks provide the ability, as the name implies, to hook into various parts of 
- * the view rendering process and insert customizations. The contents of these 
- * functions are run at the appropriate time *EVERY* time a view is rendered, i.e.
- * the content of the hooks is not by default view-specific but rather will be 
- * applied to all views. (However, there is nothing that prevents developers from 
- * inserting conditional logic inside a hook that then causes view-specific
- * them to exhibit view-specific behavior).
- * 
- * As an example, consider a hook that adds the amount of time Balance took to render
- * the page as an inline HTML comment at the bottom of each page after it has been sent:
- * 
- * function hook_after_send() {
- *     $timeStart = $GLOBALS['balance_request_start'];
- *     $timeNow   = microtime(true);
- *     $elapsed   = $timeNow - $timeStart;
- *     echo "<!-- page rendered in {$elapsed} seconds -->";
- * }
- * 
- * 
- * Take a look at the docblock descriptions of each hook to get a sense of where
- * in the view rendering process the hook is invoked.
- * 
- */
-
-/**
- * hook_before_header
- * 
- * This hook is executed before the contents of the header file are processed.
- */
-function hook_before_header() {}
-
-/**
- * hook_before_view
- * 
- * This hook is executed before the contents of the main view are processed.
- */
-function hook_before_view() {
-	$module = App::Get()->loadModule();
-	App::Get()->response->addStylesheet($module->moduleStatic.'/css/profile.css');
-}
-
-/**
- * hook_before_footer
- * 
- * This hook is executed before the contents of the footer are processed
- */
-function hook_before_footer() {}
-
-/**
- * hook_before_send
- * 
- * This hook is after all of the view components (header, view, footer) have been
- * processed but before the processed results are sent out across the wire to the 
- * browser. HTTP headers have not yet been sent to the browser.
- */
-function hook_before_send() {}
-
-/**
- * hook_after_send
- * 
- * This hook is after all of the view components (header, view, footer) have been
- * processed and sent out across the wire to the browser. It can be used for logging
- * or analytics purposes, or to append a common trailer to all content.
- */
-function hook_after_send() {
-	$timeStart = $GLOBALS['balance_request_start'];
-	$timeEnd   = microtime(true);
-	$elapsed   = $timeEnd - $timeStart;
-	
-	echo "\r\n<!-- page rendered in {$elapsed} seconds -->";
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/scripts/access.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/scripts/access.php b/balance/modules/profile/scripts/access.php
deleted file mode 100644
index 3167409..0000000
--- a/balance/modules/profile/scripts/access.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * PROFILE MANAGER - CREATE USER
- * 
- * Create new user, required attributes:
- * 
- * 	1. First name
- * 	2. Last name
- * 	3. Username
- * 	4. Email 
- * 
- * 	- password
- * 	- confirm password
- * 
- * @author s.khudikyan
-**/
-$module = App::Get()->loadModule();
-$allSet = true;
-
-
-if ( isset($_POST["firstname"]) && $_POST["firstname"] != "" ) {
-	$info[ App::Get()->settings['firstname_attr'] ] = $_POST["firstname"];
-} else {
-	// first name is required
-	App::Get()->SetMessage("First name cannot be blank",CAS_MSG_ERROR);
-	$allSet = FALSE;
-}
-
-if ( isset($_POST["lastname"]) && $_POST["lastname"] != "" ) {
-	$info[ App::Get()->settings['lastname_attr'] ] = $_POST["lastname"];
-} else {
-	// last name is required
-	App::Get()->SetMessage("Last name cannot be blank",CAS_MSG_ERROR);
-	$allSet = FALSE;
-}
-
-if ( isset($_POST["username"]) && $_POST["username"] != "" ) {
-	
-	// check username availability
-	$isAvailable = App::Get()->getAuthenticationProvider()->usernameAvailability($_POST["username"]);	
-	if ( $isAvailable ) {
-		$info[ App::Get()->settings['username_attr'] ] = $_POST["username"];
-	} else{
-		App::Get()->SetMessage("Username has been taken",CAS_MSG_ERROR);
-		$allSet = FALSE;
-	}
-} else {
-	// username is required
-	App::Get()->SetMessage("Username cannot be blank",CAS_MSG_ERROR);
-	$allSet = FALSE;
-}
-
-if ( isset($_POST["email"]) && $_POST["email"] != "") {
-	$info[ App::Get()->settings['email_attr'] ] = $_POST["email"];
-} else {
-	// email is required
-	App::Get()->SetMessage("Email cannot be blank",CAS_MSG_ERROR);
-	$allSet = FALSE;
-}
-
-if ( !isset($_POST["password_confirm"]) || $_POST["password_confirm"] == "" ) {
-	
-	// password confirm is required
-	App::Get()->SetMessage("Password cannot be blank and must match",CAS_MSG_ERROR);
-	$allSet = FALSE;
-} elseif ( (isset($_POST["password"]) || $_POST["password"] != "") && 
-		   ( $_POST["password"] == $_POST["password_confirm"] ) ) {
-		   	
-	$info['userPassword'] = $_POST["password"];
-} else {
-	
-	// password is required and must match
-	App::Get()->SetMessage("Password cannot be blank and must match",CAS_MSG_ERROR);
-	$allSet = FALSE;
-}
-
-if ($allSet) {
-	
-	$info[ App::Get()->settings['commonname_attr'] ] = $_POST["firstname"] . " " . $_POST["lastname"];
-	$info[ "objectClass" ] = "inetOrgPerson";
-	if ( App::Get()->getAuthenticationProvider()->addUser($info) ) {
-		
-		App::Get()->Redirect($module->moduleRoot . "/login" ); // add account successful	
-	} else {
-		App::Get()->setMessage("Could not add user.",CAS_MSG_ERROR);
-	}
-} else {
-	
-	App::Get()->Redirect($module->moduleRoot . "/createUser" );
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/scripts/changePwd.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/scripts/changePwd.php b/balance/modules/profile/scripts/changePwd.php
deleted file mode 100644
index 140c189..0000000
--- a/balance/modules/profile/scripts/changePwd.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * PROFILE MANAGER - PASSWORD CHANGE
- * 
- * Attempt to change password. This script uses config file to 
- * check for password restrictions.
- * 
- * @author s.khudikyan
-**/
-$module = App::Get()->loadModule();
-
-// Get instance of authentication class
-$authentication = App::Get()->getAuthenticationProvider();
-
-
-if ( !isset($_POST["password_confirm"]) || $_POST["password_confirm"] == "" ) {
-	
-	// password confirm is required
-	App::Get()->SetMessage("Please confirm password.",CAS_MSG_ERROR);
-	App::Get()->Redirect($module->moduleRoot . "/changePwd" );
-	
-} elseif ( (isset($_POST["password"]) || $_POST["password"] != "") && 
-		 ( $_POST["password"] == $_POST["password_confirm"] ) ) {
-
-		 	$message = $authentication->validateChangePassword( $_POST["password"] );
-
-		 	if( is_array($message) ) {
- 		
-		 		foreach ($message as $value) {
-		 			App::Get()->setMessage($value,CAS_MSG_ERROR);
-		 		}
-		   		
-		   		App::Get()->Redirect($module->moduleRoot . "/changePwd" );
-		 	} else{
-		 		
-		 		// Log the user out
-				$authentication->logout();
-				
-				// End user session
-				App::Get()->EndUserSession();
-				
-				// Redirect to confirmation page
-		   		App::Get()->Redirect($module->moduleRoot . "/passwordChangeConfirmed" ); // password change successful
-   		
-   			}
-		 } else {
-	
-			// password is required and must match
-			App::Get()->SetMessage("Password cannot be blank and must match",CAS_MSG_ERROR);
-			App::Get()->Redirect($module->moduleRoot . "/changePwd" );
-		}
-		
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/scripts/login.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/scripts/login.php b/balance/modules/profile/scripts/login.php
deleted file mode 100644
index fc6fd43..0000000
--- a/balance/modules/profile/scripts/login.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * PROFILE MANAGER - LOGIN
- * 
- * Attempt to login.
- * 
- * @author s.khudikyan
-**/
-$module = App::Get()->loadModule();
-
-// Get instance of authentication class
-$authentication = App::Get()->getAuthenticationProvider();
-
-$message = '';
-
-// If a user is already logged in, redirect to home page
-if( $authentication->isLoggedIn() ) App::Get()->Redirect(SITE_ROOT . "/"); 
-
-// Otherwise, if a user is attempting to log in, process:
-else if(isset($_POST["username"]) && isset($_POST["password"])) {
-
-	// Check the provided login credentials:
-	if($authentication->login($_POST["username"], $_POST["password"])){
-  	 	App::Get()->Redirect(SITE_ROOT . "/" ); // login successful
-  	 } else {
-  	 	App::Get()->SetMessage("Invalid Credentials Provided",CAS_MSG_ERROR);
-  	 	App::Get()->Redirect($module->moduleRoot . "/login");
-  	 }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/scripts/logout.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/scripts/logout.php b/balance/modules/profile/scripts/logout.php
deleted file mode 100644
index 59ccce3..0000000
--- a/balance/modules/profile/scripts/logout.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * PROFILE MANAGER - LOGOUT
- * 
- * End an authenticated user session
- * 
- * @author ahart
- * @author davoodi
- * @author s.khudikyan
-**/
-
-// Log the user out
-App::Get()->getAuthenticationProvider()->logout();
-
-// End user session
-App::Get()->EndUserSession();
-
-// Redirect to the home page
-App::Get()->Redirect(SITE_ROOT . "/");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/scripts/manage.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/scripts/manage.php b/balance/modules/profile/scripts/manage.php
deleted file mode 100644
index 0615ec6..0000000
--- a/balance/modules/profile/scripts/manage.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * PROFILE MANAGER - MANAGE USER PROFILE
- * 
- * Process user's changes to profile information. 
- * 
- * @author s.khudikyan
-**/
-$module = App::Get()->loadModule();
-$allSet = true;
-
-foreach ($_POST as $key=>$value) {
-
-	if ( $key != submit_button) {
-		if ( isset($value) && $value != "" ) {
-			$info[$key] = $value;
-		} else {
-			// set error message
-			App::Get()->SetMessage( 
-				array_search( $key, App::Get()->settings['attr_titles'] ) 
-				. " cannot be left blank.", CAS_MSG_ERROR );
-			$allSet = false;
-		}
-	}
-}
-
-if ($allSet) {
-	// method to edit user
-	if( App::Get()->getAuthenticationProvider()->updateProfile($info) ){
- 		
-		// user info change successful
-   		App::Get()->Redirect($module->moduleRoot . "/" );
-   	} else{
-   		
-   		// if not logged in - cannot change pwd
-   		App::Get()->SetMessage("Invalid entry",CAS_MSG_ERROR);
-   		App::Get()->Redirect($module->moduleRoot . "/manage" );
-   	}
-} else {
-	
-	App::Get()->Redirect($module->moduleRoot . "/manage" );
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/scripts/widgets/UserStatusWidget.php
----------------------------------------------------------------------
diff --git a/balance/modules/profile/scripts/widgets/UserStatusWidget.php b/balance/modules/profile/scripts/widgets/UserStatusWidget.php
deleted file mode 100644
index 8c9dd27..0000000
--- a/balance/modules/profile/scripts/widgets/UserStatusWidget.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * PROFILE MANAGER - User Status Display
- * 
- * This widget displays basic information about the user. It provides a link
- * to log in when user is logged out and displays username with a log-out link
- * when user is logged in.
- * 
- * This widget also allows the developer to decide whether or not the users will
- * have access to manage their account through the Profile Manager interface.
- * 
- * @author s.khudikyan
- * 
- */
-
-class UserStatusWidget 
-	implements Org_Apache_Oodt_Balance_Interfaces_IApplicationWidget {
-		
-	public $isLoggedIn;
-	public $username;
-	public $profileLink;
-	protected $moduleName;
-	
-	/**
-	 * Pass boolean true or false as the first parameter in the options array
-	 * to generate either a login link or a logout link, whichever is appropriate.
-	 *  	True:  user is logged in, show logout link
-	 *  	False: user is not logged in, show login link
-	 * 
-	 * Pass username as the second paramerter in the options array
-	 * 
-	 * Pass boolean true or false as the third parameter in the options array
-	 * to generate the username as a link to the porfile module.
-	 *  	True:  link will be created- *Default*
-	 *  	False: link will not be created
-	 *   
-	 * Pass module name as the fourth paramerter in the options array. This way
-	 * the developer has the option to name the module anything.
-	 * 		Default: 'profile'
-	 */ 
-	public function __construct($options = array()) {
-		$this->isLoggedIn  = ( isset($options[0])   && $options[0] === true );
-		$this->username    = ( isset($options[1]) ) ?  $options[1] : false;
-		$this->profileLink = ( isset($options[2]) ) ?  $options[2] : true;
-		$this->moduleName  = ( isset($options[3]) ) ?  $options[3] : 'profile';
-	}
-	
-	public function render($bEcho = true) {
-		
-		$str 	= '';
-		$module = App::Get()->loadModule($this->moduleName);
-		
-		// Display the appropriate information about the user
-		if($this->isLoggedIn) {
-			$str .= "Logged in as ";
-			if ($this->profileLink) {
-				$str .= '<a href="' . $module->moduleRoot . '/">' . $this->username . '</a>&nbsp;|&nbsp;'
-					.'<a href="' . $module->moduleRoot . '/logout.do">Log Out</a>';
-			} else {
-				$str .=  $this->username . '&nbsp;|&nbsp;'
-						.'<a href="' . $module->moduleRoot . '/logout.do">Log Out</a>';
-			}
-		} else {
-			$str .= '<a href="' . $module->moduleRoot . '/login">Log In</a>';
-		}
-		
-		if($bEcho) {
-			echo $str;
-		} else {
-			return $str;
-		}
-	}
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/static/css/profile.css
----------------------------------------------------------------------
diff --git a/balance/modules/profile/static/css/profile.css b/balance/modules/profile/static/css/profile.css
deleted file mode 100644
index 5ee73df..0000000
--- a/balance/modules/profile/static/css/profile.css
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-/**
- * PROFILE MANAGER STYLESHEET
- *
- * PAGE ELEMENTS 
- *
- */
-fieldset  {
-}
-
-label.invalid {
-	color:#BF1B02;
-	font:1em georgia;
-	margin:0 0 2px;
-}
-
-.profile_input {
-	height:23px;
-	width:200px;
-}
-
-/**
- * DIV.USERDETAILS
- * This provides information about the login-status of the user.
- *
- * top and color can be changed depending on portal
- */
-#userdetails {
-	position:absolute;
-	top:105px;
-	right:15px;
-	z-index:10;
-}
-#userdetails a {
-	font-size:13px;
-}
-
-/* Unsupported browsers */
-
-.orange_rbcontent { padding: 0.4em; }
-.orange_rbroundbox { width: 100%; }
-
-#unsupported {
-  font-weight: bold;
-  text-align: left;
-}
-
-/* Signup form */
-
-#signupform table {
-  border-spacing: 0;
-  border-collapse: collapse;
-  empty-cells: show;
-}
-
-#signupform .label {
-  padding-top: 2px;
-  padding-right: 8px;
-  vertical-align: top;
-  text-align: right;
-  width: 125px;
-  white-space: nowrap;
-}
-
-#signupform .field {
-  padding-bottom: 10px;
-  white-space: nowrap;
-}
-
-#signupform .status {
-  padding-top: 2px;
-  padding-left: 8px;
-  vertical-align: top;
-  width: 246px;
-  white-space: nowrap;
-}
-
-#signupform .textfield {
-  width: 150px;
-}
-
-#signupform .error, .notice, .success {
-  padding:0.25em;
-  margin-bottom:0.5em 0;
-  background-color:#FFFFFF;
-  border:1px solid #BBBBBB;
-}
-
-#signupform label.error {
-  background:none;
-  padding-left: 16px;
-  padding-bottom: 2px;
-  font-weight: bold;
-  color: #EA5200;
-  border:none;
-}
-
-#signupform label.checked /*{
-  background:none;
-}
-
-#signupform .success_msg {
-  font-weight: bold;
-  color: #0060BF;
-  margin-left: 19px;
-}
-
-#signupform #dateformatStatus, #signupform #termsStatus {
-  margin-left: 6px;
-}
-
-#signupform #termswrap {
-  float: left;
-}
-
-#signupform #terms {
-  vertical-align: middle;
-  float: left;
-  display: block;
-  margin-right: 5px;
-}
-
-#signupform #lterms {
-  font-weight: normal;
-  vertical-align: middle;
-  float: left;
-  display: block;
-  width: 350px;
-  white-space: normal;
-}
-
-#signupform #lsignupsubmit {
-  visibility: hidden;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/static/js/additional-methods.js
----------------------------------------------------------------------
diff --git a/balance/modules/profile/static/js/additional-methods.js b/balance/modules/profile/static/js/additional-methods.js
deleted file mode 100644
index db3ad14..0000000
--- a/balance/modules/profile/static/js/additional-methods.js
+++ /dev/null
@@ -1,259 +0,0 @@
-(function() {
-	
-	function stripHtml(value) {
-		// remove html tags and space chars
-		return value.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' ')
-		// remove numbers and punctuation
-		.replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g,'');
-	}
-	jQuery.validator.addMethod("maxWords", function(value, element, params) { 
-	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params; 
-	}, jQuery.validator.format("Please enter {0} words or less.")); 
-	 
-	jQuery.validator.addMethod("minWords", function(value, element, params) { 
-	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params; 
-	}, jQuery.validator.format("Please enter at least {0} words.")); 
-	 
-	jQuery.validator.addMethod("rangeWords", function(value, element, params) { 
-	    return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1]; 
-	}, jQuery.validator.format("Please enter between {0} and {1} words."));
-
-})();
-
-jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) {
-	return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value);
-}, "Letters or punctuation only please");  
-
-jQuery.validator.addMethod("alphanumeric", function(value, element) {
-	return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, spaces or underscores only please");  
-
-jQuery.validator.addMethod("lettersonly", function(value, element) {
-	return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please"); 
-
-jQuery.validator.addMethod("nowhitespace", function(value, element) {
-	return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please"); 
-
-jQuery.validator.addMethod("ziprange", function(value, element) {
-	return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx");
-
-jQuery.validator.addMethod("integer", function(value, element) {
-	return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
-
-/**
-* Return true, if the value is a valid vehicle identification number (VIN).
-*
-* Works with all kind of text inputs.
-*
-* @example <input type="text" size="20" name="VehicleID" class="{required:true,vinUS:true}" />
-* @desc Declares a required input element whose value must be a valid vehicle identification number.
-*
-* @name jQuery.validator.methods.vinUS
-* @type Boolean
-* @cat Plugins/Validate/Methods
-*/ 
-jQuery.validator.addMethod(
-	"vinUS",
-	function(v){
-		if (v.length != 17)
-			return false;
-		var i, n, d, f, cd, cdv;
-		var LL    = ["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"];
-		var VL    = [1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];
-		var FL    = [8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];
-		var rs    = 0;
-		for(i = 0; i < 17; i++){
-		    f = FL[i];
-		    d = v.slice(i,i+1);
-		    if(i == 8){
-		        cdv = d;
-		    }
-		    if(!isNaN(d)){
-		        d *= f;
-		    }
-		    else{
-		        for(n = 0; n < LL.length; n++){
-		            if(d.toUpperCase() === LL[n]){
-		                d = VL[n];
-		                d *= f;
-		                if(isNaN(cdv) && n == 8){
-		                    cdv = LL[n];
-		                }
-		                break;
-		            }
-		        }
-		    }
-		    rs += d;
-		}
-		cd = rs % 11;
-		if(cd == 10){cd = "X";}
-		if(cd == cdv){return true;}
-		return false; 
-	},
-	"The specified vehicle identification number (VIN) is invalid."
-);
-
-/**
-  * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
-  *
-  * @example jQuery.validator.methods.date("01/01/1900")
-  * @result true
-  *
-  * @example jQuery.validator.methods.date("01/13/1990")
-  * @result false
-  *
-  * @example jQuery.validator.methods.date("01.01.1900")
-  * @result false
-  *
-  * @example <input name="pippo" class="{dateITA:true}" />
-  * @desc Declares an optional input element whose value must be a valid date.
-  *
-  * @name jQuery.validator.methods.dateITA
-  * @type Boolean
-  * @cat Plugins/Validate/Methods
-  */
-jQuery.validator.addMethod(
-	"dateITA",
-	function(value, element) {
-		var check = false;
-		var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/;
-		if( re.test(value)){
-			var adata = value.split('/');
-			var gg = parseInt(adata[0],10);
-			var mm = parseInt(adata[1],10);
-			var aaaa = parseInt(adata[2],10);
-			var xdata = new Date(aaaa,mm-1,gg);
-			if ( ( xdata.getFullYear() == aaaa ) && ( xdata.getMonth () == mm - 1 ) && ( xdata.getDate() == gg ) )
-				check = true;
-			else
-				check = false;
-		} else
-			check = false;
-		return this.optional(element) || check;
-	}, 
-	"Please enter a correct date"
-);
-
-jQuery.validator.addMethod("dateNL", function(value, element) {
-		return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value);
-	}, "Vul hier een geldige datum in."
-);
-
-jQuery.validator.addMethod("time", function(value, element) {
-		return this.optional(element) || /^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(value);
-	}, "Please enter a valid time, between 00:00 and 23:59"
-);
-
-/**
- * matches US phone number format 
- * 
- * where the area code may not start with 1 and the prefix may not start with 1 
- * allows '-' or ' ' as a separator and allows parens around area code 
- * some people may want to put a '1' in front of their number 
- * 
- * 1(212)-999-2345
- * or
- * 212 999 2344
- * or
- * 212-999-0983
- * 
- * but not
- * 111-123-5434
- * and not
- * 212 123 4567
- */
-jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
-    phone_number = phone_number.replace(/\s+/g, ""); 
-	return this.optional(element) || phone_number.length > 9 &&
-		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
-}, "Please specify a valid phone number");
-
-jQuery.validator.addMethod('phoneUK', function(phone_number, element) {
-return this.optional(element) || phone_number.length > 9 &&
-phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
-}, 'Please specify a valid phone number');
-
-jQuery.validator.addMethod('mobileUK', function(phone_number, element) {
-return this.optional(element) || phone_number.length > 9 &&
-phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/);
-}, 'Please specify a valid mobile number');
-
-// TODO check if value starts with <, otherwise don't try stripping anything
-jQuery.validator.addMethod("strippedminlength", function(value, element, param) {
-	return jQuery(value).text().length >= param;
-}, jQuery.validator.format("Please enter at least {0} characters"));
-
-// same as email, but TLD is optional
-jQuery.validator.addMethod("email2", function(value, element, param) {
-	return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); 
-}, jQuery.validator.messages.email);
-
-// same as url, but TLD is optional
-jQuery.validator.addMethod("url2", function(value, element, param) {
-	return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_
 |~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); 
-}, jQuery.validator.messages.url);
-
-// NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
-// Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
-// Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
-jQuery.validator.addMethod("creditcardtypes", function(value, element, param) {
-
-	if (/[^0-9-]+/.test(value)) 
-		return false;
-	
-	value = value.replace(/\D/g, "");
-	
-	var validTypes = 0x0000;
-	
-	if (param.mastercard) 
-		validTypes |= 0x0001;
-	if (param.visa) 
-		validTypes |= 0x0002;
-	if (param.amex) 
-		validTypes |= 0x0004;
-	if (param.dinersclub) 
-		validTypes |= 0x0008;
-	if (param.enroute) 
-		validTypes |= 0x0010;
-	if (param.discover) 
-		validTypes |= 0x0020;
-	if (param.jcb) 
-		validTypes |= 0x0040;
-	if (param.unknown) 
-		validTypes |= 0x0080;
-	if (param.all) 
-		validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
-	
-	if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard
-		return value.length == 16;
-	}
-	if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
-		return value.length == 16;
-	}
-	if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex
-		return value.length == 15;
-	}
-	if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub
-		return value.length == 14;
-	}
-	if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute
-		return value.length == 15;
-	}
-	if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
-		return value.length == 16;
-	}
-	if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
-		return value.length == 16;
-	}
-	if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
-		return value.length == 15;
-	}
-	if (validTypes & 0x0080) { //unknown
-		return true;
-	}
-	return false;
-}, "Please enter a valid credit card number.");

http://git-wip-us.apache.org/repos/asf/oodt/blob/098cc4fa/balance/modules/profile/static/js/jquery.validate.min.js
----------------------------------------------------------------------
diff --git a/balance/modules/profile/static/js/jquery.validate.min.js b/balance/modules/profile/static/js/jquery.validate.min.js
deleted file mode 100644
index 6264866..0000000
--- a/balance/modules/profile/static/js/jquery.validate.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * jQuery validation plug-in 1.7
- *
- * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
- * http://docs.jquery.com/Plugins/Validation
- *
- * Copyright (c) 2006 - 2008 Jörn Zaefferer
- *
- * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $
- *
- * Dual licensed under the MIT and GPL licenses:
- *   http://www.opensource.org/licenses/mit-license.php
- *   http://www.gnu.org/licenses/gpl.html
- */
-(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});if(validator.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){validator.submitButton=this;});}this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){if(validator.submitButton){var hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val(validator.submitButton.value).appendTo(validator.currentForm);}validator.settings.submitHandler.call(validator,validator.currentForm);if(validator.submit
 Button){hidden.remove();}return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticR
 ules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+a.value);},filled:function(a){return!!$.trim(""+a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.val
 idator.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitte
 d||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);else if(element.parentNode.name in this.submitted)this.element(element.parentNode);},highlight:function(element,errorClass,validClass){$(element).addClass(errorClass).removeClass(validClass);},unhighlight:function(element,errorClass,validClass){$(element).removeClass(errorClass).addClass(validClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Pleas
 e enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,
 value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");validator.settings[eventType]&&validator.settings[eventType].call(validator,this[0]);}$(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",delegate).validateDelegate(":radio, :checkbox, select, option","click",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentEl
 ements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().r
 emoveClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name ass
 igned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){depe
 ndencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
-+", check the '"+rule.method+"' method",e);throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)return arguments[i];}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),th
 eregex=/\$?\{(\d+)\}/g;if(typeof message=="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=jQuery.format(message.replace(theregex,'{$1}'),rule.parameters);}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++
 ){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.succ
 ess){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow=this.toShow.add(label);},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr('for')==name;});},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependType
 s[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data
 (element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules
 ;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(ru
 les[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages;}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!=undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.
 toLowerCase()){case'select':var val=$(element).val();return val&&val.length>0;case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true;if(valid){var submitted=validator.formSubmitted;valida
 tor.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};var message=(previous.message=response||validator.defaultMessage(element,"remote"));errors[element.name]=$.isFunction(message)?message(value):message;validator.showErrors(errors);}previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){re
 turn this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]
 )([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]
 {2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/
 \D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){var target=$(param).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});return value==target.val();}}});$.format=$.validator.format;})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){if(!jQuery.event.special.focusin
 &&!jQuery.event.special.focusout&&document.addEventListener){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){this.addEventListener(original,handler,true);},teardown:function(){this.removeEventListener(original,handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};function handler(e){e=$.event.fix(e);e.type=fix;return $.event.handle.call(this,e);}});};$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});})(jQuery);
\ No newline at end of file


Mime
View raw message