forked from extern/egroupware
modify <textbox multiline="true".../> --> <et2-textarea...></et2-textarea>
This commit is contained in:
parent
64860e12f1
commit
70e838b267
@ -13,7 +13,7 @@
|
||||
use EGroupware\Api;
|
||||
|
||||
// add et2- prefix to following widgets/tags
|
||||
const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|button))(/?|\s[^>]*)>#m';
|
||||
const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|textarea|button))(/?|\s[^>]*)>#m';
|
||||
|
||||
// switch evtl. set output-compression off, as we cant calculate a Content-Length header with transparent compression
|
||||
ini_set('zlib.output_compression', 0);
|
||||
@ -64,6 +64,9 @@ function send_template()
|
||||
// fix <menulist...><menupopup type="select-*"/></menulist> --> <select type="select-*" .../>
|
||||
$str = preg_replace('#<menulist([^>]*)>[\r\n\s]*<menupopup([^>]+>)[\r\n\s]*</menulist>#', '<select$1$2', $str);
|
||||
|
||||
// fix <textbox multiline="true" .../> --> <textarea .../> (et2-prefix and self-closing is handled below)
|
||||
$str = preg_replace('#<textbox(.*?)\smultiline="true"(.*?)/>#u', '<textarea$1$2/>', $str);
|
||||
|
||||
$str = preg_replace_callback(ADD_ET2_PREFIX_REGEXP, static function (array $matches)
|
||||
{
|
||||
return '<' . $matches[2] . 'et2-' . $matches[3] .
|
||||
|
Loading…
Reference in New Issue
Block a user