Commit old changes
This commit is contained in:
@@ -114,12 +114,12 @@ function isAddressValid(id) {
|
||||
return false;
|
||||
}
|
||||
const segments = $(id).val().split(".");
|
||||
if (parseInt(segments[0]) > 17) {
|
||||
$(id + "Error").html("Błąd pierwszego segmentu [zakres 01-20]");
|
||||
if (parseInt(segments[0]) > 99) {
|
||||
$(id + "Error").html("Błąd pierwszego segmentu [zakres 01-99]");
|
||||
return false;
|
||||
}
|
||||
if (parseInt(segments[1]) > 15) {
|
||||
$(id + "Error").html("Błąd drugiego segmentu [zakres 01-15]");
|
||||
if (parseInt(segments[1]) > 99) {
|
||||
$(id + "Error").html("Błąd drugiego segmentu [zakres 01-99]");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -138,24 +138,24 @@ $(document).ready(function () {
|
||||
$("#address").mask("AB.CD.E.F", {
|
||||
placeholder: "__.__._._",
|
||||
translation: {
|
||||
A: { pattern: /[0-2]/ },
|
||||
A: { pattern: /[0-9]/ },
|
||||
B: { pattern: /[0-9]/ },
|
||||
C: { pattern: /[0-1]/ },
|
||||
C: { pattern: /[0-9]/ },
|
||||
D: { pattern: /[0-9]/ },
|
||||
E: { pattern: /[1-5]/ },
|
||||
F: { pattern: /[0-5]/ },
|
||||
E: { pattern: /[1-9]/ },
|
||||
F: { pattern: /[0-9]/ },
|
||||
}
|
||||
});
|
||||
if ($("#newAddress")) {
|
||||
$("#newAddress").mask("AB.CD.E.F", {
|
||||
placeholder: "__.__._._",
|
||||
translation: {
|
||||
A: { pattern: /[0-2]/ },
|
||||
A: { pattern: /[0-9]/ },
|
||||
B: { pattern: /[0-9]/ },
|
||||
C: { pattern: /[0-1]/ },
|
||||
C: { pattern: /[0-9]/ },
|
||||
D: { pattern: /[0-9]/ },
|
||||
E: { pattern: /[1-5]/ },
|
||||
F: { pattern: /[0-5]/ },
|
||||
E: { pattern: /[1-9]/ },
|
||||
F: { pattern: /[0-9]/ },
|
||||
}
|
||||
});
|
||||
$("#newAddress").focus(() => $("#newAddressError").html(""));
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$pRes = $db->query("SELECT DISTINCT id, code FROM ecmproducts WHERE deleted=0 AND active=1");
|
||||
$pRes = $db->query("SELECT DISTINCT id, code FROM ecmproducts WHERE deleted=0 AND status != 'end_of_life';");
|
||||
$codes = array();
|
||||
while ($p = $db -> fetchByAssoc($pRes)) {
|
||||
$index = str_replace("'", "'", $p['code']);
|
||||
|
||||
Reference in New Issue
Block a user