diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl index 4186584dd..bb3a26cae 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/main.tpl @@ -33,6 +33,25 @@ getE('translation_lang').value = id_lang; document.getElementById('typeTranslationForm').submit(); } + + function addThemeSelect(el) + { + var list_type_for_theme = [{foreach $translations_type_for_theme as $type}'{$type}', {/foreach}]; + var type = el.value; + + $('select[name=theme]').hide(); + for (i=0; i < list_type_for_theme.length; i++) + if (list_type_for_theme[i] == type) + $('select[name=theme]').show(); + else + $('select[name=theme]').val('{$theme_default}'); + } + + $(document).ready(function(){ + $('select[name=type]').change(function() { + addThemeSelect(this); + }); + });