mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-04 10:43:49 +00:00
Update device_edit.php
This commit is contained in:
@@ -473,6 +473,18 @@
|
||||
$device_vendor = device::get_vendor($device_mac_address);
|
||||
}
|
||||
|
||||
|
||||
//get the device line info for provision button
|
||||
foreach($device_lines as $row) {
|
||||
if (strlen($row['user_id']) > 0) {
|
||||
$user_id = $row['user_id'];
|
||||
}
|
||||
if (strlen($row['server_address']) > 0) {
|
||||
$server_address = $row['server_address'];
|
||||
}
|
||||
}
|
||||
$sip_profile_name = 'internal';
|
||||
|
||||
//show the header
|
||||
require_once "resources/header.php";
|
||||
|
||||
@@ -584,6 +596,7 @@
|
||||
echo "</td>\n";
|
||||
echo "<td align='right' valign='top'>\n";
|
||||
echo " <input type='button' class='btn' id='button_back_location' name='' alt='".$text['button-back']."' onclick=\"window.location='devices.php'\" value='".$text['button-back']."'/>\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-apply']."' onclick=\"document.location.href='".PROJECT_PATH."/app/devices/cmd.php?cmd=check_sync&profile=".$sip_profile_name."&user=".$user_id."@".$server_address."&domain=".$server_address."&agent=".$device_vendor."';\"> \n";
|
||||
if (permission_exists("device_files")) {
|
||||
//get the template directory
|
||||
$prov = new provision;
|
||||
@@ -607,7 +620,6 @@
|
||||
echo " </select>\n";
|
||||
//echo " <input type='button' class='btn' id='button_download' style='display: none;' alt='".$text['button-download']."' value='".$text['button-download']."' onclick='document.forms.frm.submit();'>";
|
||||
}
|
||||
// echo " <input type='button' class='btn' alt='".$text['button-provision']."' value='".$text['button-provision']."' onclick=\"document.location.href='".PROJECT_PATH."/app/devices/cmd.php?cmd=check_sync&profile=".$sip_profile_name."&show=".$show."&user=".$row['user']."&domain=".$row['sip-auth-realm']."&agent=".urlencode($row['agent'])."';\" ".$onhover_pause_refresh.">\n";
|
||||
|
||||
if (permission_exists('device_add') && $action != "add") {
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"var new_mac = prompt('".$text['message_device']."'); if (new_mac != null) { window.location='device_copy.php?id=".$device_uuid."&mac=' + new_mac; }\" value='".$text['button-copy']."'/>\n";
|
||||
@@ -1414,7 +1426,7 @@
|
||||
echo " }); \n";
|
||||
// convert password fields to
|
||||
echo " function submit_form() {\n";
|
||||
echo " //run this when the form is submitted\n";
|
||||
echo " $('form#frm').submit();\n";
|
||||
echo " }\n";
|
||||
echo " function submit_form_2() {\n";
|
||||
echo " $('input:password').css('visibility','hidden');\n";
|
||||
|
||||
Reference in New Issue
Block a user