mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merge First Edition of RaspAP/raspap-insiders
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
function msgShow(retcode,msg) {
|
||||
if(retcode == 0) {
|
||||
var alertType = 'success';
|
||||
if(retcode == 0) { var alertType = 'success';
|
||||
} else if(retcode == 2 || retcode == 1) {
|
||||
var alertType = 'danger';
|
||||
}
|
||||
@@ -138,8 +137,7 @@ function setupBtns() {
|
||||
$('#btnSummaryRefresh').click(function(){getAllInterfaces();});
|
||||
$('.intsave').click(function(){
|
||||
var int = $(this).data('int');
|
||||
var opts = $(this).data('opts');
|
||||
saveNetDeviceSettings(int,opts);
|
||||
saveNetworkSettings(int);
|
||||
});
|
||||
$('.intapply').click(function(){
|
||||
applyNetworkSettings();
|
||||
@@ -182,24 +180,6 @@ function loadWifiStations(refresh) {
|
||||
}
|
||||
$(".js-reload-wifi-stations").on("click", loadWifiStations(true));
|
||||
|
||||
function saveNetDeviceSettings(int,opts="") {
|
||||
var frmInt = $('#frm-'+int).find(':input');
|
||||
var arrFormData = {};
|
||||
$.each(frmInt,function(i3,v3){
|
||||
if($(v3).attr('type') == 'radio') {
|
||||
arrFormData[$(v3).attr('id')] = $(v3).prop('checked');
|
||||
} else {
|
||||
arrFormData[$(v3).attr('id')] = $(v3).val();
|
||||
}
|
||||
});
|
||||
arrFormData['interface'] = int;
|
||||
arrFormData['opts'] = opts;
|
||||
$.post('ajax/networking/save_net_dev_config.php',arrFormData,function(data){
|
||||
var jsonData = JSON.parse(data);
|
||||
$('#msgNetworking').html(msgShow(jsonData['return'],jsonData['output']));
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
Populates the DHCP server form fields
|
||||
Option toggles are set dynamically depending on the loaded configuration
|
||||
|
Reference in New Issue
Block a user