90 lines
3.6 KiB
PHP
90 lines
3.6 KiB
PHP
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
|
|
|
$__newAttributes = [];
|
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['data']));
|
|
|
|
foreach ($attributes->all() as $__key => $__value) {
|
|
if (in_array($__key, $__propNames)) {
|
|
$$__key = $$__key ?? $__value;
|
|
} else {
|
|
$__newAttributes[$__key] = $__value;
|
|
}
|
|
}
|
|
|
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
|
|
|
unset($__propNames);
|
|
unset($__newAttributes);
|
|
|
|
foreach (array_filter((['data']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
|
$$__key = $$__key ?? $__value;
|
|
}
|
|
|
|
$__defined_vars = get_defined_vars();
|
|
|
|
foreach ($attributes->all() as $__key => $__value) {
|
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
|
}
|
|
|
|
unset($__defined_vars); ?>
|
|
<?php
|
|
$loopCount = max(1, count($data));
|
|
?>
|
|
<div class="card custom-field-section">
|
|
<div class="card-header">
|
|
<h6 class="card-title mb-0 fs-14">
|
|
Custom Fields
|
|
</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-lg-12 clone-container">
|
|
<?php for($i = 0; $i < $loopCount; $i++): ?>
|
|
<div class="row clone-section mt-2">
|
|
<div class="col-lg-2">
|
|
<?php if($i == 0): ?>
|
|
<?php echo e(html()->label('Symbol')->class('form-label')->for('symbol[]')); ?>
|
|
|
|
<?php endif; ?>
|
|
<?php echo e(html()->text('symbol[]')->value($data[$i]['symbol'] ?? old('symbol[]'))->class('form-control')->placeholder('Symbol')); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
<?php if($i == 0): ?>
|
|
<?php echo e(html()->label('Title')->class('form-label')->for('key[]')); ?>
|
|
|
|
<?php endif; ?>
|
|
<?php echo e(html()->text('key[]')->value($data[$i]['key'] ?? old('key[]'))->class('form-control')->placeholder('Enter Title')); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
<?php if($i == 0): ?>
|
|
<?php echo e(html()->label('Content')->class('form-label')->for('value[]')); ?>
|
|
|
|
<?php endif; ?>
|
|
<?php echo e(html()->textarea('value[]')->value($data[$i]['value'] ?? old('value[]'))->class('form-control')->placeholder('Enter Content')->rows(1)); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-2">
|
|
<?php if($i == 0): ?>
|
|
<label class="form-label">Action</label>
|
|
<?php endif; ?>
|
|
<div class="d-flex gap-2">
|
|
<a href="javascript:void(0)" class="btn btn-secondary btn-sm fs-6 clone">
|
|
<i class="ri-add-line align-middle"></i>
|
|
</a>
|
|
<a href="javascript:void(0)" class="btn btn-danger btn-sm fs-6 declone">
|
|
<i class="ri-subtract-line align-middle"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endfor; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php /**PATH /home/rohiniedu/public_html/Modules/CCMS/resources/views/components/custom-form-field.blade.php ENDPATH**/ ?>
|