mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Alternate callto url system by config
This commit is contained in:
@@ -255,6 +255,18 @@ if (!defined('ALLOW_RESPONDENT_SELECTOR')) define ('ALLOW_RESPONDENT_SELECTOR',t
|
|||||||
* Display a faster alternate interface where VoIP is disabled
|
* Display a faster alternate interface where VoIP is disabled
|
||||||
*/
|
*/
|
||||||
if (!defined('ALTERNATE_INTERFACE')) define ('ALTERNATE_INTERFACE',false);
|
if (!defined('ALTERNATE_INTERFACE')) define ('ALTERNATE_INTERFACE',false);
|
||||||
|
/**
|
||||||
|
* Alow to choose the start part of the link for alternate interface, before phone
|
||||||
|
*/
|
||||||
|
if (!defined('ALTERNATE_INTERFACE_CALLSTARTURL')) define ('ALTERNATE_INTERFACE_CALLSTARTURL','callto:://');
|
||||||
|
/**
|
||||||
|
* Alow to choose the end part of the link for alternate interface, after phone
|
||||||
|
*/
|
||||||
|
if (!defined('ALTERNATE_INTERFACE_CALLENDURL')) define ('ALTERNATE_INTERFACE_CALLENDURL','');
|
||||||
|
/**
|
||||||
|
* Allwo 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
|
* 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
|
//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
|
//When then next one clicked, it should bring up call screen if no outcome otherwise start new call
|
||||||
//print "<div>";print "</div>";
|
//print "<div>";print "</div>";
|
||||||
|
$callstarturl = ALTERNATE_INTERFACE_CALLSTARTURL;
|
||||||
|
$callendurl = ALTERNATE_INTERFACE_CALLENDURL;
|
||||||
|
$extraattributes = ALTERNATE_INTERFACE_ATTRIBUTEURL;
|
||||||
foreach($rs as $r)
|
foreach($rs as $r)
|
||||||
{
|
{
|
||||||
print "<form method='post' action='?'>
|
print "<form method='post' action='?'>
|
||||||
<p>
|
<p>
|
||||||
<input onclick='this.form.submit();' type='radio' name='contactphone' value='{$r['contact_phone_id']}' id='contactphone{$r['contact_phone_id']}' {$r['checked']}/> 
|
<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']}";
|
<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'];
|
if (!empty($r['description'])) print " - " . $r['description'];
|
||||||
print "</label>
|
print "</label>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user