<?php if(isset($admin_roles)): ?>
<?php if(admin_permission_by_name("admin.admins.admin.update")): ?>
<div id="admin-edit" class="mfp-hide large">
<div class="modal-data">
<div class="modal-header">
<h5 class="modal-title"><?php echo e(__("Edit Admin")); ?></h5>
</div>
<div class="modal-form-data">
<form class="modal-form" method="POST" action="<?php echo e(setRoute('admin.admins.admin.update')); ?>" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<?php echo method_field("PUT"); ?>
<input type="hidden" name="target" value="<?php echo e(old("target")); ?>">
<div class="row mb-10-none">
<div class="col-xl-12 col-lg-12 form-group">
<label for="countryFlag"><?php echo e(__("Profile Image")); ?></label>
<div class="col-12 col-sm-3 m-auto">
<?php echo $__env->make('admin.components.form.input-file',[
'label' => false,
'class' => "file-holder m-auto",
'name' => "edit_image",
'old_files_path' => files_asset_path('admin-profile'),
'old_files' => old('old_image')
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
</div>
<div class="col-xl-6 col-lg-6 form-group">
<?php echo $__env->make('admin.components.form.input',[
'label' => __("First Name")."*",
'name' => "edit_firstname",
'placeholder' => __("First Name"),
'value' => old("edit_firstname"),
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-xl-6 col-lg-6 form-group">
<?php echo $__env->make('admin.components.form.input',[
'label' => __("Last Name")."*",
'name' => "edit_lastname",
'placeholder' => __("Last Name"),
'value' => old("edit_lastname"),
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-xl-6 col-lg-6 form-group">
<?php echo $__env->make('admin.components.form.input',[
'label' => __("username"),
'name' => "edit_username",
'placeholder' => __("username"),
'value' => old("edit_username"),
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-xl-6 col-lg-6 form-group">
<?php echo $__env->make('admin.components.form.input',[
'label' => __("Email")."*",
'name' => "edit_email",
'placeholder' => __("Email"),
'value' => old("edit_email"),
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-xl-6 col-lg-6 form-group">
<?php echo $__env->make('admin.components.form.input',[
'label' => __("Phone"),
'name' => "edit_phone",
'placeholder' => __("Phone"),
'value' => old("edit_phone"),
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<div class="col-xl-6 col-lg-6 form-group role-select-wrp" data-admin-roles="<?php echo e(json_encode($admin_roles)); ?>">
<label><?php echo e(__("Role")); ?>*</label>
<select class="form--control select2-auto-tokenize" name="edit_role[]" data-old="<?php echo e(old("edit_role")); ?>" multiple data-placeholder="Select Role">
<?php $__currentLoopData = $admin_roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($item->id); ?>"><?php echo e($item->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
</div>
<div class="col-xl-12 col-lg-12 form-group d-flex align-items-center justify-content-between mt-4">
<button type="button" class="btn btn--danger modal-close"><?php echo e(__("Cancel")); ?></button>
<button type="submit" class="btn btn--base"><?php echo e(__("Update")); ?></button>
</div>
</div>
</form>
</div>
</div>
</div>
<?php $__env->startPush("script"); ?>
<script>
openModalWhenError("admin-edit","#admin-edit");
$(document).on("click",".edit-modal-button",function(){
var oldData = JSON.parse($(this).parents("tr").attr("data-item"));
var editModal = $("#admin-edit");
editModal.find("form").first().find("input[name=target]").val(oldData.username);
editModal.find("input[name=edit_firstname]").val(oldData.firstname);
editModal.find("input[name=edit_lastname]").val(oldData.lastname);
editModal.find("input[name=edit_username]").val(oldData.username);
editModal.find("input[name=edit_email]").val(oldData.email);
editModal.find("input[name=edit_phone]").val(oldData.phone);
editModal.find("input[name=edit_image]").attr("data-preview-name",oldData.image);
var admin_roles = editModal.find(".role-select-wrp").attr("data-admin-roles");
admin_roles = JSON.parse(admin_roles);
var available_roles = oldData.roles.map(pluck("admin_role_id"));
var options = "";
$.each(admin_roles,function(index,item) {
console.log(available_roles);
if(available_roles.includes(item.id)) {
options += `<option value="${item.id}" selected>${item.name}</option>`;
}else {
options += `<option value="${item.id}">${item.name}</option>`;
}
});
var roleSelect = `<select class="form--control select2-auto-tokenize" name="edit_role[]" data-old="<?php echo e(old("edit_role")); ?>" multiple data-placeholder="Select Role">
${options}
</select>`;
editModal.find(".role-select-wrp select").remove();
editModal.find(".role-select-wrp .select2").remove();
editModal.find(".role-select-wrp").append(roleSelect);
editModal.find(".role-select-wrp select").select2();
fileHolderPreviewReInit("#admin-edit input[name=edit_image]");
openModalBySelector("#admin-edit");
});
</script>
<?php $__env->stopPush(); ?>
<?php endif; ?>
<?php endif; ?><?php /**PATH /home/kueuepay/public_html/resources/views/admin/components/modals/edit-admin.blade.php ENDPATH**/ ?>
About Section
NFC Pay was founded with a vision to transform the way people handle transactions. Our journey is defined by a commitment to innovation, security, and convenience. We strive to deliver seamless, user-friendly payment solutions that make everyday transactions effortless and secure. Our mission is to empower you to pay with ease and confidence, anytime, anywhere.
FAQ Section
Here are answers to some common questions about NFC Pay. We aim to provide clear and concise information to help you understand how our platform works and how it can benefit you. If you have any further inquiries, please don’t hesitate to contact our support team.
Download the app and sign up using your email or phone number, then complete the verification process.
Yes, we use advanced encryption and security protocols to protect your payment details.
Absolutely, you can link multiple debit or credit cards to your wallet.
Go to the transfer section, select the recipient, enter the amount, and authorize the transfer.
Use the “Forgot PIN” feature in the app to reset it following the provided instructions.
Sign up for a merchant account through the app and follow the setup instructions to start accepting payments.
Yes, you can view and track your payment status in the account dashboard