All installation and configuration problems and questions
Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
by gattaba » Mon Mar 11, 2013 6:31 am
hello,
I want to add drop-down lists on the interface VICIDIAL agent.
when I apply the code nothing appears someone could help me
Goautodial 2.0
Vicidial
VERSION: 2.6-392a svn
BUILD: 130102-1135
Asterisk-1.4.27.1-1
Vtiger version 5.1.0
Centos 6.3
digium card : TE122
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by bbakirtas » Mon Mar 11, 2013 6:37 am
do you have any examples?
Vicibox 9.0.1
VERSION: 2.14-738a
BUILD: 200210-1628
Intel Xeon X5650 12 Core HT 24 Core 2.90 Ghz
64 GB ECC Registered Memory
-
bbakirtas
-
- Posts: 93
- Joined: Thu Dec 06, 2012 3:35 am
- Location: Turkey
by gattaba » Mon Mar 11, 2013 10:00 am
- Code: Select all
<?php
/* Requête SQL de récupération des données */
$sql = "SELECT id_departement AS idd, departement AS dept, region.id_region AS idr, region ".
"FROM departement, region ".
"WHERE departement.id_region = region.id_region ".
"ORDER BY region.id_region;";
/* Connexion et exécution de la requête */
$connexion = mysql_pconnect($serveur, $admin, $mdp);
if($connexion != false)
{
$choixbase = mysql_select_db($base, $connexion);
$recherche = mysql_query($sql, $connexion);
/* Pour ne pas écraser mes tableaux, je crée un témoin */
$temoin_r = 0;
/* Création du tableau PHP des valeurs récupérées */
$regions = array();
/* Index du département par tableau régional */
$id = 0;
while($ligne = mysql_fetch_assoc($recherche))
{
$r = $ligne['idr'];
$d = $ligne['idd'];
/* Je vérifie si je suis toujours dans la même région, sinon je crée les tableaux nécessaires */
if($temoin_r != $r)
{
$regions[$r] = array();
/* J'ajoute laa région */
$regions[$r][0] = $ligne['region'];
$regions[$r][1] = array();
$regions[$r][2] = array();
$temoin_r = $r;
$id = 0;
}
/* J'ajoute les départements */
$regions[$r][1][$id] = $d;
$regions[$r][2][$id] = $ligne['dept'];
$id++;
}
/* On sérialise le tableau obtenu pour traitement par JavaScript */
$chaine = htmlspecialchars(serialize($regions), ENT_QUOTES);
?>
<script type="text/javascript">
/* <![CDATA[ */
<!--
/*
* Ici, on transmets la chaîne sérialisée à JavaScript
* pour la transformer en tableau indexé JavaScript
*/
var tableau = new PhpArray2Js('<?php echo $chaine; ?>');
var tab = tableau.retour();
// -->
/* ]]> */
</script>
</head>
<body style="font-family: verdana, helvetica, sans-serif; font-size: 85%">
<h3>Version Utilisant JavaScript</h3>
<p>Vous constaterez que le délai de latence entre la sélection et la mise à jour est quasiment inexistant.</p>
<?php
if(isset($_POST['ok']) && isset($_POST['departement']) && $_POST['departement'] != "")
{
$region_selectionnee = $_POST['region'];
$dept_selectionne = $_POST['departement'];
?>
<p>Vous avez sélectionné le département <?php echo($dept_selectionne); ?> dans la région <?php echo($region_selectionnee); ?></p>
<?php
}
?>
<form action="<?php echo($_SERVER['PHP_SELF']); ?>" method="post" id="chgdept">
<fieldset style="border: 3px double #333399">
<legend>Sélectionnez une région</legend>
<select name="region" id="region" onchange="changeDept(tab,this.value);">
<option value="vide">- - - Choisissez une région - - -</option>
<?php
/* Construction de la première liste : on se sert du tableau PHP */
$nbr = count($regions);
foreach($regions as $nr => $nom)
{
?>
<option value="<?php echo($nr); ?>"><?php echo($nom[0]); ?></option>
<?php
}
?>
</select>
<!-- ICI, le secret : on met un bloc avec un id ou va s'insérer le code de
la seconde liste déroulande -->
<span id="blocDepartements"></span><br />
<input type="submit" name="ok" id="ok" value="Envoyer" />
</fieldset>
</form>
<?php
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by gattaba » Mon Mar 11, 2013 10:02 am
I want that as soon as the call is hung like this that dropdowns are automatically recorded
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by williamconley » Mon Mar 11, 2013 5:20 pm
use custom fields which must first be activated and then applied to the List (or all lists, copying from the original). This will allow addition of many field types including dropdown. But this will only be available during the call. Alternately, you could use a Web Form to have the agent use "Web Form Submit" instead of "Submit" and any changes you want could be made in the web form.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
-
williamconley
-
- Posts: 20258
- Joined: Wed Oct 31, 2007 4:17 pm
- Location: Davenport, FL (By Disney!)
-
by gattaba » Tue Mar 12, 2013 7:23 am
thank you
but can you explain a little more about how to implement it.
I really do not know where to start
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by gattaba » Tue Mar 12, 2013 8:41 am
in the administration page I just see a way to change the field names but not to add drop-down list
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by williamconley » Wed Mar 13, 2013 12:29 pm
use custom fields. not mofidication of the existing fields. do you have a copy of the manager's manual?
in system settings you must first activate custom fields. then you will have to modify a list to add those custom feilds. this is where you will be able to create a dropdown or checkbox or any other type of field.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
-
williamconley
-
- Posts: 20258
- Joined: Wed Oct 31, 2007 4:17 pm
- Location: Davenport, FL (By Disney!)
-
by gattaba » Sat Mar 16, 2013 9:25 am
thanks William
but when i click custom field in list i have this message "You are not authorized to view this section "
But I put 1 "Enable Custom Fields List" in setting system
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by williamconley » Sat Mar 16, 2013 9:43 am
modify your user to have permission to modify fields (you set the system, but not your user yet ... because the custom fields option was invisible in the user settings until now)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
-
williamconley
-
- Posts: 20258
- Joined: Wed Oct 31, 2007 4:17 pm
- Location: Davenport, FL (By Disney!)
-
by gattaba » Sat Mar 16, 2013 10:03 am
this is good must be enabled for the admin too.
I am trying to build lists
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
by gattaba » Sat Mar 16, 2013 10:36 am
is that I have linked lists in the configuration.
for example I chose a list and change the following value
-
gattaba
-
- Posts: 131
- Joined: Thu Aug 02, 2012 6:04 am
Return to Support
Who is online
Users browsing this forum: No registered users and 123 guests