${add_js_home_local('tools.js', 'admin')}
<div id="languages_form">
<%def name="select_lang(i18n, lang_selected)">
    % if i18n==lang_selected:
        choose_flag
    % else:
        no_choose_flag
    % endif
</%def>
<%def name="hide_lang(i18n, lang_selected)">
    % if i18n!=lang_selected:
        style="display:none;"
    % endif
</%def>
% if lang_selected!=None:
    % for i18n in arr_i18n:
        ${form.change_name(name_form+'_'+i18n)}
        <span${hide_lang(i18n, lang_selected)} id="${name_form}_switch">${form.form()|n}</span>
        <a class="${select_lang(i18n, lang_selected)} lang_form" href="#"><img src="${make_media_url_module('images/languages/'+i18n+'.png', 'admin')}" alt="${name_form}_${i18n}"/></a> 
    % endfor 
% endif
</div>