|
@@ -11,8 +11,7 @@ if(!isset($contentData['count'])) {
|
|
|
}
|
|
|
$formID = rand(0, 100000);
|
|
|
?>
|
|
|
-<form method="POST" action="/process_form_submit"
|
|
|
- id="hospitalizations_{{ $formID }}"
|
|
|
+<form processed id="hospitalizations_{{ $formID }}"
|
|
|
onsubmit="return submitForm_NoteSection_{{ $formID }}(this);">
|
|
|
<input type="hidden" name="count" v-model="count">
|
|
|
<?php if($section): ?>
|
|
@@ -75,27 +74,9 @@ $formID = rand(0, 100000);
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="form-group mt-3 mb-0 d-flex">
|
|
|
- <button class="btn btn-sm btn-primary mr-2">Submit</button>
|
|
|
- <button class="btn btn-sm btn-default text-primary border border-primary mr-2"
|
|
|
- v-on:click.prevent="addItem()"
|
|
|
- >Add Hospitalization</button>
|
|
|
- <button class="btn btn-sm btn-default border" type="button" onclick="return cancelForm_NoteSection_{{ $formID }}(this)">Cancel</button>
|
|
|
- </div>
|
|
|
</form>
|
|
|
<script>
|
|
|
- function submitForm_NoteSection_{{ $formID }}(_form) {
|
|
|
- showMask();
|
|
|
- $.post(_form.action, $(_form).serialize(), function(_data) {
|
|
|
- fastReload();
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- function cancelForm_NoteSection_{{ $formID }}(_trigger) {
|
|
|
- $(_trigger).closest('.note-section').toggleClass('edit');
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
(function() {
|
|
|
|
|
|
let count = {{ $contentData['count'] }}, items = [];
|