Permalink
Browse files

MINOR Markup changes to Translatable->getCMSField() to better support…

… clientside language selection

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92525 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
chillu committed Nov 21, 2009
1 parent 18bd505 commit 0009b5491cdd1efaa07521a182da0ba23f0d4f82
Showing with 16 additions and 9 deletions.
  1. +16 −9 core/model/Translatable.php
@@ -944,18 +944,25 @@ function updateCMSFields(FieldSet &$fields) {
'Root',
new Tab('Translations', _t('Translatable.TRANSLATIONS', 'Translations'),
new HeaderField('CreateTransHeader', _t('Translatable.CREATE', 'Create new translation'), 2),
- $langDropdown = new LanguageDropdownField(
- "NewTransLang",
- _t('Translatable.NEWLANGUAGE', 'New language'),
- $alreadyTranslatedLocales,
- 'SiteTree',
- 'Locale-Native',
- $this->owner
- ),
- $createButton = new InlineFormAction('createtranslation',_t('Translatable.CREATEBUTTON', 'Create'))
+ $createTranslationComposite = new CompositeField(
+ $langDropdown = new LanguageDropdownField(
+ "NewTransLang",
+ _t('Translatable.NEWLANGUAGE', 'New language'),
+ $alreadyTranslatedLocales,
+ 'SiteTree',
+ 'Locale-Native',
+ $this->owner
+ ),
+ $createButton = new InlineFormAction(
+ 'createtranslation',
+ _t('Translatable.CREATEBUTTON', 'Create')
+ )
+ )
)
);
$createButton->includeDefaultJS(false);
+ $createTranslationComposite->addExtraClass('createTranslation');
+ $createTranslationComposite->addExtraClass("{url:'/admin/createtranslation'}");
if($alreadyTranslatedLocales) {
$fields->addFieldToTab(

0 comments on commit 0009b54

Please sign in to comment.