Titans : Novel Invite made all form fileds hidden in HO View 6
Specific Folder FTP Upload / ftp-deploy (push) Successful in 34s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 34s
Details
This commit is contained in:
parent
0d6d2a8727
commit
9ff1642022
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
@include('layouts.shared/title-meta', ['title' => "Form"])
|
@include('layouts.shared/title-meta', ['title' => "Form"])
|
||||||
|
|
@ -13,7 +12,11 @@
|
||||||
</div>
|
</div>
|
||||||
@php
|
@php
|
||||||
|
|
||||||
$history = Formhelper::getMultiformData($form->partition,$form_id,$form->user_id);
|
$history = Formhelper::getMultiformData(
|
||||||
|
$form->partition,
|
||||||
|
$form_id,
|
||||||
|
$form->user_id
|
||||||
|
);
|
||||||
|
|
||||||
$historyData = [];
|
$historyData = [];
|
||||||
|
|
||||||
|
|
@ -49,18 +52,20 @@ foreach($history->data->submissions as $sub){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$historyData[] = [
|
$historyData[] = [
|
||||||
'submission_id' => $sub->id,
|
'submission_id' => $sub->id,
|
||||||
'date' => $recordDate,
|
'date' => $recordDate,
|
||||||
'doctor' => $doctorName,
|
'doctor' => $doctorName,
|
||||||
'status' => ucfirst($sub->workflow_status ?? ''),
|
'status' => ucfirst($sub->workflow_status ?? ''),
|
||||||
'submission' => $sub,
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
];}}
|
|
||||||
|
|
||||||
@endphp{{-- <pre>{{ print_r($history->data->submissions[0], true) }}</pre> --}}
|
|
||||||
|
|
||||||
|
@endphp
|
||||||
|
{{-- <pre>
|
||||||
|
{{ print_r($history->data->submissions[0], true) }}
|
||||||
|
</pre> --}}
|
||||||
<body class="loading">
|
<body class="loading">
|
||||||
<div class="account-pages">
|
<div class="account-pages">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
@ -103,7 +108,6 @@ foreach($history->data->submissions as $sub){
|
||||||
<form method="POST" action="/form/submitpersonalized" id="report-form" enctype="multipart/form-data">
|
<form method="POST" action="/form/submitpersonalized" id="report-form" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="form_id" value="{{$form_id}}">
|
<input type="hidden" name="form_id" value="{{$form_id}}">
|
||||||
<input type="hidden" name="form_info" id="form_info" value="">
|
<input type="hidden" name="form_info" id="form_info" value="">
|
||||||
<input type="hidden" name="submission_id" id="submission_id">
|
|
||||||
@csrf
|
@csrf
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-7">
|
<div class="col-7">
|
||||||
|
|
@ -234,14 +238,6 @@ foreach($history->data->submissions as $sub){
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@elseif(strtolower($row['status']) == 'rejected')
|
|
||||||
|
|
||||||
<button
|
|
||||||
class="btn btn-warning btn-sm edit-btn"
|
|
||||||
data-submission='@json($row["submission"])'>
|
|
||||||
Edit
|
|
||||||
</button>
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -271,7 +267,6 @@ foreach($history->data->submissions as $sub){
|
||||||
<!-- end container -->
|
<!-- end container -->
|
||||||
</div>
|
</div>
|
||||||
<!-- end page -->
|
<!-- end page -->
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#pageloader {
|
#pageloader {
|
||||||
background: rgba( 255, 255, 255, 0.8 );
|
background: rgba( 255, 255, 255, 0.8 );
|
||||||
|
|
@ -290,15 +285,10 @@ foreach($history->data->submissions as $sub){
|
||||||
top: 50%;
|
top: 50%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@include('layouts.shared/footer-script')
|
@include('layouts.shared/footer-script')
|
||||||
|
|
||||||
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
||||||
|
|
||||||
<script src="{{asset('assets/libs/cropper/cropper.min.js')}}"></script>
|
<script src="{{asset('assets/libs/cropper/cropper.min.js')}}"></script>
|
||||||
|
|
||||||
<script src="{{ URL::asset('assets/libs/dropify/dropify.min.js') }}"></script>
|
<script src="{{ URL::asset('assets/libs/dropify/dropify.min.js') }}"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
$('#history-wrapper').show();
|
$('#history-wrapper').show();
|
||||||
|
|
@ -371,13 +361,6 @@ foreach($history->data->submissions as $sub){
|
||||||
|
|
||||||
$('#report-form').on('submit', function(event){
|
$('#report-form').on('submit', function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let formData = new FormData($('#report-form')[0]);
|
|
||||||
console.log("===== Submitted Data =====");
|
|
||||||
|
|
||||||
for (let pair of formData.entries()) {
|
|
||||||
console.log(pair[0] + " : ", pair[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#pageloader").fadeIn();
|
$("#pageloader").fadeIn();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
|
@ -447,75 +430,6 @@ foreach($history->data->submissions as $sub){
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
// });
|
// });
|
||||||
$(document).on('click', '.edit-btn', function (e) {
|
|
||||||
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
let submission = JSON.parse($(this).attr('data-submission'));
|
|
||||||
let data = submission.formdata;
|
|
||||||
let personalize = data.form_info;
|
|
||||||
|
|
||||||
// Save submission id
|
|
||||||
$('#submission_id').val(submission.id);
|
|
||||||
|
|
||||||
// Save form info
|
|
||||||
$('#form_info').val(JSON.stringify(personalize));
|
|
||||||
|
|
||||||
// Hide/Show sections
|
|
||||||
$('#btnNewInvite').hide();
|
|
||||||
$('#history-wrapper').hide();
|
|
||||||
$('#template-wrapper').hide();
|
|
||||||
$('#form-wrapper').show();
|
|
||||||
|
|
||||||
// Show template
|
|
||||||
$('#wrapper-template_id img').attr('src', personalize.icon);
|
|
||||||
|
|
||||||
// Hide all questions
|
|
||||||
$('.question-wrapper').hide();
|
|
||||||
|
|
||||||
$('#report-form .question-wrapper').each(function () {
|
|
||||||
$(this).find('.req-star').hide();
|
|
||||||
$(this).find(':input').removeAttr('required');
|
|
||||||
});
|
|
||||||
|
|
||||||
// Show only template questions
|
|
||||||
for (let que of personalize.questions) {
|
|
||||||
|
|
||||||
let $w = $('#wrapper-' + que);
|
|
||||||
|
|
||||||
$w.show();
|
|
||||||
|
|
||||||
$w.find('.req-star').show();
|
|
||||||
|
|
||||||
$w.find('input:not([type="hidden"]):not([type="checkbox"]), textarea, select')
|
|
||||||
.attr('required', 'required');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fill values
|
|
||||||
$.each(data, function (key, value) {
|
|
||||||
|
|
||||||
let $field = $('#field-' + key);
|
|
||||||
|
|
||||||
if ($field.length) {
|
|
||||||
|
|
||||||
if ($field.is(':checkbox')) {
|
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
|
||||||
value.forEach(function (v) {
|
|
||||||
$('#field-' + key + '-' + v).prop('checked', true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$field.val(value);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
$('#image-form').on('submit', function(event){
|
$('#image-form').on('submit', function(event){
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -577,7 +491,6 @@ foreach($history->data->submissions as $sub){
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue