mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-21 02:16:29 +00:00
Add a name when copying a sip profile
This commit is contained in:
@@ -47,17 +47,17 @@ else {
|
||||
//set the http get/post variable(s) to a php variable
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$sip_profile_uuid = check_str($_REQUEST["id"]);
|
||||
$sip_profile_name = check_str($_REQUEST["name"]);
|
||||
}
|
||||
|
||||
//get the sip profile data
|
||||
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
|
||||
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||
$sql = "select * from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_uuid = '$sip_profile_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
foreach ($result as &$row) {
|
||||
$sip_profile_name = $row["sip_profile_name"];
|
||||
$sip_profile_description = $row["sip_profile_description"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
@@ -74,7 +74,7 @@ else {
|
||||
$sql .= "values ";
|
||||
$sql .= "(";
|
||||
$sql .= "'".$sip_profile_uuid_new."', ";
|
||||
$sql .= "'".$sip_profile_name."-copy', ";
|
||||
$sql .= "'".$sip_profile_name."', ";
|
||||
$sql .= "'".$sip_profile_description."' ";
|
||||
$sql .= ")";
|
||||
$db->exec(check_sql($sql));
|
||||
|
||||
@@ -172,7 +172,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['header-sip_profile']."</b></td>\n";
|
||||
echo "<td width='70%' align='right'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='sip_profiles.php'\" value='".$text['button-back']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='sip_profile_copy.php?id=".$sip_profile_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
//echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='sip_profile_copy.php?id=".$sip_profile_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"var name = prompt('".$text['message_device']."'); if (name != null) { window.location='sip_profile_copy.php?id=".$sip_profile_uuid."&name=' + name; }\" value='".$text['button-copy']."'>\n";
|
||||
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user