EVOLUTION-NINJA
Edit File: show_addlogbook.php
<?php echo view('includes/flow-header'); ?> <?php $name = session()->get('name'); ?> <style> .marker::marker{ color: black !important; font-size: 14px !important; } </style> <section class="spec-main last_body"> <div class="row"> <div class="col-sm-3 anaslefbox"> <div class="spec-left specunderline mob_height"> <ul> <li><a href="">Reflective Anasthesia logbook</a></li> </ul> </div> </div> <div class="col-sm-9"> <div class="row"> <div class="col-sm-11"></div> <div class="col-6 col-sm-2 mb-5 Anasthesia-go-back go-back-new2 " id="go-back-new1"> <a href="<?php echo base_url('add-new-case'); ?>"> <!-- <i class="fa fa-arrow-left" aria-hidden="true"></i> --> Enter new case</a> </div> </div> <div class="row edis-existing-case"> <!-- <div class="col-sm-2 view-edt"> <span class="col-sm-2 col-6 mb-6 mobile-back " id="go-back-new1"> <a href="<?= site_url('logbook-edit-form') ?>?id=<?= $record['id']; ?>"> Edit</a> </span> </div> --> <div class="col-sm-4 view-edt"> <a href=" <?= site_url('logbook-edit-form') ?>?id=<?= $record['id']; ?>"><button class="mob-edit-ex1"> Edit</button></a> </div> <!-- <div class="col-sm-3 e-e-c"> <span class="col-sm-2 col-6 mb-6 mobile-back " id="go-back-new1"> <a href="<?= site_url('logbook-edit');?>"> Edit Existing Case</a> </span> </div> --> <div class="col-sm-3 e-e-c"> <a href="<?= site_url('logbook-edit');?>"><button class="mob-edit-ex"> Edit Existing Case</button></a> </div> <div class="col-sm-3 e-e-c eec12"> <button id="dcase"> Export to PDF</a> </button> </div> <div class="col-sm-1"></div> </div> <div id="downloadcase"> <!-- -----------------------system view----- --> <div class="row mt-2"> <div class="col-sm-12" id="tbsys"> <div class="table-responsive last_table"> <p class="ml-2 mt-1"><b>Dr <?php echo $name; ?> </b></p> <table class="table"> <thead> <tr class="tableheadclr"> <th class="small-column">Case No</th> <th class="small-column">Date</th> <th class="small-column">Time</th> <th class="large-column">Personal Reference</th> </tr> </thead> <tbody> <tr class="gamer_row"> <td> <?= $record['case_num'] ?> </td> <td> <?= $record['date_of_operate'] ?> </td> <td> <?= $record['time_of_operate'] ?> </td> <td> <div type="textarea" class="form-control" style="width: 256px; height: 48px;"> <?= $record['reference'] ?> </div> </td> </tr> </tbody> </table> </div><!--table-responsive--> </div><!--pat-table--> </div> <!-- --------------mobile view---------------- --> <div class="row"> <div class="col-sm-12" id="tbmobile"> <div class="table-responsive last_table"> <p class="ml-2 mt-1"><b>Dr <?php echo $name; ?> </b></p> <table class="table "> <thead> <tr class="tableheadclr"> <th class="small-column">Case No</th> <th class="small-column">Date</th> <th class="small-column1">Time</th> </tr> </thead> <tbody> <tr class="gamer_row_mob"> <td> <?= $record['case_num'] ?> </td> <td> <?= $record['date_of_operate'] ?> </td> <td> <?= $record['time_of_operate'] ?> </td> </tr> </tbody> </table> </div><!--table-responsive--> </div><!--pat-table--> <div class="row"> <div class="col-sm-12" id="tbmobile"> <div class="table-responsive last_table1"> <table class="table "> <thead> <tr class="tableheadclr"> <th class="large-column">Personal Reference</th> </tr> </thead> <tbody> <tr> <td> <div type="textarea" class="form-control" style="width: 256px; height: 48px;"> <?= $record['reference'] ?> </div> </td> </tr> </tbody> </table> </div><!--table-responsive--> </div><!--pat-table--> <!------------------ end----- mobile ------------ --> </div> <!-- ------pre-op---------- --> <div class="table-container last_tab_clr last_tab_width"> <h5 class="tab_cont_head">Pre-Op</h5> <table class="table "> <thead> <tr> </tr> </thead> <tbody> <tr> <td>Age (years)</td> <td> <?= $record['age'] ?> </td> </tr> <tr> <td>Gender</td> <td> <?= $record['gender'] ?> </td> </tr> <tr> <td>ASA</td> <td> <?= $record['asa'] ?> </td> </tr> <!-- co-morbid --> <tr> <td>Co-morbid Conditions</td> <td> <ul> <li> Cardiovascular : <?php echo $record['Cardiovascular'];?><br> <?php if($record['Cardiovascular']=='Yes') {?> <ol > <?php $Cardiovascular_check=explode(',' ,$record['Cardiovascular_check']); $otherscardio = false; foreach ($Cardiovascular_check as $value) { if (trim($value) == 'Other') { $otherscardio = true; break; } } foreach ($Cardiovascular_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($otherscardio ? 'other:'.$record['Cardiovascular_other']:'' );?> </ol> <?php } ?> </li> <li>Endocrine and Metabolic : <?php echo $record['Endocrine_and_Metabolic'];?> <?php if($record['Endocrine_and_Metabolic']=='Yes') {?> <ol > <?php $Endocrine_check=explode(',' ,$record['Endocrine_check']); $othersEndocrine = false; foreach ($Endocrine_check as $value) { if (trim($value) == 'Other') { $othersEndocrine = true; break; } } foreach ($Endocrine_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersEndocrine ? 'other:'.$record['Endocrine_other']:'' );?> </ol> <?php } ?> </li> <li>Respiratory : <?php echo $record['Respiratory'];?> <?php if($record['Respiratory']=='Yes') {?> <ol > <?php $Respiratory_check=explode(',' ,$record['Respiratory_check']); $othersRespiratory = false; foreach ($Respiratory_check as $value) { if (trim($value) == 'Other') { $othersRespiratory = true; break; } } foreach ($Respiratory_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersRespiratory ? 'other:'.$record['Respiratory_other']:'' );?> </ol> <?php } ?> </li> <li>Renal and Hepatic : <?php echo $record['Renal_and_Hepatic'];?> <?php if($record['Renal_and_Hepatic']=='Yes') {?> <ol > <?php $Renal_check=explode(',' ,$record['Renal_check']); $othersRenal = false; foreach ($Renal_check as $value) { if (trim($value) == 'Other') { $othersRenal = true; break; } } foreach ($Renal_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersRenal ? 'other:'.$record['Renal_other']:'' );?> </ol> <?php } ?> </li> <li>Neurological : <?php echo $record['Neurological'];?> <?php if($record['Neurological']=='Yes') {?> <ol > <?php $Neurological_check=explode(',' ,$record['Neurological_check']); $othersNeurological = false; foreach ($Neurological_check as $value) { if (trim($value) == 'Other') { $othersNeurological = true; break; } } foreach ($Neurological_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersNeurological ? 'other:'.$record['Neurological_other']:'' );?> </ol> <?php } ?> </li> <li>Hematologic : <?php echo $record['Hematologic'];?> <?php if($record['Hematologic']=='Yes') {?> <ol > <?php $Hematologic_check=explode(',' ,$record['Hematologic_check']); $othersHematologic = false; foreach ($Hematologic_check as $value) { if (trim($value) == 'Other') { $othersHematologic = true; break; } } foreach ($Hematologic_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersHematologic ? 'other:'.$record['Hematologic_other']:'' );?> </ol> <?php } ?> </li> <li>Mental Heath : <?php echo $record['Mental_Heath'];?> <?php if($record['Mental_Heath']=='Yes') {?> <ol > <?php $Mental_check=explode(',' ,$record['Mental_check']); $othersMental = false; foreach ($Mental_check as $value) { if (trim($value) == 'Other') { $othersMental = true; break; } } foreach ($Mental_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersMental ? 'other:'.$record['Mental_other']:'' );?> </ol> <?php } ?> </li> <li>Allergies : <?php echo $record['Allergies'];?> <?php if($record['Allergies']=='Yes') {?> <ol > <?php $Allergies_check=explode(',' ,$record['Allergies_check']); $othersAllergies = false; foreach ($Allergies_check as $value) { if (trim($value) == 'Other') { $othersAllergies = true; break; } } foreach ($Allergies_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersAllergies ? 'other:'.$record['Allergies_other']:'' );?> </ol> <?php } ?> </li> <li>Other Considerations : <?php echo $record['Other_Considerations'];?> <?php if($record['Other_Considerations']=='Yes') {?> <ol > <?php $Considerations_check=explode(',' ,$record['Considerations_check']); $othersOther = false; foreach ($Considerations_check as $value) { if (trim($value) == 'Other') { $othersOther = true; break; } } foreach ($Considerations_check as $value): ?> <?php if (!empty(trim($value))): ?> <li class='marker'><?= trim($value) ?></li> <?php endif; ?> <?php endforeach; ?> <?php echo ($othersOther ? 'other:'.$record['Considerations_other']:'' );?> </ol> <?php } ?> </li> </ul> </td> </tr> <!-- co-morbid --> <!-- <tr> <td>Height</td> <td><?= $record['height'] ?></td> </tr> --> <tr> <tr> <td>Height</td> <td> <?php $height = explode(',', $record['height']); $names_height = ["." ,"feet or ", "cms"]; ?> <?php foreach ($height as $index => $value): ?> <?php if (!empty(trim($value))): ?> <?= trim($value) ?> <?= isset($names_height[$index]) ? $names_height[$index] : '' ?> <?php endif; ?> <?php endforeach; ?> </tr> <tr> <td>Weight(Kg)</td> <td> <?= $record['weight'] ?> </td> </tr> <tr> <td>BMI</td> <td> <?= $record['BMI'] ?> </td> </tr> <tr> <td>Hospital</td> <td> <?= $record['hospital'] ?> </td> </tr> </tbody> </table> </div> <!-- ----------Surgical Details------ --> <div class="table-container last_tab_clr last_tab_width" style="margin-left: 20px;"> <h5 class="tab_cont_head">Surgical Details</h5> <table class="table "> <thead> <tr> </tr> </thead> <tbody> <!-- <tr> <td>Speciality</td> <td><?= $record['speciality'] ?></td> </tr> --> <tr> <td>Speciality</td> <td> <?php $speciality = explode(',', $record['speciality']); $othersPresent = false; // Check if "Others" exists in the array foreach ($speciality as $value) { if (trim($value) === 'others') { $othersPresent = true; break; } } ?> <ul> <?php foreach ($speciality as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php if ($othersPresent): ?> <ul> <li> speciality Other: <?= $record['other_speciality'] ?> </li> </ul> <?php endif; ?> </td> </tr> <tr> <td>Obstetrics Speciality</td> <td> <?= $record['obstetrics_specialty'] ?> </td> </tr> <tr> <td>Surgery Location</td> <td> <?= $record['surgery_location'] ?> </td> </tr> <tr> <td>Surgery Procedure</td> <td> <?= $record['surgery_procedure'] ?> </td> </tr> </tbody> </table> </div> <!-- ----------Anaesthesia Management Tool------ --> <div class="table-container last_tab_clr last_tab_width" style="margin-left: 20px;"> <h5 class="tab_cont_head">Anaesthesia Management Tool</h5> <table class="table "> <thead> <tr> </tr> </thead> <tbody> <tr> <td>Anaesthesia Management Tool Kit for the surgery</td> <td> <li>All of the below : <?php echo $record['toolkit_All'];?> </li> <li>Patient information like Gender and age : <?php echo $record['toolkit_gender_age'];?> </li> <li>BMI : <?php echo $record['toolkit_bmi'];?> </li> <li>Comorbidities : <?php echo $record['toolkit_Comorbidies'];?> </li> <li>ASA status : <?php echo $record['toolkit_asa_status'];?> </li> <li>Any other information on patient condition : <?php echo $record['toolkit_others'];?> </li> <li>Other : <?php echo $record['toolkit_others_input'];?> </li> </td> </tr> </tbody> </table> </div> <!-- ------Anaesthesia---------- --> <div class="table-container last_tab_clr last_tab_width" style="margin-left: 20px;"> <h5 class="tab_cont_head">Anaesthesia</h5> <table class="table "> <thead> <tr> </tr> </thead> <tbody> <tr> <td>Operation/Procedure Category</td> <td> <?= $record['category'] ?> </td> </tr> <tr> <td>Minimally Invasive</td> <td> <?= $record['Invasive'] ?> </td> </tr> <tr> <td>Am I supervising other Anaesthetist</td> <td> <?= $record['supervising'] ?> </td> </tr> <tr> <td>Experience Level</td> <td> <!-- <?= $record['done_by'] ?> --> <?php $el = explode(',', $record['done_by']); ?> <!-- Display the values as a list --> <?php foreach ($el as $value): ?> <?php if (!empty(trim($value))): ?> <?= trim($value) ?> <br /> <?php endif; ?> <?php endforeach; ?> </td> </tr> <tr> <td>Supervision</td> <td> <?= $record['supervision'] ?> </td> </tr> <tr> <td>Anaesthesia</td> <td> <?php $anaesthesiaValues = explode(',', $record['anaesthesia']); $otheranaesthesia=false; foreach ($anaesthesiaValues as $value) { if (trim($value) === 'Other') { $otheranaesthesia = true; break; } } ?> <ul> <?php foreach ($anaesthesiaValues as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php if ($otheranaesthesia): ?> <ul> <li> <p>Anaesthesia other: <?= $record['others_specialprocedure'] ?> </p> </li> </ul> <?php endif; ?> </tr> <tr> <td>Special Procedures</td> <td> <?php $specialProcedureValues = explode(',', $record['special_procedures']); ?> <!-- Display the values as a list --> <ul> <?php foreach ($specialProcedureValues as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> </td> </td> </tr> <tr> <td></td> <td> <?php $spa = explode(',', $record['sp_airway_ventilation']); $otherspa=false; foreach ($spa as $value) { if (trim($value) === 'Other') { $otherspa = true; break; } } ?> <?php if (!empty(array_filter($spa, 'trim'))): ?> <b>Airway and Ventilation</b> <ul> <?php foreach ($spa as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($otherspa): ?> <ul> <li> <p>Airway and Ventilation other : <?= $record['others_av'] ?> </p> </li> </ul> <?php endif; ?> <div class="row"> <div class="col-sm-6"> <?php $spa2 = explode(',', $record['sp_cvs']); $otherspa2=false; foreach ($spa2 as $value) { if (trim($value) === 'CVC (Central Venous Catheter line)') { $otherspa2 = true; break; } } ?> <?php if (!empty(array_filter($spa2, 'trim'))): ?> <b>CVS</b> <ul> <?php foreach ($spa2 as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> </div> <div class="col-sm-6"> <?php if ($otherspa2): ?> <b style="font-size: 12px;">CVC (Central Venous Catheter line)</b> <ol type="a"> <?php $cvs_ot = explode(',', $record['cvc']); foreach ($cvs_ot as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ol> <?php endif; ?> </div> </div> <!---end headnecj---> <?php $cns = explode(',', $record['sp_cns']); ?> <?php if (!empty(array_filter($cns, 'trim'))): ?> <b>CNS</b> <ul> <?php foreach ($cns as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <!---end lowerlimb---> <?php $others_sp = explode(',', $record['sp_others']); ?> <?php if (!empty(array_filter($others_sp, 'trim'))): ?> <b>Others</b> <ul> <?php foreach ($others_sp as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <!---end lowerlimb---> </td> </tr> </tbody> </table> </div> <!-- ----------Intra-Op------ --> <div class="table-container last_tab_clr last_tab_width" style="margin-left: 20px;"> <h5 class="tab_cont_head">Intra-Op</h5> <table class="table "> <thead> <tr> </tr> </thead> <tbody> <tr> <td>GA Technique</td> <td> <?= $record['ga_technique'] ?> </td> </tr> <tr> <td>GA Airway Management</td> <td> <?php $gam = explode(',', $record['ga_airway_management']); ?> <!-- Display the values as a list --> <ul> <?php foreach ($gam as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> </td> </tr> <tr> <td>Technique (CNB)</td> <td> <?php $cnbt = explode(',', $record['cnb_technique']); ?> <!-- Display the values as a list --> <ul> <?php foreach ($cnbt as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> </td> </tr> <tr> <td>Catheter (CNB)</td> <td> <?= $record['cnb_catheter'] ?> </td> </tr> <tr> <td>CNB Outcome (Success)</td> <td> <?php $cnboutcome = explode(',', $record['cnb_outcome']); $cnbnames = ["," ,"mins ", ""]; ?> <?php foreach ($cnboutcome as $index => $value): ?> <?php if (!empty(trim($value))): ?> <?= trim($value) ?> <?= isset($cnbnames[$index]) ? $cnbnames[$index] : '' ?> <?php endif; ?> <?php endforeach; ?> </tr> <tr> <td>PNB Block Site</td> <td> <?= $record['pnb_block_site'] ?> </td> </tr> <tr> <td>PNB Block Location</td> <td> <?php $pnb_location = explode(',', $record['pnb_block_location']); ?> <!-- Display the values as a list --> <ul> <?php foreach ($pnb_location as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> </td> </tr> <tr> <td>PNB Block</td> <td> <?php $pn2 = explode(',', $record['pnbl_capppnbl']); $otherpn2=false; foreach ($pn2 as $value) { if (trim($value) === 'other') { $otherpn2 = true; break; } } ?> <?php if (!empty(array_filter($pn2, 'trim'))): ?> <b>Chest Abdomen Perineum and Pelvis</b> <ul> <?php foreach ($pn2 as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($otherpn2): ?> <ul> <li> <p>Chest Abdomen Perineum and Pelvis other : <?= $record['others_chest'] ?> </p> </li> </ul> <?php endif; ?> <?php $pn3 = explode(',', $record['pnbl_headneck']); $otherpn3=false; foreach ($pn3 as $value) { if (trim($value) === 'other') { $otherpn3 = true; break; } } ?> <?php if (!empty(array_filter($pn3, 'trim'))): ?> <b>Head and Neck</b> <ul> <?php foreach ($pn3 as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($otherpn3): ?> <ul> <li> <p>Head and neck Other : <?= $record['others_headneck'] ?> </p> </li> </ul> <?php endif; ?> <!---end headnecj---> <?php $pn4 = explode(',', $record['pnbl_lowerlimb']); $otherpn4=false; foreach ($pn4 as $value) { if (trim($value) === 'other') { $otherpn4 = true; break; } } ?> <?php if (!empty(array_filter($pn4, 'trim'))): ?> <b>lower limb</b> <ul> <?php foreach ($pn4 as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($otherpn4): ?> <ul> <li> <p>Lower Limb Other : <?= $record['others_lowerlimb'] ?> </p> </li> </ul> <?php endif; ?> <!---end lowerlimb---> <?php $pn5 = explode(',', $record['pnbl_upperlimb']); $otherpn5=false; foreach ($pn5 as $value) { if (trim($value) === 'other') { $otherpn5 = true; break; } } ?> <?php if (!empty(array_filter($pn5, 'trim'))): ?> <b>Upper limb</b> <ul> <?php foreach ($pn5 as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ($otherpn4): ?> <ul> <li> <p>Upper limb Other : <?= $record['other_upperlimb'] ?> </p> </li> </ul> <?php endif; ?> <!---end lowerlimb---> </td> </tr> <tr> <td>PNB Block Technique</td> <td> <?php $ptech = explode(',', $record['pmb_technique']); ?> <!-- Display the values as a list --> <ul> <?php foreach ($ptech as $value): ?> <?php if (!empty(trim($value))): ?> <li> <?= trim($value) ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> </td> </tr> <tr> <td>PNB Catheter</td> <td> <?= $record['pnb_catheter'] ?> </td> </tr> <tr> <td>PNB Block Outcome (Success)</td> <td> <?= $record['success'] ?> </td> </tr> </tbody> </table> </div> <!-- ----------Notes------ --> <div class="table-container last_tab_clr last_tab_width" style="margin-left: 20px;"> <h5 class="tab_cont_head">Notes</h5> <table class="table "> <thead> <tr> </tr> </thead> <tbody> <tr> <td>Pain Review Type</td> <td> <?= $record['pain_review_type'] ?> </td> </tr> <tr> <td>Case Tags</td> <td> <?= $record['case_tags'] ?> </td> </tr> <tr> <td>Notes</td> <td> <?= $record['notes'] ?> </td> </tr> </tbody> </table> </div> </div> </div> </div> </section> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.5.0-beta4/html2canvas.min.js"></script> <script> // var btnSave = document.getElementById('dcase'); // btnSave.disabled = false; // btnSave.addEventListener('click', function () { // var doc = new jsPDF(); // html2canvas($('#downloadcase').get(0)).then(function (canvas) { // // export pdf // var pdfDoc = new jsPDF({ // orientation: 'potrait', // unit: 'px', // format: [canvas.width, canvas.height] // }); // pdfDoc.addImage(canvas.toDataURL('image/png'), 0, 0); // pdfDoc.save('<?= $record['case_num'] ?>.pdf'); // }); // }, false); var btnSave = document.getElementById('dcase'); btnSave.disabled = false; btnSave.addEventListener('click', function () { var doc = new jsPDF(); html2canvas($('#downloadcase').get(0)).then(function (canvas) { // export pdf var pdfDoc = new jsPDF({ orientation: 'potrait', unit: 'px', format: [canvas.width, canvas.height] }); pdfDoc.addImage(canvas.toDataURL('image/png'), 0, 0); pdfDoc.save('<?= $record['case_num'] ?>.pdf'); }); }, false); </script> <style> @media only screen and (max-width: 600px) { .spec-left { max-height: 110px; } .e-e-c { position: relative; top: 41px; left: 210px; } .go-back-new2 { margin-top: 25px !important; } .view-edt { margin-left: -40px !important; position: relative; top: 72px; } #down { padding-top: 20px; padding-bottom: 20px; } #dcase { /* margin-top: 70px; */ margin-top: -31px; margin-right: 80px; } .eec12 { margin-left: -60px !important; } .mob-edit-ex { margin-left: 55px !important; } .edis-existing-case {} } .spec-left { height: 4545px !important; } .spec-left a:after { top: 45px; } .e-e-c { margin-left: -140px; } .eec12 { margin-left: -170px; } .view-edt { margin-left: -40px; } .edis-existing-case { margin-top: -65px; } </style> <style> #dcase { background: linear-gradient(to left, #0160A2, #0198CD, #0160A2); color: #fff; /* padding: 5px 0px; */ float: right; border: none; padding: 5px; border-radius: 6px; position: relative; left: -80px; } .mob-edit-ex { background: linear-gradient(to left, #0160A2, #0198CD, #0160A2); color: white; border-radius: 6px; border: none; padding: 5px; margin-left: -30px; } .mob-edit-ex1 { background: linear-gradient(to left, #0160A2, #0198CD, #0160A2); color: white; border-radius: 6px; border: none; padding: 5px; width: 100px; margin-left: 50px; } </style>