Voicemail tutorial (#2451)

* Update macro.lua

Add additional macros for the tutorial.

* Create tutorial.lua

* Update index.lua

* Update record_greeting.lua

Add menu variable to route back to appropriate place in the flow.

* Update record_menu.lua

Add menu variable to accommodate the tutorial.

* Update change_password.lua

Add menu variable to accommodate the tutorial.

* Update record_name.lua

Add menu variable to accommodate the tutorial.

* Update voicemail_edit.php

Add option to play tutorial on next login.

* Update app_languages.php

* Update app_config.php

Add voicemail_tutorial to database.

* Update extension_edit.php

Set "voicemail_tutorial" to true for new extensions.
This commit is contained in:
konradSC
2017-03-24 23:06:16 -06:00
committed by FusionPBX
parent be308e40bd
commit 5dcd3a1d2e
11 changed files with 339 additions and 20 deletions
+3
View File
@@ -385,6 +385,7 @@
//if voicemail_uuid does not exist then get a new uuid
if (!isset($voicemail_uuid)) {
$voicemail_uuid = uuid();
$voicemail_tutorial = 'true';
}
//add the voicemail
@@ -403,6 +404,7 @@
$voicemail_description = $description;
}
$array["voicemails"][$i]["voicemail_description"] = $voicemail_description;
$array["voicemails"][$i]["voicemail_tutorial"] = $voicemail_tutorial;
}
//increment the extension number
@@ -650,6 +652,7 @@
$voicemail_local_after_email = $row["voicemail_local_after_email"];
$voicemail_enabled = $row["voicemail_enabled"];
$voicemail_description = $row["voicemail_description"];
$voicemail_tutorial = $row["voicemail_tutorial"];
}
unset ($prep_statement);
//clean the variables
+4
View File
@@ -200,6 +200,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_tutorial";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$y++;
$apps[$x]['db'][$y]['table']['name'] = "v_voicemail_messages";
+22
View File
@@ -245,6 +245,17 @@ $text['label-voicemail_description']['uk'] = "Опис";
$text['label-voicemail_description']['de-at'] = "Beschreibung";
$text['label-voicemail_description']['he'] = "תאור";
$text['label-voicemail_tutorial']['en-us'] = "Play Tutorial";
$text['label-voicemail_tutorial']['es-cl'] = "";
$text['label-voicemail_tutorial']['pt-pt'] = "";
$text['label-voicemail_tutorial']['fr-fr'] = "";
$text['label-voicemail_tutorial']['pt-br'] = "";
$text['label-voicemail_tutorial']['pl'] = "";
$text['label-voicemail_tutorial']['sv-se'] = "";
$text['label-voicemail_tutorial']['uk'] = "";
$text['label-voicemail_tutorial']['de-at'] = "";
$text['label-voicemail_tutorial']['he'] = "";
$text['label-tools']['en-us'] = "Tools";
$text['label-tools']['es-cl'] = "Herramientas";
$text['label-tools']['pt-pt'] = "Ferramentas";
@@ -753,6 +764,17 @@ $text['description-caller_id_name']['uk'] = "Caller ID Ім’я";
$text['description-caller_id_name']['de-at'] = "Anruferkennung (Name)";
$text['description-caller_id_name']['he'] = "";
$text['description-voicemail_tutorial']['en-us'] = "Play the voicemail tutorial after the next voicemail login.";
$text['description-voicemail_tutorial']['es-cl'] = "";
$text['description-voicemail_tutorial']['pt-pt'] = "";
$text['description-voicemail_tutorial']['fr-fr'] = "";
$text['description-voicemail_tutorial']['pt-br'] = "";
$text['description-voicemail_tutorial']['pl'] = "";
$text['description-voicemail_tutorial']['sv-se'] = "";
$text['description-voicemail_tutorial']['uk'] = "";
$text['description-voicemail_tutorial']['de-at'] = "";
$text['description-voicemail_tutorial']['he'] = "";
$text['button-toggle']['en-us'] = "Toggle";
$text['button-toggle']['es-cl'] = "Palanca";
$text['button-toggle']['pt-pt'] = "Alternar";
+19
View File
@@ -68,6 +68,7 @@
$voicemail_local_after_email = check_str($_POST["voicemail_local_after_email"]);
$voicemail_enabled = check_str($_POST["voicemail_enabled"]);
$voicemail_description = check_str($_POST["voicemail_description"]);
$voicemail_tutorial = check_str($_POST["voicemail_tutorial"]);
//remove the space
$voicemail_mail_to = str_replace(" ", "", $voicemail_mail_to);
@@ -153,6 +154,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "voicemail_mail_to, ";
$sql .= "voicemail_sms_to, ";
$sql .= "voicemail_transcription_enabled, ";
$sql .= "voicemail_tutorial, ";
$sql .= "voicemail_file, ";
$sql .= "voicemail_local_after_email, ";
$sql .= "voicemail_enabled, ";
@@ -169,6 +171,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'".$voicemail_mail_to."', ";
$sql .= "'".$voicemail_sms_to."', ";
$sql .= "'".$voicemail_transcription_enabled."', ";
$sql .= "'".$voicemail_tutorial."', ";
$sql .= "'".$voicemail_file."', ";
$sql .= "'".$voicemail_local_after_email."', ";
$sql .= "'".$voicemail_enabled."', ";
@@ -189,6 +192,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "voicemail_mail_to = '".$voicemail_mail_to."', ";
$sql .= "voicemail_sms_to = '".$voicemail_sms_to."', ";
$sql .= "voicemail_transcription_enabled = '".$voicemail_transcription_enabled."', ";
$sql .= "voicemail_tutorial = '".$voicemail_tutorial."', ";
$sql .= "voicemail_file = '".$voicemail_file."', ";
$sql .= "voicemail_local_after_email = '".$voicemail_local_after_email."', ";
$sql .= "voicemail_enabled = '".$voicemail_enabled."', ";
@@ -287,6 +291,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$voicemail_mail_to = $row["voicemail_mail_to"];
$voicemail_sms_to = $row["voicemail_sms_to"];
$voicemail_transcription_enabled = $row["voicemail_transcription_enabled"];
$voicemail_tutorial = $row["voicemail_tutorial"];
$voicemail_file = $row["voicemail_file"];
$voicemail_local_after_email = $row["voicemail_local_after_email"];
$voicemail_enabled = $row["voicemail_enabled"];
@@ -360,6 +365,20 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_tutorial']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='voicemail_tutorial' id='voicemail_tutorial'>\n";
echo " <option value='true' ".(($voicemail_tutorial == "true") ? "selected='selected'" : null).">".$text['label-true']."</option>\n";
echo " <option value='false' ".(($voicemail_tutorial == "false") ? "selected='selected'" : null).">".$text['label-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo $text['description-voicemail_tutorial']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-greeting']."\n";