team2 (Lung Care Programme) Remove Doctor Fix
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m13s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m13s
Details
This commit is contained in:
parent
729bfeac96
commit
c16d4e2d3e
|
|
@ -595,7 +595,7 @@
|
||||||
|
|
||||||
// Add another doctor wrapper. The first wrapper is already present in the form.
|
// Add another doctor wrapper. The first wrapper is already present in the form.
|
||||||
$('#adddoctor-btn').on('click', function () {
|
$('#adddoctor-btn').on('click', function () {
|
||||||
if ($('.doctor-wrapper').length >= 10) return;
|
if ($('.doctor-wrapper').length >= 5) return;
|
||||||
|
|
||||||
const doctorOptions = $('#field-contact_id').html();
|
const doctorOptions = $('#field-contact_id').html();
|
||||||
doctor_count++;
|
doctor_count++;
|
||||||
|
|
@ -667,6 +667,7 @@
|
||||||
|
|
||||||
// Remove a dynamically added doctor wrapper without reusing its element IDs.
|
// Remove a dynamically added doctor wrapper without reusing its element IDs.
|
||||||
$(document).on('click', '.btn-remove', function () {
|
$(document).on('click', '.btn-remove', function () {
|
||||||
|
doctor_count--;
|
||||||
const $wrapper = $(this).closest('.doctor-wrapper');
|
const $wrapper = $(this).closest('.doctor-wrapper');
|
||||||
$wrapper.find('select').each(function () {
|
$wrapper.find('select').each(function () {
|
||||||
if ($(this).hasClass('select2-hidden-accessible')) $(this).select2('destroy');
|
if ($(this).hasClass('select2-hidden-accessible')) $(this).select2('destroy');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue