mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
SIP Profiles - Edit: Button updates.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2020
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -265,30 +265,32 @@
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='frm' id='frm' method='post' action=''>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<form name='frm' id='frm' method='post'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-sip_profile']."</b><br><br></td>\n";
|
||||
echo "<td width='70%' align='right' valign='top'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='sip_profiles.php'\" value='".$text['button-back']."'>";
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title-sip_profile']."</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px;','link'=>'sip_profiles.php']);
|
||||
if ($action == 'update' && (
|
||||
permission_exists('dialplan_add')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('time_condition_add')
|
||||
)) {
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"var name = prompt('".$text['label-new_sip_profile_name']."'); if (name != null) { window.location='sip_profile_copy.php?id=".urlencode($sip_profile_uuid)."&name=' + name; }\" value='".$text['button-copy']."'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'style'=>'margin-right: 15px;','onclick'=>"var name = prompt('".$text['label-new_sip_profile_name']."'); if (name != null) { window.location='sip_profile_copy.php?id=".urlencode($sip_profile_uuid)."&name=' + name; }"]);
|
||||
}
|
||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save']]);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-sip_profile_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='sip_profile_name' maxlength='255' value=\"".escape($sip_profile_name)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-sip_profile_name']."\n";
|
||||
@@ -493,21 +495,17 @@
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan='2' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='sip_profile_uuid' value='".escape($sip_profile_uuid)."'>\n";
|
||||
}
|
||||
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo " <br>\n";
|
||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
echo "<br /><br />";
|
||||
|
||||
if ($action == "update") {
|
||||
echo "<input type='hidden' name='sip_profile_uuid' value='".escape($sip_profile_uuid)."'>\n";
|
||||
}
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user