sag
This commit is contained in:
@@ -175,7 +175,7 @@
|
||||
<div class="modal-footer">
|
||||
<input type="text" hidden name="idtype" value="nokp">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Terima">
|
||||
<input type="submit" name="submit" class="btn btn-primary" id="terima_ic" value="Terima">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -296,7 +296,7 @@
|
||||
<div class="modal-footer">
|
||||
<input type="text" hidden name="idtype" value="passport">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Batal</button>
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Terima">
|
||||
<input type="submit" name="submit" class="btn btn-primary" id="terima_passport" value="Terima">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -436,6 +436,7 @@
|
||||
});
|
||||
|
||||
function verifycustomer(){
|
||||
$("#terima_ic").prop('disabled', true);
|
||||
var customername = $('#name').val();
|
||||
var customeralamat = $('#alamat').val();
|
||||
var customerposkod = $('#poskod').val();
|
||||
@@ -443,6 +444,7 @@
|
||||
var customerphone_alternate = $('#alternate_phone').val();
|
||||
var age = $('#age').val();
|
||||
if(age < 18){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -452,6 +454,7 @@
|
||||
return false;
|
||||
}
|
||||
if(customername == ''){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -461,6 +464,7 @@
|
||||
return false;
|
||||
}
|
||||
if(customeralamat == ''){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -470,6 +474,7 @@
|
||||
return false;
|
||||
}
|
||||
if(customerposkod == ''){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -479,6 +484,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if(customerposkod.length != 5){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -488,6 +494,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if($.isNumeric(customerposkod) == false){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -499,6 +506,7 @@
|
||||
}
|
||||
}
|
||||
if(customerphone == ''){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -508,6 +516,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if((customerphone.length < 9 || customerphone.length >= 12)){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -517,6 +526,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if($.isNumeric(customerphone) == false){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -529,6 +539,7 @@
|
||||
}
|
||||
if(customerphone_alternate != ''){
|
||||
if(customerphone_alternate.length < 8 && customerphone_alternate.length > 12){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -538,6 +549,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if($.isNumeric(customerphone_alternate) == false){
|
||||
$("#terima_ic").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -552,6 +564,7 @@
|
||||
}
|
||||
|
||||
function verifycustomerpassport(){
|
||||
$("#terima_passport").prop('disabled', true);
|
||||
var customername = $('#passport_name').val();
|
||||
var customeralamat = $('#passport_alamat').val();
|
||||
var customerposkod = $('#passport_poskod').val();
|
||||
@@ -561,6 +574,7 @@
|
||||
var age = $('#passport_age').val();
|
||||
|
||||
if(age < 18){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -570,6 +584,7 @@
|
||||
return false;
|
||||
}
|
||||
if(customername == ''){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -579,6 +594,7 @@
|
||||
return false;
|
||||
}
|
||||
if(tarikh_lahir == ''){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -588,6 +604,7 @@
|
||||
return false;
|
||||
}
|
||||
if(customeralamat == ''){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -597,6 +614,7 @@
|
||||
return false;
|
||||
}
|
||||
if(customerposkod == ''){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -606,6 +624,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if(customerposkod.length != 5){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -615,6 +634,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if($.isNumeric(customerposkod) == false){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -626,6 +646,7 @@
|
||||
}
|
||||
}
|
||||
if(customerphone == ''){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -635,6 +656,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if(customerphone.length <= 9 || customerphone.length >= 12){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -644,6 +666,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if($.isNumeric(customerphone) == false){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -656,6 +679,7 @@
|
||||
}
|
||||
if(customerphone_alternate != ''){
|
||||
if(customerphone_alternate.length <= 8 && customerphone_alternate.length >= 12){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
@@ -665,6 +689,7 @@
|
||||
return false;
|
||||
}else{
|
||||
if($.isNumeric(customerphone_alternate) == false){
|
||||
$("#terima_passport").prop('disabled', false);
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
|
||||
Reference in New Issue
Block a user