Set default field value to current locale

This commit is contained in:
Mark-M 2013-07-17 15:06:42 +01:00
parent 34a171b9dc
commit 6394f887de

View File

@ -4,6 +4,7 @@ class TranslatableEditorToolbarExtension extends DataExtension {
function updateLinkForm(&$form) { function updateLinkForm(&$form) {
$field = new LanguageDropdownField('Language', _t('CMSMain.LANGUAGEDROPDOWNLABEL', 'Language')); $field = new LanguageDropdownField('Language', _t('CMSMain.LANGUAGEDROPDOWNLABEL', 'Language'));
$field->setValue(Translatable::get_current_locale());
$field->setForm($form); $field->setForm($form);
$form->Fields()->insertBefore($field, 'internal'); $form->Fields()->insertBefore($field, 'internal');
Requirements::javascript('translatable/javascript/HtmlEditorField.Translatable.js'); Requirements::javascript('translatable/javascript/HtmlEditorField.Translatable.js');