mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT: make the getTree ajax call more generic so it get local from its containing form, rather than hard-coded "Form_EditForm_Locale" cos the field is not only used in "EditForm"
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103466 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c8163eb609
commit
ac2d9b35c0
@ -191,7 +191,8 @@ TreeDropdownField.prototype = {
|
||||
var ajaxURL = this.buildURL('tree?forceValues=' + this.inputTag.value);
|
||||
var secId = jQuery(':input[name=SecurityID]');
|
||||
ajaxURL += secId.length ? '&SecurityID=' + secId.val() : '';
|
||||
if($('Form_EditForm_Locale')) ajaxURL += "&locale=" + $('Form_EditForm_Locale').value;
|
||||
var localeField = jQuery(this.ownerForm()).find(':input[name=locale],:input[name=Locale]');
|
||||
if(localeField.length) {ajaxURL += "&locale=" + localeField.val();}
|
||||
if(this.inputTag.value) ajaxURL += '&forceValue=' + this.inputTag.value;
|
||||
if(this.search() != null) ajaxURL += "&search=" + this.search();
|
||||
new Ajax.Request(ajaxURL, {
|
||||
|
Loading…
Reference in New Issue
Block a user