diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 1550c0ebef7..6b82c5237ea 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -36,10 +36,13 @@ $action = GETPOST("action"); /* * Actions */ + if ($action == 'setvalue' && $user->admin) { - $result=dolibarr_set_const($db, "CLICKTODIAL_URL", GETPOST("url"), 'chaine', 0, '', $conf->entity); - if ($result >= 0) + $result=dolibarr_set_const($db, "CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", GETPOST("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS"), 'chaine', 0, '', $conf->entity); + $result=dolibarr_set_const($db, "CLICKTODIAL_URL", GETPOST("CLICKTODIAL_URL"), 'chaine', 0, '', $conf->entity); + + if ($result1 >= 0 && $result2 >= 0) { setEventMessage($langs->trans("SetupSaved")); } @@ -73,13 +76,22 @@ $var=true; print '
| '.$langs->trans("Name").' | '; +print ''.$langs->trans("Name").' | '; print ''.$langs->trans("Value").' | '; print "
| '; +print ' | ||
| '; +print $langs->trans("ClickToDialUseTelLink").' | ';
+print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).' '; +print ' '; +print $langs->trans("ClickToDialUseTelLinkDesc"); +print ' | |
| '; print $langs->trans("DefaultLink").' | ';
-print ' '; +print 'global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS?' disabled="disabled"':'').' value="'.$conf->global->CLICKTODIAL_URL.'"> '; print ' '; print $langs->trans("ClickToDialUrlDesc").' '; print $langs->trans("Example").': http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b7db522458e..5b990ac509c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1544,9 +1544,9 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep } } - if (! empty($addlink)) // Link on phone number + link to add action (if conf->global->AGENDA_ADDACTIONFORPHONE set) + if (! empty($addlink)) // Link on phone number (+ link to add action if conf->global->AGENDA_ADDACTIONFORPHONE set) { - if (! empty($conf->browser->phone)) // If phone, we use link of phone + if (! empty($conf->browser->phone) || (! empty($conf->clicktodial->enabled) && ! empty($conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS))) // If phone or option for, we use link of phone { $newphone =''.$phone.''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c924d80639e..f6399bffa6b 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1560,7 +1560,9 @@ AGENDA_DEFAULT_FILTER_TYPE=Set automatically this type of event into search filt AGENDA_DEFAULT_FILTER_STATUS=Set automatically this status for events into search filter of agenda view AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda ##### ClickToDial ##### -ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module allows to make phone numbers clickable. A click on this icon will call make your phone to call the phone number. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialUseTelLink=Use just a link "tel:" on phone numbers +ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or an interface install on same computer than the browser, and called when you click on a link in your browser that start with "tel:". If you need a full server solution, you must set this to "No" and fill next field. ##### Point Of Sales (CashDesk) ##### CashDesk=Point of sales CashDeskSetup=Point of sales module setup |