소스 검색

Set additionReasonCategory to ON_INTAKE if added as isRemoved: true

Vijayakrishnan 3 년 전
부모
커밋
4d2be2a48e
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      resources/views/app/patient/wizard-partials/common-script.blade.php

+ 4 - 0
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -173,6 +173,10 @@ parentSegment.find('#frm-add-{{$label}}')
             if(form.find('[name="isRemoved"][value="0"]').is(':checked')) {
                 form.find('[name="additionReasonCategory"]').attr('required', 'required');
             }
+            else if(form.find('[name="isRemoved"][value="1"]').is(':checked')) {
+                form.find('[name="additionReasonCategory"]').removeAttr('required');
+                form.find('[name="additionReasonCategory"][value="ON_INTAKE"]').prop('checked', true); // make ON_INTAKE if in-active
+            }
         }
 
         // require removalReasonCategory if not active