mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-15738 Always use <textarea> in language translation form, even for short strings. Merged from MOODLE_19_STABLE
This commit is contained in:
parent
62373088dd
commit
01724baa5c
@ -26,6 +26,7 @@
|
||||
define('LANG_MISSING_TEXT_MAX_LEN', 60); // maximum length of the missing text to display
|
||||
define('LANG_KEEP_ORPHANS', 1); // keep orphaned strings (i.e. strings w/o English reference)
|
||||
define('LANG_SEARCH_EXTRA', 1); // search lang files in extra locations
|
||||
define('LANG_ALWAYS_TEXTAREA', 1); // always use <textarea> even for short strings MDL-15738
|
||||
|
||||
$mode = optional_param('mode', '', PARAM_ALPHA);
|
||||
if ($mode == 'helpfiles') {
|
||||
@ -651,7 +652,11 @@
|
||||
if ($valuelen) {
|
||||
$cols = $valuelen + 5;
|
||||
}
|
||||
$o .= '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" '.$tabindex.' />';
|
||||
if (LANG_ALWAYS_TEXTAREA) {
|
||||
$o .= '<textarea name="stringXXX'.lang_form_string_key($key).'" cols="'.$cols.'" rows="1" '.$tabindex.'>'.$value.'</textarea>'."\n";
|
||||
} else {
|
||||
$o .= '<input type="text" name="stringXXX'.lang_form_string_key($key).'" value="'.$value.'" size="'.$cols.'" '.$tabindex.' />';
|
||||
}
|
||||
}
|
||||
if ($value2 <> '' && $value <> $value2) {
|
||||
$o .= '<br /><span style="font-size:small">'.$value2.'</span>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user