adminerevo/plugins/edit-textarea.php

18 lines
568 B
PHP
Raw Permalink Normal View History

2011-03-01 15:47:01 +00:00
<?php
/** Use <textarea> for char and varchar
2015-09-08 16:23:25 +00:00
* @link https://www.adminer.org/plugins/#use
2017-02-27 12:43:33 +00:00
* @author Jakub Vrana, https://www.vrana.cz/
2018-01-14 10:03:54 +00:00
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
2011-03-01 15:47:01 +00:00
*/
class AdminerEditTextarea {
2011-03-01 15:47:01 +00:00
function editInput($table, $field, $attrs, $value) {
if (preg_match('~char~', $field["type"])) {
2011-03-21 12:53:48 +00:00
return "<textarea cols='30' rows='1' style='height: 1.2em;'$attrs>" . h($value) . '</textarea>';
2011-03-01 15:47:01 +00:00
}
}
2011-03-01 15:47:01 +00:00
}