Skip to content

Commit

Permalink
WCAG AAA improvement onChange JS - Refs #7898
Browse files Browse the repository at this point in the history
  • Loading branch information
jloguercio committed Oct 14, 2015
1 parent be16d5a commit 483f502
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main/inc/lib/api.lib.php
Expand Up @@ -4208,6 +4208,12 @@ function api_display_language_form($hide_if_no_choice = false)
$html = '
<script type="text/javascript">
<!--
$(document).ready(function() {
$("#language_list").change(function() {
jumpMenu("parent",this,0);
});
});
function jumpMenu(targ,selObj,restore){ // v3.0
eval(targ+".location=\'"+selObj.options[selObj.selectedIndex].value+"\'");
if (restore) selObj.selectedIndex=0;
Expand All @@ -4216,7 +4222,7 @@ function jumpMenu(targ,selObj,restore){ // v3.0
</script>';
$html .= '<form id="lang_form" name="lang_form" method="post" action="'.api_get_self().'">';
$html .= '<label style="display: none;" for="language_list">' . get_lang('Language') . '</label>';
$html .= '<select id="language_list" class="selectpicker show-tick form-control" name="language_list" onchange="javascript: jumpMenu(\'parent\',this,0);">';
$html .= '<select id="language_list" class="selectpicker show-tick form-control" name="language_list" >';

foreach ($original_languages as $key => $value) {
if ($folder[$key] == $user_selected_language) {
Expand Down

0 comments on commit 483f502

Please sign in to comment.