Default Settings: Added 'Reload' button to update Default/Domain/User settings on demand.

This commit is contained in:
Nate Jones 2015-04-17 20:26:14 +00:00
parent e52ee06142
commit ef43a6a87a
3 changed files with 68 additions and 3 deletions

View File

@ -56,6 +56,14 @@ $text['message-update']['nl-nl'] = "";
$text['message-update']['pt-br'] = "Atualização Efetuada";
$text['message-update']['pl'] = "Zaktualizowano poprawnie";
$text['message-settings_reloaded']['en-us'] = "Settings Reloaded";
$text['message-settings_reloaded']['es-cl'] = "Ajustes Reloaded";
$text['message-settings_reloaded']['pt-pt'] = "Configurações Reloaded";
$text['message-settings_reloaded']['fr-fr'] = "Paramètres Reloaded";
$text['message-settings_reloaded']['nl-nl'] = "";
$text['message-settings_reloaded']['pt-br'] = "Configurações Reloaded";
$text['message-settings_reloaded']['pl'] = "Ustawienia Reloaded";
$text['message-required']['en-us'] = "Please provide: ";
$text['message-required']['es-cl'] = "Por favor indique: ";
$text['message-required']['pt-pt'] = "Por favor indique: ";
@ -352,6 +360,14 @@ $text['button-save']['nl-nl'] = "";
$text['button-save']['pt-br'] = "Salvar";
$text['button-save']['pl'] = "Zachowaj";
$text['button-reload']['en-us'] = "Reload";
$text['button-reload']['es-cl'] = "Recargar";
$text['button-reload']['pt-pt'] = "Recarregar";
$text['button-reload']['fr-fr'] = "Recharger";
$text['button-reload']['nl-nl'] = "";
$text['button-reload']['pt-br'] = "Recarregar";
$text['button-reload']['pl'] = "Przeładować";
$text['button-paste']['en-us'] = "Paste";
$text['button-paste']['es-cl'] = "Propagar";
$text['button-paste']['pt-pt'] = "Propagar";

View File

@ -268,9 +268,7 @@ else {
echo " </select>\n";
echo " <input type='button' class='btn' id='button_paste' style='display: none;' alt='".$text['button-paste']."' value='".$text['button-paste']."' onclick='document.forms.frm.submit();'>";
}
else {
echo " &nbsp;";
}
echo " <input type='button' class='btn' id='button_reload' alt='".$text['button-reload']."' value='".$text['button-reload']."' onclick=\"document.location.href='default_settings_reload.php?search='+$('#default_setting_search').val();\">";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";

View File

@ -0,0 +1,51 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2014
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('default_setting_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
$search = check_str($_REQUEST['search']);
require "resources/classes/domains.php";
$domain = new domains();
$domain->db = $db;
$domain->set();
$_SESSION["message"] = $text['message-settings_reloaded'];
header("Location: default_settings.php".(($search != '') ? "?search=".$search : null));
?>