Zenova (Sitazit & Glipiq - Toggle code remove)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m42s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m42s
Details
This commit is contained in:
parent
6181b6c83e
commit
757d0f1721
|
|
@ -367,19 +367,7 @@
|
|||
}
|
||||
}) */
|
||||
|
||||
$('#field-absi_camp').on('change', function(){
|
||||
|
||||
/* let value = $(this).val();
|
||||
|
||||
if(value == 'Yes'){
|
||||
$('#report-form input[name="absi_camp_count"]').val(1);
|
||||
} else {
|
||||
$('#report-form input[name="absi_camp_count"]').val(0);
|
||||
} */
|
||||
|
||||
toggleAbsiPatientsField();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
/* $('#field-h1_cardio_conference').on('change',function(){
|
||||
|
|
@ -411,40 +399,7 @@
|
|||
$(selector).prop('required', show);
|
||||
}
|
||||
|
||||
function toggleAbsiPatientsField() {
|
||||
|
||||
let absiCamp = $('#field-absi_camp').val();
|
||||
const brand = $('#field-select_brand').val();
|
||||
|
||||
// Convert stored 1/0 values to Yes/No
|
||||
if (absiCamp == 1 || absiCamp === '1') {
|
||||
absiCamp = 'Yes';
|
||||
$('#field-absi_camp').val('Yes');
|
||||
}
|
||||
else if (absiCamp == 0 || absiCamp === '0') {
|
||||
absiCamp = 'No';
|
||||
$('#field-absi_camp').val('No');
|
||||
}
|
||||
|
||||
const $patientsField = $('#field-no_of_patients_screened');
|
||||
const $patientsWrapper = $patientsField.closest('.col-md-12');
|
||||
|
||||
console.log("Brand:", brand);
|
||||
console.log("ABSI:", absiCamp);
|
||||
|
||||
if (brand === 'Glipiq' && absiCamp === 'Yes') {
|
||||
|
||||
$patientsWrapper.show();
|
||||
$patientsField.prop('required', true);
|
||||
|
||||
} else {
|
||||
|
||||
$patientsField.val('');
|
||||
$patientsWrapper.hide();
|
||||
$patientsField.prop('required', false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Initial hide
|
||||
toggleFields(glipiFields, false);
|
||||
|
|
@ -459,7 +414,7 @@
|
|||
console.log("Brand is :",brand);
|
||||
toggleFields(glipiFields, brand === 'Glipiq');
|
||||
toggleFields(sitazitFields, brand === 'Sitazit');
|
||||
toggleAbsiPatientsField();
|
||||
|
||||
|
||||
if(brand==='Glipiq'){
|
||||
/* $('#report-form').append('<input type="hidden" name="glipiq_rx_total" value="0" >');
|
||||
|
|
@ -510,7 +465,7 @@
|
|||
|
||||
$('#field-absi_camp').val("");
|
||||
$('#field-h1_cardio_conference').val("");
|
||||
toggleAbsiPatientsField();
|
||||
|
||||
$('#report-form input[name="glipiq_new_conversion"]').val(0);
|
||||
$('#report-form input[name="glipiq_existing_conversion"]').val(0);
|
||||
$('#report-form input[name="glipiq_rx_total"]').val(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue