129 lines
4.4 KiB
PHP
129 lines
4.4 KiB
PHP
<div class="modal fade" id="modal-add-user" tabindex="-1" role="dialog" aria-hidden="true">
|
|
<form role="form" id="user_form" name="user_form" action="#" method="post">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-primary text-white">
|
|
<h5 class="modal-title" style="font-size: 1.5rem;">Additional Budget</h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row mb-3">
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<label for="budget_amount">Additional Budget Amount</label>
|
|
<input type="text" class="form-control" id="budget_amount" name="budget_amount" placeholder="Enter budget amount">
|
|
<input type="hidden" id="csr_id" name="csr_id">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<label for="beneficiary">Add Beneficiary </label>
|
|
<input type="text" class="form-control" id="beneficiary" name="beneficiary" placeholder="Enter beneficiary details">
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="form-group">
|
|
<label for="beneficiary">Remark</label>
|
|
<input type="text" class="form-control" id="remark2" name="remark2" placeholder="Enter Remark ">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-info btn-sm" style="border-radius: 8px; font-size: 1.1rem;" onclick="validate_dushant();">
|
|
<i class="fa fa-floppy-o me-1"></i> Save
|
|
</button>
|
|
<button type="button" class="btn btn-danger btn-sm" style="border-radius: 8px; font-size: 1.1rem;" data-dismiss="modal">
|
|
<i class="ace-icon fa fa-times bigger-110"></i> Cancel
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Add some custom styles to enhance the design -->
|
|
<style>
|
|
.modal-header {
|
|
border-bottom: 1px solid #dee2e6;
|
|
}
|
|
|
|
.modal-body {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.modal-footer {
|
|
border-top: 1px solid #dee2e6;
|
|
}
|
|
|
|
.form-control {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.btn {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.btn-close {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.btn-info {
|
|
background-color: #17a2b8;
|
|
border-color: #17a2b8;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: #6c757d;
|
|
border-color: #6c757d;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
function validate_dushant() {
|
|
// Implement validation logic here
|
|
save_user();
|
|
}
|
|
|
|
function selectBeneficiary(userId) {
|
|
if($('#batch_name').val() == 'droped'){
|
|
$.ajax({
|
|
url: 'update_additional_budget.php',
|
|
type: "POST",
|
|
data: { userId: userId },
|
|
success: function(data) {
|
|
var data = $.parseJSON(data);
|
|
$("#id").val(data.id);
|
|
$("#addmission_status").val(data.dropout_status).select2();
|
|
openform(data.dropout_status);
|
|
$("#unenroll_date").val(data.dpd);
|
|
$("#remark").val(data.remark);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function save_user() {
|
|
$.ajax({
|
|
url: 'update_additional_budget.php',
|
|
type: "POST",
|
|
data: $("#user_form").serialize(),
|
|
success: function(data) {
|
|
BootstrapDialog.alert('Additional Budget Updated Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
|
|
setTimeout(function() {
|
|
location.reload();
|
|
}, 3000);
|
|
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error For Updating Additional Budget');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
}
|
|
</script>
|