mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
fd7b322ed4
commit
7dfadd869c
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user