review the placeholder for select2 - refs BT#7674

1.9.x
Francis Gonzales 11 years ago
parent f3f8b75984
commit d3648dc786
  1. 7
      main/inc/lib/formvalidator/Element/select_ajax.php
  2. 2
      main/mySpace/index.php

@ -65,10 +65,15 @@ class HTML_QuickForm_Select_Ajax extends HTML_QuickForm_select
3 3
; ;
$plHolder = $this->getAttribute('placeholder');
if (empty($plHolder)) {
$plHolder = get_lang('SelectAnOption');
}
$html .= '<script> $html .= '<script>
$(function() { $(function() {
$("#'.$this->getAttribute('name').'").select2({ $("#'.$this->getAttribute('name').'").select2({
placeholder: "'.get_lang('SelectAnOption').'", placeholder: "' . $plHolder . '",
allowClear: true, allowClear: true,
width: "'.$width.'", width: "'.$width.'",
minimumInputLength: ' . $minimumInputLength . ', minimumInputLength: ' . $minimumInputLength . ',

@ -747,7 +747,7 @@ if ($is_platform_admin && in_array($view, array('admin')) && $display != 'yourst
$studentList[] = array('id' => $studentInfo['user_id'], 'text' => $studentInfo['username'] . ' (' . $studentInfo['firstname'] . ' ' . $studentInfo['lastname'] . ')'); $studentList[] = array('id' => $studentInfo['user_id'], 'text' => $studentInfo['username'] . ' (' . $studentInfo['firstname'] . ' ' . $studentInfo['lastname'] . ')');
} }
$sessionFilter->addElement('select_ajax', 'student_name', get_lang('SearchStudent'), null, array('url' => $url, 'defaults' => $studentList, 'width' => '400px', 'class' => 'pull-right', 'minimumInputLength' => $minimumInputLength)); $sessionFilter->addElement('select_ajax', 'student_name', get_lang('SearchStudent'), null, array('placeholder' => 'Todos', 'url' => $url, 'defaults' => $studentList, 'width' => '400px', 'class' => 'pull-right', 'minimumInputLength' => $minimumInputLength));
$options = array( $options = array(
'' => get_lang('Select'), '' => get_lang('Select'),
STUDENT => get_lang('Student'), STUDENT => get_lang('Student'),

Loading…
Cancel
Save