File: /var/www/ivs.kaunokolegija.lt/laravel/storage/framework/views/9129dad491e7c907dbd00c5f637ba882.php
<div class="form-group">
<label class="required" for="social_partner_id"><?php echo e(trans('cruds.activityEntry.fields.social_partner')); ?></label>
<div class="d-flex align-items-center">
<select class="form-control select2 <?php echo e($errors->has('social_partner') ? 'is-invalid' : ''); ?>" name="social_partner_id" id="social_partner_id" required>
<?php $__currentLoopData = $social_partners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $entry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(old('social_partner_id') == $id ? 'selected' : ''); ?>><?php echo e($entry); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('company_create')): ?>
<?php if($useModal): ?>
<?php echo $__env->make('layouts.form_modal', ['fieldsLink' => 'admin.companies.company-fields', 'compName' => 'Company', 'route' => route('admin.companies.store'), 'title' => trans('global.add'), 'useModal' => false, 'nameModal' => false, 'modalBtn' => false], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<button class="btn btn-outline-primary ms-2" data-select-id="social_partner_id" id="openCompanyModal" >
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('social_partner')): ?>
<span class="text-danger"><?php echo e($errors->first('social_partner')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.social_partner_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label class="required" for="activity_start"><?php echo e(trans('cruds.activityEntry.fields.activity_start')); ?></label>
<input class="form-control datetime <?php echo e($errors->has('activity_start') ? 'is-invalid' : ''); ?>" type="text" name="activity_start" id="activity_start" value="<?php echo e(old('activity_start')); ?>" required>
<?php if($errors->has('activity_start')): ?>
<span class="text-danger"><?php echo e($errors->first('activity_start')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.activity_start_helper')); ?></span>
</div>
<div class="form-group">
<label for="activity_end"><?php echo e(trans('cruds.activityEntry.fields.activity_end')); ?></label>
<input class="form-control datetime <?php echo e($errors->has('activity_end') ? 'is-invalid' : ''); ?>" type="text" name="activity_end" id="activity_end" value="<?php echo e(old('activity_end')); ?>">
<?php if($errors->has('activity_end')): ?>
<span class="text-danger"><?php echo e($errors->first('activity_end')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.activity_end_helper')); ?></span>
</div>
<div class="form-group">
<label class="required" for="activitytypes"><?php echo e(trans('cruds.activityEntry.fields.activitytype')); ?></label>
<div style="padding-bottom: 4px">
<span class="btn btn-info btn-xs select-all" style="border-radius: 0"><?php echo e(trans('global.select_all')); ?></span>
<span class="btn btn-info btn-xs deselect-all" style="border-radius: 0"><?php echo e(trans('global.deselect_all')); ?></span>
</div>
<div class="d-flex align-items-center">
<select class="form-control select2 <?php echo e($errors->has('activitytypes') ? 'is-invalid' : ''); ?>" name="activitytypes[]" id="activitytypes" multiple required>
<?php $__currentLoopData = $activitytypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $activitytype): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('activitytypes', [])) ? 'selected' : ''); ?>><?php echo e($activitytype); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('activity_type_create')): ?>
<?php if($nameModal): ?>
<?php if (isset($component)) { $__componentOriginal863456d2b7044be7ea705fd9162e9dfc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc = $attributes; } ?>
<?php $component = App\View\Components\Modal\CreateNameModal::resolve(['compName' => 'ActivityType','title' => ''.e(trans('global.add')).'','name' => 'name','label' => ''.e(trans('cruds.activityType.fields.name')).'','route' => ''.e(route('admin.activity-types.store')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('modal.create-name-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Modal\CreateNameModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $attributes = $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $component = $__componentOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php endif; ?>
<?php if($modalBtn): ?>
<button type="button" data-select-id="activitytypes" class="btn btn-outline-primary ms-2" id="openActivityTypeModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('activitytypes')): ?>
<span class="text-danger"><?php echo e($errors->first('activitytypes')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.activitytype_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="activitysubtypes"><?php echo e(trans('cruds.activityEntry.fields.activitysubtype')); ?></label>
<div style="padding-bottom: 4px">
<span class="btn btn-info btn-xs select-all" style="border-radius: 0"><?php echo e(trans('global.select_all')); ?></span>
<span class="btn btn-info btn-xs deselect-all" style="border-radius: 0"><?php echo e(trans('global.deselect_all')); ?></span>
</div>
<div class="d-flex align-items-center">
<select class="form-control select2 <?php echo e($errors->has('activitysubtypes') ? 'is-invalid' : ''); ?>" name="activitysubtypes[]" id="activitysubtypes" multiple>
<?php $__currentLoopData = $activitysubtypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $activitysubtype): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('activitysubtypes', [])) ? 'selected' : ''); ?>><?php echo e($activitysubtype); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('activity_sub_type_create')): ?>
<?php if($nameModal): ?>
<?php if (isset($component)) { $__componentOriginal863456d2b7044be7ea705fd9162e9dfc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc = $attributes; } ?>
<?php $component = App\View\Components\Modal\CreateNameModal::resolve(['compName' => 'ActivitySubType','title' => ''.e(trans('global.add')).'','name' => 'name','label' => ''.e(trans('cruds.activitySubType.fields.name')).'','route' => ''.e(route('admin.activity-sub-types.store')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('modal.create-name-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Modal\CreateNameModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $attributes = $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $component = $__componentOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php endif; ?>
<?php if($modalBtn): ?>
<button type="button" data-select-id="activitysubtypes" class="btn btn-outline-primary ms-2" id="openActivitySubTypeModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('activitysubtypes')): ?>
<span class="text-danger"><?php echo e($errors->first('activitysubtypes')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.activitysubtype_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="description"><?php echo e(trans('cruds.activityEntry.fields.description')); ?></label>
<textarea class="form-control <?php echo e($errors->has('description') ? 'is-invalid' : ''); ?>" name="description" id="description"><?php echo e(old('description')); ?></textarea>
<?php if($errors->has('description')): ?>
<span class="text-danger"><?php echo e($errors->first('description')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.description_helper')); ?></span>
</div>
<div class="form-group">
<label for="departments"><?php echo e(trans('cruds.activityEntry.fields.department')); ?></label>
<div style="padding-bottom: 4px">
<span class="btn btn-info btn-xs select-all" style="border-radius: 0"><?php echo e(trans('global.select_all')); ?></span>
<span class="btn btn-info btn-xs deselect-all" style="border-radius: 0"><?php echo e(trans('global.deselect_all')); ?></span>
</div>
<div class="d-flex align-items-center">
<select class="form-control select2 <?php echo e($errors->has('departments') ? 'is-invalid' : ''); ?>" name="departments[]" id="departments" multiple>
<?php $__currentLoopData = $departments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $department): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($department->id); ?>" <?php echo e(in_array($id, old('departments', [])) ? 'selected' : ''); ?>><?php echo e($department->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('department_create')): ?>
<?php if($nameModal): ?>
<?php if (isset($component)) { $__componentOriginal863456d2b7044be7ea705fd9162e9dfc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc = $attributes; } ?>
<?php $component = App\View\Components\Modal\CreateNameModal::resolve(['compName' => 'Department','name' => 'name','title' => ''.e(trans('global.add')).'','label' => ''.e(trans('cruds.department.fields.name')).'','route' => ''.e(route('admin.departments.store')).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('modal.create-name-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Modal\CreateNameModal::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $attributes = $__attributesOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__attributesOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc)): ?>
<?php $component = $__componentOriginal863456d2b7044be7ea705fd9162e9dfc; ?>
<?php unset($__componentOriginal863456d2b7044be7ea705fd9162e9dfc); ?>
<?php endif; ?>
<?php endif; ?>
<?php if($modalBtn): ?>
<button type="button" data-select-id="departments" class="btn btn-outline-primary ms-2" id="openDepartmentModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('departments')): ?>
<span class="text-danger"><?php echo e($errors->first('departments')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.department_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="departmentsubs"><?php echo e(trans('cruds.activityEntry.fields.departmentsub')); ?></label>
<div style="padding-bottom: 4px">
<span class="btn btn-info btn-xs select-all" style="border-radius: 0"><?php echo e(trans('global.select_all')); ?></span>
<span class="btn btn-info btn-xs deselect-all" style="border-radius: 0"><?php echo e(trans('global.deselect_all')); ?></span>
</div>
<div class="d-flex align-items-center">
<select class="form-control select2 <?php echo e($errors->has('departmentsubs') ? 'is-invalid' : ''); ?>" name="departmentsubs[]" id="departmentsubs" multiple>
<?php $__currentLoopData = $departmentsubs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $departmentsub): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('departmentsubs', [])) ? 'selected' : ''); ?>><?php echo e($departmentsub); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('department_subsection_create')): ?>
<?php if($useModal): ?>
<?php echo $__env->make('layouts.form_modal', ['fieldsLink' => 'admin.departmentSubsections.departament-subsection-fields', 'compName' => 'DepartmentSubsection', 'route' => route('admin.department-subsections.store'), 'title' => trans('global.add'), 'useModal' => false, 'nameModal' => true, 'modalBtn' => true], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<button id="openDepartmentSubsectionModal" data-select-id="departmentsubs" type="button" class="btn btn-outline-primary ms-2">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('departmentsubs')): ?>
<span class="text-danger"><?php echo e($errors->first('departmentsubs')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.departmentsub_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="raised_funds"><?php echo e(trans('cruds.activityEntry.fields.raised_funds')); ?></label>
<input class="form-control <?php echo e($errors->has('raised_funds') ? 'is-invalid' : ''); ?>" type="number" name="raised_funds" id="raised_funds" value="<?php echo e(old('raised_funds', '0')); ?>" step="0.01">
<?php if($errors->has('raised_funds')): ?>
<span class="text-danger"><?php echo e($errors->first('raised_funds')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.raised_funds_helper')); ?></span>
</div>
<div class="form-group">
<label for="attachments"><?php echo e(trans('cruds.activityEntry.fields.attachments')); ?></label>
<div class="needsclick dropzone <?php echo e($errors->has('attachments') ? 'is-invalid' : ''); ?>" id="attachments-dropzone">
</div>
<?php if($errors->has('attachments')): ?>
<span class="text-danger"><?php echo e($errors->first('attachments')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.activityEntry.fields.attachments_helper')); ?></span>
</div>
<script>
$(document).ready(function() {
var uploadedAttachmentsMap = {};
const modalId = "#<?php echo e($compName); ?>Modal";
var myDropzone = new Dropzone("#attachments-dropzone", {
url: '<?php echo e(route('admin.activity-entries.storeMedia')); ?>',
maxFilesize: 10, // MB
addRemoveLinks: true,
headers: {
'X-CSRF-TOKEN': "<?php echo e(csrf_token()); ?>"
},
params: {
size: 10
},
success: function(file, response) {
$(modalId).append('<input type="hidden" name="attachments[]" value="' + response.name + '">');
uploadedAttachmentsMap[file.name] = response.name;
},
removedfile: function(file) {
file.previewElement.remove();
var name = '';
if (typeof file.file_name !== 'undefined') {
name = file.file_name;
} else {
name = uploadedAttachmentsMap[file.name];
}
$(modalId).find('input[name="attachments[]"][value="' + name + '"]').remove();
},
init: function() {
<?php if(isset($coopAgreement) && $coopAgreement->attachments): ?>
var files = <?php echo json_encode($coopAgreement->attachments); ?>;
for (var i in files) {
var file = files[i];
this.options.addedfile.call(this, file);
file.previewElement.classList.add('dz-complete');
$(modalId).append('<input type="hidden" name="attachments[]" value="' + file.file_name + '">');
}
<?php endif; ?>
},
error: function(file, response) {
var message = $.type(response) === 'string' ? response : response.errors.file;
file.previewElement.classList.add('dz-error');
var nodes = file.previewElement.querySelectorAll('[data-dz-errormessage]');
for (var node of nodes) {
node.textContent = message;
}
}
});
});
</script><?php /**PATH /var/www/ivs.kaunokolegija.lt/laravel/resources/views/admin/activityEntries/activity-entries-fields.blade.php ENDPATH**/ ?>