Team 4 Form changes MONTAIR LC Kid Dr Conversion
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
This commit is contained in:
parent
1481c718ef
commit
9813100164
|
|
@ -93,7 +93,13 @@
|
|||
@case('email')
|
||||
@case('tel')
|
||||
@case('date')
|
||||
<input type="{{$question->type}}" id="field-{{$question->code}}" name="{{$question->code}}" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}">
|
||||
<input type="{{$question->type}}"
|
||||
id="field-{{$question->code}}"
|
||||
name="{{$question->code}}"
|
||||
class="form-control"
|
||||
{{$question->required == 'yes'?'required':'' }}
|
||||
value="{{isset($question->value)?$question->value:''}}"
|
||||
{{$question->code == 'legacy_code' ? 'readonly' : ''}}>
|
||||
@break
|
||||
@case('number')
|
||||
<input
|
||||
|
|
@ -361,7 +367,7 @@ function preventDuplicateDoctors() {
|
|||
$("<option></option>")
|
||||
.attr("value", itm.value)
|
||||
.text(itm.display)
|
||||
.attr("legacy_code", itm.contact.legacy_code)
|
||||
.attr("msl_code", itm.contact.legacy_code)
|
||||
.attr("speciality", itm.contact.speciality)
|
||||
);
|
||||
}
|
||||
|
|
@ -376,43 +382,47 @@ function preventDuplicateDoctors() {
|
|||
|
||||
$('#report-form').on('submit', function(event){
|
||||
event.preventDefault();
|
||||
|
||||
$("#pageloader").fadeIn();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/form/ajaxsubmit',
|
||||
data: new FormData($('#report-form')[0]),
|
||||
processData: false,
|
||||
contentType: false,
|
||||
|
||||
success: function(data) {
|
||||
|
||||
console.log("FULL DOCTOR DATA:", data);
|
||||
|
||||
/*for (let itm of data) {
|
||||
console.log("DOCTOR:", itm);
|
||||
console.log("LEGACY CODE:", itm.legacy_code);
|
||||
console.log("CONTACT:", itm.contact);
|
||||
console.log("CONTACT LEGACY CODE:", itm.contact ? itm.contact.legacy_code : 'NO CONTACT');
|
||||
}*/
|
||||
|
||||
$("#pageloader").fadeOut();
|
||||
|
||||
$('#field-contact_id').html('');
|
||||
$('#field-contact_id').append(
|
||||
$("<option></option>")
|
||||
.attr("value", '')
|
||||
.text('-- Select --')
|
||||
);
|
||||
if(data.status == 'success') {
|
||||
|
||||
Swal.fire({
|
||||
title: 'Great!',
|
||||
text: 'Your data is successfully submitted!',
|
||||
icon: 'success'
|
||||
});
|
||||
|
||||
$('#report-form').trigger("reset");
|
||||
|
||||
} else {
|
||||
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: data.hasOwnProperty('message')
|
||||
? 'You are not mapped to any position code'
|
||||
: 'Data not submitted',
|
||||
|
||||
text: data.hasOwnProperty('message')
|
||||
? 'for resolution please email Position code, L1 Manager and L2 Manager details to support1@stratawiz.com'
|
||||
: 'Something went wrong, please try again after some time!'
|
||||
});
|
||||
|
||||
for(let itm of data) {
|
||||
$('#field-contact_id').append(
|
||||
$("<option></option>")
|
||||
.attr("value", itm.value)
|
||||
.text(itm.display)
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#field-contact_id').change(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue