mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX TreeSelectorField doubles up on concating base_url, doesn't include the security ID (#5164, thanks marcus)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100755 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9e7611e891
commit
618d7e60a3
@ -188,13 +188,12 @@ TreeDropdownField.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ajaxGetTree: function(after) {
|
ajaxGetTree: function(after) {
|
||||||
var baseTags = document.getElementsByTagName('base');
|
var ajaxURL = this.buildURL('tree?forceValues=' + this.inputTag.value);
|
||||||
var base = (baseTags) ? baseTags[0].href : '';
|
var secId = jQuery('[@name=SecurityID]');
|
||||||
var ajaxURL = base + this.buildURL('tree?forceValues=' + this.inputTag.value);
|
ajaxURL += secId.length ? '&SecurityID=' + secId.val() : '';
|
||||||
ajaxURL += $('SecurityID') ? '&SecurityID=' + $('SecurityID').value : '';
|
|
||||||
if($('Form_EditForm_Locale')) ajaxURL += "&locale=" + $('Form_EditForm_Locale').value;
|
if($('Form_EditForm_Locale')) ajaxURL += "&locale=" + $('Form_EditForm_Locale').value;
|
||||||
if ( this.inputTag.value ) ajaxURL += '&forceValue=' + this.inputTag.value;
|
if(this.inputTag.value) ajaxURL += '&forceValue=' + this.inputTag.value;
|
||||||
if (this.search() != null) ajaxURL += "&search=" + this.search();
|
if(this.search() != null) ajaxURL += "&search=" + this.search();
|
||||||
new Ajax.Request(ajaxURL, {
|
new Ajax.Request(ajaxURL, {
|
||||||
method : 'get',
|
method : 'get',
|
||||||
onSuccess : after,
|
onSuccess : after,
|
||||||
|
Loading…
Reference in New Issue
Block a user