2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Added no call available screen

Updated so schedule appointment and setting outcome functions can occur on standard list radio
This commit is contained in:
azammitdcarf
2010-09-30 01:32:16 +00:00
parent cc64834bde
commit 0b384bdc53
2 changed files with 86 additions and 2 deletions

View File

@@ -1804,9 +1804,37 @@ function do_list_radio($ia)
} }
// $answer .= $wrapper['item-start'].' <input class="radio" type="radio" value="'.$ansrow['code'].'" name="'.$ia[1].'" id="answer'.$ia[1].$ansrow['code'].'"'.$check_ans.' onclick="checkconditions(this.value, this.name, this.type)" /> // $answer .= $wrapper['item-start'].' <input class="radio" type="radio" value="'.$ansrow['code'].'" name="'.$ia[1].'" id="answer'.$ia[1].$ansrow['code'].'"'.$check_ans.' onclick="checkconditions(this.value, this.name, this.type)" />
// TIBO switch to the following line in order to reset the othercomment field when the other option is unselected // TIBO switch to the following line in order to reset the othercomment field when the other option is unselected
$answer .= $wrapper['item-start'].' <input class="radio" type="radio" value="'.$ansrow['code'].'" name="'.$ia[1].'" id="answer'.$ia[1].$ansrow['code'].'"'.$check_ans.' onclick="if (document.getElementById(\'answer'.$ia[1].'othertext\') != null) document.getElementById(\'answer'.$ia[1].'othertext\').value=\'\';checkconditions(this.value, this.name, this.type)'.quexs_submit_on_click().'" />
//queXS check if this is designed to set an outcome:
$quexs_outcome = false;
$quexs_outcome_code = 0;
if (strncasecmp($ansrow['answer'],"{OUTCOME:",9) == 0)
{
$quexs_pos = strrpos($ansrow['answer'],"}",8);
if ($quexs_pos != false)
{
$quexs_outcome_code = substr($ansrow['answer'],9,$quexs_pos - 9);
$quexs_outcome = true;
include_once(dirname(__FILE__) . '/quexs.php');
$ansrow['answer'] = quexs_template_replace($ansrow['answer']);
}
}
//queXS check if this is designed to schedule an appointment:
$quexs_appointment = false;
if (strncasecmp($ansrow['answer'],"{SCHEDULEAPPOINTMENT}",21) == 0)
{
$ansrow['answer'] = $clang->gT("Schedule Appointment");
$quexs_appointment = true;
}
$answer .= $wrapper['item-start'].' <input class="radio" type="radio" value="'.$ansrow['code'].'" name="'.$ia[1].'" id="answer'.$ia[1].$ansrow['code'].'"'.$check_ans.' onclick="if (document.getElementById(\'answer'.$ia[1].'othertext\') != null) document.getElementById(\'answer'.$ia[1].'othertext\').value=\'\';checkconditions(this.value, this.name, this.type)'.quexs_submit_on_click(!$quexs_outcome && !$quexs_appointment).quexs_outcome($quexs_outcome_code).quexs_appointment($quexs_appointment).'" />
<label for="answer'.$ia[1].$ansrow['code'].'" class="answertext">'.$ansrow['answer'].'</label> <label for="answer'.$ia[1].$ansrow['code'].'" class="answertext">'.$ansrow['answer'].'</label>
'.$wrapper['item-end']; '.$wrapper['item-end'];
++$rowcounter; ++$rowcounter;
if ($rowcounter == $wrapper['maxrows'] && $colcounter < $wrapper['cols']) if ($rowcounter == $wrapper['maxrows'] && $colcounter < $wrapper['cols'])

56
nocallavailable.php Normal file
View File

@@ -0,0 +1,56 @@
<?
/**
* Display error message when no current call available
*
*
* This file is part of queXS
*
* queXS is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* queXS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with queXS; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*
* @author Adam Zammit <adam.zammit@acspri.org.au>
* @copyright ACSPRI 2010
* @package queXS
* @subpackage user
* @link http://www.acspri.org.au/ queXS was writen for ACSPRI - Australian Consortium for Social and Political Research Inc.
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
*
*/
/**
* Configuration file
*/
include ("config.inc.php");
/**
* XHTML functions
*/
include ("functions/functions.xhtml.php");
/**
* Language functions
*/
include ("lang.inc.php");
xhtml_head(T_("No call available"),true,array("css/table.css"));
?>
<h1><? echo T_("Please click on:") . " " . T_("Call/Hangup") . " " .T_("to display call script"); ?></h1>
<?
xhtml_foot();
?>