Skip to content

Commit

Permalink
Update index_m.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson committed Feb 19, 2024
1 parent 8d36262 commit c243357
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@

}

function isNumber(str) {
if (typeof str != "string") return false // we only process strings!
return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
!isNaN(parseFloat(str)) // ...and ensure strings of whitespace fail
}

function checksetup(){
var errorFound = false
if ($('#country').children("option:selected").val() == ""){
Expand All @@ -364,10 +370,20 @@
showToast(_('Please enter a value in "Lattitude'));
errorFound = true
}
if (!isNumber($("#lat").val())) {
showToast(_('Please enter a numeric in "Lattitude'));
errorFound = true
}

if ($("#long").val() == ""){
showToast(_('Please enter a value in "Longitude"'));
errorFound = true
}
if (!isNumber($("#long").val())) {
showToast(_('Please enter a numeric in "Longitude'));
errorFound = true
}

if ($("#geocode").val() == ""){
showToast(_('Please run "Load Geocode"'));
errorFound = true
Expand Down

0 comments on commit c243357

Please sign in to comment.