Extension Copy more complete and includes voicemail.

This commit is contained in:
Nate Jones
2014-05-01 02:48:25 +00:00
parent e1ca4951d3
commit 5237fc7d00
3 changed files with 117 additions and 26 deletions
+18 -1
View File
@@ -775,6 +775,23 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo " aodiv = document.getElementById('show_advanced');\n";
echo " aodiv.style.display = \"none\";\n";
echo "}\n";
echo "\n";
echo "function copy_extension() {\n";
echo " var new_ext = prompt('".$text['message-extension']."');\n";
echo " if (new_ext != null) {\n";
echo " if (!isNaN(new_ext)) {\n";
echo " document.location.href='extension_copy.php?id=".$extension_uuid."&ext=' + new_ext;\n";
echo " }\n";
echo " else {\n";
echo " var new_number_alias = prompt('".$text['message-number_alias']."');\n";
echo " if (new_number_alias != null) {\n";
echo " if (!isNaN(new_number_alias)) {\n";
echo " document.location.href='extension_copy.php?id=".$extension_uuid."&ext=' + new_ext + '&alias=' + new_number_alias;\n";
echo " }\n";
echo " }\n";
echo " }\n";
echo " }\n";
echo "}\n";
echo "</script>";
echo "<div align='center'>";
@@ -796,7 +813,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "<td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='extensions.php'\" value='".$text['button-back']."'>\n";
if ($action != "add") {
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"var new_ext = prompt('".$text['message_extension']."'); if (new_ext != null) { window.location='extension_copy.php?id=".$extension_uuid."&ext=' + new_ext; }\" value='".$text['button-copy']."'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"copy_extension();\" value='".$text['button-copy']."'>\n";
}
echo " <input type='submit' class='btn' name='submit' value='".$text['button-save']."'>\n";
echo " <br /><br />\n";