mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
New Feature: Allow calltourl to be configured
This commit is contained in:
@@ -256,6 +256,21 @@ if (!defined('ALLOW_RESPONDENT_SELECTOR')) define ('ALLOW_RESPONDENT_SELECTOR',t
|
||||
*/
|
||||
if (!defined('ALTERNATE_INTERFACE')) define ('ALTERNATE_INTERFACE',false);
|
||||
|
||||
/**
|
||||
* Allow to choose the start part of the link for alternate interface, before phone
|
||||
*/
|
||||
if (!defined('ALTERNATE_INTERFACE_CALLSTARTURL')) define ('ALTERNATE_INTERFACE_CALLSTARTURL','callto:');
|
||||
|
||||
/**
|
||||
* Allow to choose the end part of the link for alternate interface, after phone
|
||||
*/
|
||||
if (!defined('ALTERNATE_INTERFACE_CALLENDURL')) define ('ALTERNATE_INTERFACE_CALLENDURL','');
|
||||
|
||||
/**
|
||||
* Allow to set some specific attributes (for example target='_blank') to call url
|
||||
*/
|
||||
if (!defined('ALTERNATE_INTERFACE_ATTRIBUTEURL')) define ('ALTERNATE_INTERFACE_ATTRIBUTEURL','');
|
||||
|
||||
/**
|
||||
* Number of log records to display
|
||||
*/
|
||||
|
||||
@@ -215,13 +215,16 @@ if ($ca)
|
||||
//By default, the selected radio button should have a "call" started for it
|
||||
//When then next one clicked, it should bring up call screen if no outcome otherwise start new call
|
||||
//print "<div>";print "</div>";
|
||||
$callstarturl = ALTERNATE_INTERFACE_CALLSTARTURL;
|
||||
$callendurl = ALTERNATE_INTERFACE_CALLENDURL;
|
||||
$extraattributes = ALTERNATE_INTERFACE_ATTRIBUTEURL;
|
||||
foreach($rs as $r)
|
||||
{
|
||||
print "<form method='post' action='?'>
|
||||
<p>
|
||||
<input onclick='this.form.submit();' type='radio' name='contactphone' value='{$r['contact_phone_id']}' id='contactphone{$r['contact_phone_id']}' {$r['checked']}/> 
|
||||
<label for='contactphone{$r['contact_phone_id']}'>{$r['phone']}";
|
||||
if ($r['checked']) print " <a href='callto:{$r['phone']}' class='btn btn-primary btn-xs'><i class='fa fa-phone fa-fw'></i> " . T_('Dial') . "</a>";
|
||||
if ($r['checked']) print "<br> <a href='{$callstarturl}{$r['phone']}{$callendurl}' {$extraattributes} class='btn btn-primary btn-xs'><i class='fa fa-phone fa-fw'></i> " . T_('Dial') . " {$r['phone']}</a>";
|
||||
if (!empty($r['description'])) print " - " . $r['description'];
|
||||
print "</label>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user