Browse Source
Make everything more user-friendly and streamlined. Port and and # of connections are now placed under 'Show more'. Clicking SSL will change the port to 563. Username and option for SSL removed from the wizard, they can be enabled in the Config.pull/365/head
committed by
shypike
11 changed files with 459 additions and 530 deletions
@ -1,62 +1,38 @@ |
|||||
function toggleWebPass() |
function checkRequired() { |
||||
{ |
if ($("#bandwidth").val()) { |
||||
var web |
$("#next-button").removeClass('disabled') |
||||
web = $('#enable_webpass').attr('checked') |
return true; |
||||
if ($('#enable_webpass').attr('checked') == 1) |
|
||||
{ |
|
||||
$('#web_user').attr("disabled",""); |
|
||||
$('#web_pass').attr("disabled",""); |
|
||||
|
|
||||
} else { |
} else { |
||||
$('#web_user').attr("disabled","disabled"); |
$("#next-button").addClass('disabled') |
||||
$('#web_pass').attr("value",""); |
return false; |
||||
$('#web_pass').attr("disabled","disabled"); |
|
||||
$('#web_user').attr("value",""); |
|
||||
} |
} |
||||
}; |
|
||||
|
|
||||
|
|
||||
function checkRequired() |
|
||||
{ |
|
||||
if ($("#bandwidth").val()) |
|
||||
{ |
|
||||
$("#next-button").removeAttr("disabled"); |
|
||||
} else { |
|
||||
$("#next-button").attr("disabled","disabled"); |
|
||||
} |
} |
||||
}; |
|
||||
|
|
||||
|
|
||||
$(document).ready(function() { |
$(document).ready(function() { |
||||
checkRequired(); |
// Add tooltips
|
||||
toggleWebPass(); |
$('[data-toggle="tooltip"]').tooltip() |
||||
|
|
||||
$(".validate-text-required").blur(function(){ |
// Check
|
||||
if (this.value || this.checked){ |
|
||||
$(this).removeClass("incorrect"); |
|
||||
$(this).addClass("correct"); |
|
||||
} else { |
|
||||
$(this).removeClass("correct"); |
|
||||
$(this).addClass("incorrect"); |
|
||||
} |
|
||||
}); |
|
||||
$("#bandwidth").bind('keyup blur', function() { |
$("#bandwidth").bind('keyup blur', function() { |
||||
if (this.value) { |
if (this.value) { |
||||
$(this).removeClass("incorrect"); |
$(this).removeClass("incorrect"); |
||||
$(this).addClass("correct"); |
$(this).addClass("correct"); |
||||
$("#bandwidth-tip").removeClass("hidden"); |
|
||||
$("#bandwidth-error").addClass("hidden"); |
$("#bandwidth-error").addClass("hidden"); |
||||
checkRequired(); |
|
||||
} else { |
} else { |
||||
$(this).removeClass("correct"); |
$(this).removeClass("correct"); |
||||
$(this).addClass("incorrect"); |
$(this).addClass("incorrect"); |
||||
$("#bandwidth-tip").addClass("hidden"); |
|
||||
$("#bandwidth-error").removeClass("hidden"); |
$("#bandwidth-error").removeClass("hidden"); |
||||
checkRequired(); |
|
||||
} |
} |
||||
|
checkRequired() |
||||
}); |
}); |
||||
|
|
||||
$('#enable_webpass').bind('change click focus', function() { |
checkRequired() |
||||
toggleWebPass(); |
|
||||
}); |
$('form').submit(function(event) { |
||||
|
// Double check
|
||||
|
if(!checkRequired()) { |
||||
|
event.preventDefault(); |
||||
|
} |
||||
|
}) |
||||
}); |
}); |
||||
|
|
||||
|
Loading…
Reference in new issue