Fax Edit - User group can only change Email address.
This commit is contained in:
parent
a8702c546a
commit
7e7079f54a
|
|
@ -394,7 +394,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
}
|
||||
if ($dialplan_type == "update") {
|
||||
//udpate the fax dialplan entry
|
||||
//update the fax dialplan entry
|
||||
$sql = "update v_dialplans set ";
|
||||
$sql .= "dialplan_name = '$fax_name', ";
|
||||
if (strlen($dialplan_order) > 0) {
|
||||
|
|
@ -524,22 +524,38 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "<div align='center'>";
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <tr>\n";
|
||||
if ($action == "add") {
|
||||
echo "<td align='left' width='30%' nowrap><b>".$text['confirm-fax-add']."</b></td>\n";
|
||||
echo " <td align='left' width='30%' nowrap><b>".$text['confirm-fax-add']."</b></td>\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo "<td align='left' width='30%' nowrap><b>".$text['confirm-fax-edit']."</b></td>\n";
|
||||
echo " <td align='left' width='30%' nowrap><b>".$text['confirm-fax-edit']."</b></td>\n";
|
||||
}
|
||||
echo "<td width='70%' align='right'>\n";
|
||||
echo " <td width='70%' align='right'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
|
||||
if ($action == "update") {
|
||||
echo "<input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('".$text['confirm-copy-info']."')){window.location='fax_copy.php?id=".$fax_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
if ((if_group("admin") || if_group("superadmin")) && $action == "update") {
|
||||
echo " <input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('".$text['confirm-copy-info']."')){window.location='fax_copy.php?id=".$fax_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
}
|
||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
if (if_group("user")) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-email'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_email' maxlength='255' value=\"$fax_email\">\n";
|
||||
echo "<br />\n";
|
||||
echo " ".$text['description-email']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
}
|
||||
else { //admin,superadmin,etc
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
|
|
@ -696,9 +712,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "".$text['description-info']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
}
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
if (if_group("user")) {
|
||||
echo " <input type='hidden' name='fax_name' value=\"$fax_name\">\n";
|
||||
echo " <input type='hidden' name='fax_extension' value=\"$fax_extension\">\n";
|
||||
echo " <input type='hidden' name='fax_destination_number' value=\"$fax_destination_number\">\n";
|
||||
echo " <input type='hidden' name='fax_pin_number' value=\"$fax_pin_number\">\n";
|
||||
echo " <input type='hidden' name='fax_caller_id_name' value=\"$fax_caller_id_name\">\n";
|
||||
echo " <input type='hidden' name='fax_caller_id_number' value=\"$fax_caller_id_number\">\n";
|
||||
echo " <input type='hidden' name='fax_forward_number' value=\"".((is_numeric($fax_forward_number)) ? format_phone($fax_forward_number) : $fax_forward_number)."\">\n";
|
||||
echo " <input type='hidden' name='fax_description' value=\"$fax_description\">\n";
|
||||
}
|
||||
echo " <input type='hidden' name='fax_uuid' value='$fax_uuid'>\n";
|
||||
echo " <input type='hidden' name='dialplan_uuid' value='$dialplan_uuid'>\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue