mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-23 19:31:53 +02:00
modernized login- and start-message editing a bit
This commit is contained in:
parent
8ee3b4ccb1
commit
85bcd0200d
@ -1,18 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**
|
||||||
* eGroupWare - administration *
|
* EGgroupware administration
|
||||||
* http://www.egroupware.org *
|
*
|
||||||
* -------------------------------------------- *
|
* @link http://www.egroupware.org
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* @package admin
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* @version $Id$
|
||||||
* option) any later version. *
|
*/
|
||||||
\**************************************************************************/
|
|
||||||
|
|
||||||
/* $Id$ */
|
class uimainscreen
|
||||||
|
{
|
||||||
class uimainscreen
|
|
||||||
{
|
|
||||||
var $public_functions = array('index' => True);
|
var $public_functions = array('index' => True);
|
||||||
|
|
||||||
function index()
|
function index()
|
||||||
@ -42,10 +39,10 @@
|
|||||||
$GLOBALS['egw']->template->set_block('message','row','row');
|
$GLOBALS['egw']->template->set_block('message','row','row');
|
||||||
$GLOBALS['egw']->template->set_block('message','row_2','row_2');
|
$GLOBALS['egw']->template->set_block('message','row_2','row_2');
|
||||||
|
|
||||||
if ($_POST['submit'])
|
if ($_POST['save'])
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->translation->write($select_lang,$section,$section.'_message',$message);
|
translation::write($select_lang,$section,$section.'_message',$message);
|
||||||
$feedback_message = '<center>'.lang('message has been updated').'</center>';
|
egw_framework::message(lang('message has been updated'));
|
||||||
|
|
||||||
$section = '';
|
$section = '';
|
||||||
}
|
}
|
||||||
@ -67,32 +64,21 @@
|
|||||||
}
|
}
|
||||||
if (empty($section))
|
if (empty($section))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->common->egw_header();
|
common::egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$GLOBALS['egw_info']['theme']['th_bg']);
|
|
||||||
$GLOBALS['egw']->template->set_var('value',' ');
|
$GLOBALS['egw']->template->set_var('value',' ');
|
||||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||||
|
|
||||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
$langs = translation::get_installed_langs();
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
$langs['en'] .= ' ('.lang('All languages').')';
|
||||||
|
$lang_select = html::select('select_lang', 'en', $langs);
|
||||||
$lang_select = '<select name="select_lang">';
|
|
||||||
foreach($GLOBALS['egw']->translation->get_installed_langs() as $lang => $lang_name)
|
|
||||||
{
|
|
||||||
$lang_select .= '<option value="' . $lang . '"'.($lang == $select_lang ? ' selected="selected"' : '').'>' .
|
|
||||||
$lang . ' - ' . $lang_name . "</option>\n";
|
|
||||||
}
|
|
||||||
$lang_select .= '</select>';
|
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('label',lang('Language'));
|
$GLOBALS['egw']->template->set_var('label',lang('Language'));
|
||||||
$GLOBALS['egw']->template->set_var('value',$lang_select);
|
$GLOBALS['egw']->template->set_var('value',$lang_select);
|
||||||
$GLOBALS['egw']->template->fp('rows','row',True);
|
$GLOBALS['egw']->template->fp('rows','row',True);
|
||||||
|
|
||||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
|
||||||
$select_section = '<select name="section">'."\n";
|
$select_section = '<select name="section">'."\n";
|
||||||
foreach($acl_ok as $key => $val)
|
foreach($acl_ok as $key => $val)
|
||||||
{
|
{
|
||||||
@ -105,60 +91,46 @@
|
|||||||
$GLOBALS['egw']->template->set_var('value',$select_section);
|
$GLOBALS['egw']->template->set_var('value',$select_section);
|
||||||
$GLOBALS['egw']->template->fp('rows','row',True);
|
$GLOBALS['egw']->template->fp('rows','row',True);
|
||||||
|
|
||||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
$GLOBALS['egw']->template->set_var('value',
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
html::submit_button('edit', lang('Edit'))."\n".html::submit_button('cancel', lang('Cancel')));
|
||||||
$GLOBALS['egw']->template->set_var('value','<input type="submit" value="' . lang('Edit')
|
|
||||||
. '"><input type="submit" name="cancel" value="'. lang('cancel') .'">');
|
|
||||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$current_message = $GLOBALS['egw']->translation->read($select_lang,$section,$section.'_message');
|
$current_message = translation::read($select_lang,$section,$section.'_message');
|
||||||
if ($_POST['no-htmlarea']) $current_message = strip_tags($current_message);
|
if ($_POST['no']) $current_message = strip_tags($current_message);
|
||||||
if($_POST['htmlarea'] || strlen($current_message) > strlen(strip_tags($current_message)))
|
if (empty($_POST['no']) && ($_POST['yes'] || empty($current_message) ||
|
||||||
|
strlen($current_message) != strlen(strip_tags($current_message))))
|
||||||
{
|
{
|
||||||
$text_or_htmlarea = html::fckEditorQuick('message','advanced',$current_message,'400px','800px');
|
$text_or_htmlarea = html::fckEditorQuick('message','advanced',$current_message,'400px','800px');
|
||||||
$htmlarea_button='<input type="submit" name="no-htmlarea" onclick="self.location.href=\''.$GLOBALS['egw']->link('/index.php',
|
$htmlarea_button = html::submit_button("no", lang('disable WYSIWYG-editor'));
|
||||||
'menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('disable WYSIWYG-editor').'">';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' .
|
$text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' .
|
||||||
html::htmlspecialchars($current_message) . '</textarea>';
|
html::htmlspecialchars($current_message) . '</textarea>';
|
||||||
$htmlarea_button='<input type="submit" name="htmlarea" onclick="self.location.href=\''.
|
$htmlarea_button = html::submit_button("yes", lang('activate WYSIWYG-editor'));
|
||||||
$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.
|
|
||||||
lang('activate WYSIWYG-editor').'">';
|
|
||||||
}
|
}
|
||||||
$GLOBALS['egw']->common->egw_header();
|
common::egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
||||||
$GLOBALS['egw']->template->set_var('select_lang',$select_lang);
|
$GLOBALS['egw']->template->set_var('select_lang',$select_lang);
|
||||||
$GLOBALS['egw']->template->set_var('section',$section);
|
$GLOBALS['egw']->template->set_var('section',$section);
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$GLOBALS['egw_info']['theme']['th_bg']);
|
|
||||||
$GLOBALS['egw']->template->set_var('value',' ');
|
$GLOBALS['egw']->template->set_var('value',' ');
|
||||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||||
|
|
||||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
|
||||||
|
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('value',$text_or_htmlarea);
|
$GLOBALS['egw']->template->set_var('value',$text_or_htmlarea);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||||
|
|
||||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
$GLOBALS['egw']->template->set_var('value',
|
||||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
html::submit_button('save', lang('Save'))."\n".html::submit_button('cancel', lang('Cancel')).
|
||||||
$GLOBALS['egw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save')
|
"\n".$htmlarea_button);
|
||||||
. '"><input type="submit" name="cancel" value="'. lang('cancel') .'">'.$htmlarea_button);
|
|
||||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('lang_cancel',lang('Cancel'));
|
$GLOBALS['egw']->template->set_var('lang_cancel',lang('Cancel'));
|
||||||
$GLOBALS['egw']->template->set_var('error_message',$feedback_message);
|
|
||||||
$GLOBALS['egw']->template->pparse('out','form');
|
$GLOBALS['egw']->template->pparse('out','form');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<!-- BEGIN form -->
|
<!-- BEGIN form -->
|
||||||
<div align="center">{error_message}</div>
|
|
||||||
<form method="POST" action="{form_action}">
|
<form method="POST" action="{form_action}">
|
||||||
<table border="0" align="center" >
|
<table border="0" align="center" >
|
||||||
<input type="hidden" name="select_lang" value="{select_lang}">
|
<input type="hidden" name="select_lang" value="{select_lang}">
|
||||||
<input type="hidden" name="section" value="{section}">
|
<input type="hidden" name="section" value="{section}">
|
||||||
{rows}
|
{rows}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
@ -13,12 +12,12 @@
|
|||||||
<!-- BEGIN row -->
|
<!-- BEGIN row -->
|
||||||
<tr >
|
<tr >
|
||||||
<td>{label}</td>
|
<td>{label}</td>
|
||||||
<td align="left">{value}</td>
|
<td>{value}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END row -->
|
<!-- END row -->
|
||||||
|
|
||||||
<!-- BEGIN row_2 -->
|
<!-- BEGIN row_2 -->
|
||||||
<tr >
|
<tr >
|
||||||
<td colspan="2" align="left">{value}</td>
|
<td colspan="2">{value}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END row_2 -->
|
<!-- END row_2 -->
|
||||||
|
@ -421,7 +421,7 @@ jQuery.extend(et2_button,
|
|||||||
copy: /copy(&|\]|$)/,
|
copy: /copy(&|\]|$)/,
|
||||||
more: /more(&|\]|$)/,
|
more: /more(&|\]|$)/,
|
||||||
check: /(yes|check)(&|\]|$)/,
|
check: /(yes|check)(&|\]|$)/,
|
||||||
canceled: /no(&|\]|$)/,
|
cancelled: /no(&|\]|$)/,
|
||||||
ok: /ok(&|\]|$)/,
|
ok: /ok(&|\]|$)/,
|
||||||
close: /close(&|\]|$)/,
|
close: /close(&|\]|$)/,
|
||||||
add: /(add(&|\]|$)|create)/ // customfields use create*
|
add: /(add(&|\]|$)|create)/ // customfields use create*
|
||||||
|
@ -672,7 +672,7 @@ egw_LAB.wait(function() {
|
|||||||
'copy' => '/copy(&|\]|$)/',
|
'copy' => '/copy(&|\]|$)/',
|
||||||
'more' => '/more(&|\]|$)/',
|
'more' => '/more(&|\]|$)/',
|
||||||
'check' => '/(yes|check)(&|\]|$)/',
|
'check' => '/(yes|check)(&|\]|$)/',
|
||||||
'canceled' => '/no(&|\]|$)/',
|
'cancelled' => '/no(&|\]|$)/',
|
||||||
'ok' => '/ok(&|\]|$)/',
|
'ok' => '/ok(&|\]|$)/',
|
||||||
'close' => '/close(&|\]|$)/',
|
'close' => '/close(&|\]|$)/',
|
||||||
'add' => '/(add(&|\]|$)|create)/', // customfields use create*
|
'add' => '/(add(&|\]|$)|create)/', // customfields use create*
|
||||||
|
@ -216,14 +216,14 @@
|
|||||||
|
|
||||||
// instanciate app object
|
// instanciate app object
|
||||||
var appname = window.egw_appName;
|
var appname = window.egw_appName;
|
||||||
if (window.app && window.app[appname] != 'object' && typeof window.app.classes[appname] == 'function')
|
if (window.app && typeof window.app[appname] != 'object' && typeof window.app.classes[appname] == 'function')
|
||||||
{
|
{
|
||||||
window.app[appname] = new window.app.classes[appname]();
|
window.app[appname] = new window.app.classes[appname]();
|
||||||
}
|
}
|
||||||
|
|
||||||
// set sidebox for tabed templates
|
// set sidebox for tabed templates
|
||||||
var sidebox = egw_script.getAttribute('data-setSidebox') || jQuery('#late-sidebox').attr('data-setSidebox');
|
var sidebox = egw_script.getAttribute('data-setSidebox') || jQuery('#late-sidebox').attr('data-setSidebox');
|
||||||
if (window.framework && sidebox)
|
if (window.framework && sidebox && sidebox !== 'null')
|
||||||
{
|
{
|
||||||
window.framework.setSidebox.apply(window.framework, JSON.parse(sidebox));
|
window.framework.setSidebox.apply(window.framework, JSON.parse(sidebox));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user