Skip to content

Commit

Permalink
Progress update form
Browse files Browse the repository at this point in the history
  • Loading branch information
jggj21 authored Aug 18, 2024
1 parent 9ffb00a commit 16c65f8
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions resources/views/tasks.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<div class="modal fade" id="editTaskModal" tabindex="-1" role="dialog" aria-labelledby="editTaskModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form id="editTaskForm" method="POST" enctype="multipart/form-data">
<form id="editTaskForm" method="POST" enctype="multipart/form-data" action="{{ route('task.update', $task->id) }}">
@csrf
@method('PUT')

Expand Down Expand Up @@ -190,22 +190,6 @@
$('#filePreviewModal').modal('show');
});
});
});
$('#editTaskModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var taskId = button.data('task-id');
var taskName = button.data('task-name');
var modal = $(this);
modal.find('#editTaskId').val(taskId);
modal.find('#editTaskName').val(taskName);
var formAction = '/task/' + taskId;
console.log("FORM ACTION");
console.log(formAction);
console.log(taskId);
modal.find('#editTaskForm').attr('action', formAction);
});
});
</script>
@endsection

0 comments on commit 16c65f8

Please sign in to comment.