From 4dba04534ae180754a2fc9e5fe8c39d1362d7cdd Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Sat, 8 Nov 2008 01:07:46 +0000 Subject: [PATCH] preview: show errors checkbox git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@193 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/webim/locales/en/properties | 1 + src/messenger/webim/locales/ru/properties | 1 + src/messenger/webim/operator/preview.php | 6 ++++-- src/messenger/webim/view/preview.php | 12 ++++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 3217bfe0..f274ed6f 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -245,6 +245,7 @@ page.preview.mailsent=Mail is sent window page.preview.nochat=List of supported browsers window page.preview.redirect=Redirect visitor to another operator window page.preview.redirected=Visitor is redirected window +page.preview.showerr=Show errors page.preview.title=Site style page.preview.userchat=Chat window (user-mode) page_agent.create_new=Here you can create new operator diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index 56ae076c..6d6b31d9 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -245,6 +245,7 @@ page.preview.mailsent=Mail is sent window page.preview.nochat=List of supported browsers window page.preview.redirect=Redirect visitor to another operator window page.preview.redirected=Visitor is redirected window +page.preview.showerr=Отобразить ошибки page.preview.title=Стиль мессенджера page.preview.userchat=Chat window (user-mode) page_agent.create_new=Создание нового оператора diff --git a/src/messenger/webim/operator/preview.php b/src/messenger/webim/operator/preview.php index 93ba0ed3..a4e9112f 100644 --- a/src/messenger/webim/operator/preview.php +++ b/src/messenger/webim/operator/preview.php @@ -37,7 +37,7 @@ if(!in_array($preview, $stylelist)) { } $show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", ""); -$showerrors = verifyparam("showerr", "/^true$/", "") == "true"; +$showerrors = verifyparam("showerr", "/^on$/", "") == "on"; $errors = array(); if($showerrors) { $errors[] = "Test error"; @@ -96,6 +96,8 @@ $template = verifyparam("template", "/^\w+$/", "chat"); $page['formpreview'] = $preview; $page['formtemplate'] = $template; +$page['canshowerrors'] = $template == 'leavemessage' || $template == 'mail' || $template == 'all'; +$page['formshowerr'] = $showerrors; $page['availablePreviews'] = $stylelist; $page['availableTemplates'] = array( "chat", "chatsimple", "nochat", @@ -106,7 +108,7 @@ $page['availableTemplates'] = array( "all"); $page['operator'] = topage(get_operator_name($operator)); -$page['showlink'] = "$webimroot/operator/preview.php?preview=$preview&".($showerrors?"showerr=true&":"")."show="; +$page['showlink'] = "$webimroot/operator/preview.php?preview=$preview&".($showerrors?"showerr=on&":"")."show="; $page['previewList'] = array(); foreach($templateList as $tpl) { diff --git a/src/messenger/webim/view/preview.php b/src/messenger/webim/view/preview.php index 0888ed10..53cd58d0 100644 --- a/src/messenger/webim/view/preview.php +++ b/src/messenger/webim/view/preview.php @@ -65,6 +65,18 @@ + + + + + + + + + onchange="this.form.submit();"/> + + +