#improving edit-mode in admin composing welcome/start messages.

if you entered/saved text in WYSIWYG Mode, you will start editing the text in this mode, later on. If you choose to leave WYSIWYG mode HTML 
tags will be stripped completely. Switching back and forth, will display the saved content with mode selected (WYSIWYG/PLAIN), changes made are
lost if not saved. 
If you save in PLAIN Mode all former HTML formatting will be abondened.
This commit is contained in:
Klaus Leithoff 2008-08-11 10:25:58 +00:00
parent 871116b6e1
commit df933068b3

View File

@ -117,10 +117,10 @@
else
{
$current_message = $GLOBALS['egw']->translation->read($select_lang,$section,$section.'_message');
if($_POST['htmlarea'])
if ($_POST['no-htmlarea']) $current_message = strip_tags($current_message);
if($_POST['htmlarea'] || strlen($current_message) > strlen(strip_tags($current_message)))
{
$text_or_htmlarea=$html->htmlarea('message',$html->htmlspecialchars($current_message),'advanced');
$text_or_htmlarea=$html->htmlarea('message',$current_message,'advanced');
$htmlarea_button='<input type="submit" name="no-htmlarea" onclick="self.location.href=\''.$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('disable WYSIWYG-editor').'">';
}
else