diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php
index 085b8c5d40..859826f7af 100644
--- a/app/devices/device_edit.php
+++ b/app/devices/device_edit.php
@@ -601,6 +601,96 @@
echo "";
}
+//add the QR code
+ if (permission_exists("device_line_password") && $device_template == "grandstream/wave") {
+ //set the mode
+ if (isset($_SESSION['theme']['qr_image'])) {
+ if (strlen($_SESSION['theme']['qr_image']) > 0) {
+ $mode = '4';
+ }
+ else {
+ $mode = '0';
+ }
+ }
+ else {
+ $mode = '4';
+ }
+
+ //build the xml
+ $row = $device_lines[0];
+ $xml = "";
+ $xml .= "";
+ $xml .= "";
+ $xml .= "".$row['server_address']."";
+ $xml .= "".$row['outbound_proxy_primary']."";
+ $xml .= "".$row['outbound_proxy_secondary']."";
+ $xml .= "".$row['user_id']."";
+ $xml .= "".$row['auth_id']."";
+ $xml .= "".$row['password']."";
+ $xml .= "".$row['user_id']."";
+ $xml .= "".$row['display_name']."";
+ $xml .= "{x+|*x+|*++}";
+ $xml .= "0";
+ $xml .= "*97";
+ $xml .= "";
+ $xml .= "";
+
+ //qr code generation
+ $_GET['type'] = "text";
+ $qr_vcard = true;
+ include "contacts_vcard.php";
+ echo "";
+ echo "";
+ echo "";
+ echo "";
+ if (isset($_SESSION['theme']['qr_image'])) {
+ echo "
";
+ }
+ else {
+ echo "
";
+ }
+ }
+
//show the content
echo "