BUGFIX #2133: Removed UniqueTextField JavaScript that was causing URLSegments to be incorrectly rewritten if they had a number at the end.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88471 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew Short 2009-10-11 00:06:56 +00:00 committed by Sam Minnee
parent fd7b322ed4
commit 7dfadd869c

View File

@ -37,15 +37,7 @@ UniqueFormField.prototype = {
}
}
UniqueTextField = Class.extend('UniqueFormField');
UniqueTextField.applyTo('input.UniqueTextField');
UniqueTextField.prototype = {
initialize: function() {
this.onblur = this.validate.bind(this);
}
}
UniqueRestrictedTextField = Class.extend('UniqueTextField');
UniqueRestrictedTextField = Class.extend('UniqueFormField');
UniqueRestrictedTextField.applyTo('input.UniqueRestrictedTextField');
UniqueRestrictedTextField.prototype = {
initialize: function() {
@ -77,13 +69,8 @@ UniqueRestrictedTextField.prototype = {
return escaped;
}
var parts = escaped.match( /(.*)(\d+)$/ );
var prefix = escaped;
if( parts )
prefix = parts[1];
else
prefix = escaped;
if( prefix.charAt(prefix.length-1) != this.charReplacement )
prefix = prefix + this.charReplacement;