Commits

Jarrod Funnell committed 4af2e45

Javascript bool != Perl 'bool'

Comments (0)

Files changed (1)

webmin/public/js/functions.js

 	var device = $(this).attr("id");
 
 	var data = {};
-	data.enabled  = !$('#' + device + "-enabled-button").hasClass('disabled');
-	data.module   =  $('#' + device + "-module-input").val();
-	data.interface=  $('#' + device + "-interface-input").val();
-	data.filename =  $('#' + device + "-filename-hidden").val();
+	data.enabled  = $('#' + device + "-enabled-button").hasClass('disabled') ? 0 : 1;
+	data.module   = $('#' + device + "-module-input").val();
+	data.interface= $('#' + device + "-interface-input").val();
+	data.filename = $('#' + device + "-filename-hidden").val();
 
 	var request = $.ajax({
 		url: '/ajax/save_config/',
 	request.always(function(){
 		
 	});
-});
+});