File: /var/www/ivs.kaunokolegija.lt/laravel/storage/framework/views/fc231e52362fd93559c08ef0dbdaf159.php
<div class="form-group">
<label class="required" for="name"><?php echo e(trans('cruds.scienceActivity.fields.name')); ?></label>
<input class="form-control <?php echo e($errors->has('name') ? 'is-invalid' : ''); ?>" type="text" name="name" id="name" value="<?php echo e(old('name', '')); ?>" required>
<?php if($errors->has('name')): ?>
<span class="text-danger"><?php echo e($errors->first('name')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.name_helper')); ?></span>
</div>
<div class="form-group">
<label class="required" for="contractno"><?php echo e(trans('cruds.scienceActivity.fields.contractno')); ?></label>
<input class="form-control <?php echo e($errors->has('contractno') ? 'is-invalid' : ''); ?>" type="text" name="contractno" id="contractno" value="<?php echo e(old('contractno', '')); ?>" required>
<?php if($errors->has('contractno')): ?>
<span class="text-danger"><?php echo e($errors->first('contractno')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.contractno_helper')); ?></span>
</div>
<div class="form-group">
<label class="required" for="contactscientists"><?php echo e(trans('cruds.scienceActivity.fields.contactscientists')); ?></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('contactscientists') ? 'is-invalid' : ''); ?>" name="contactscientists[]" id="contactscientists" multiple required>
<?php $__currentLoopData = $contactscientists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $contactscientist): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('contactscientists', [])) ? 'selected' : ''); ?>><?php echo e($contactscientist); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('scientist_create')): ?>
<?php if($useModal): ?>
<?php echo $__env->make('layouts.form_modal', ['fieldsLink' => 'admin.scientists.scientists-fields', 'compName' => 'Scientist', 'route' => route('admin.scientists.store'), 'title' => trans('global.create') . ' ' . trans('cruds.scientist.title_singular'), 'useModal' => false, 'nameModal' => true, 'modalBtn' => true], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<button class="btn btn-outline-primary ms-2" data-select-id="contactscientists" id="openScientistModal" >
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('contactscientists')): ?>
<span class="text-danger"><?php echo e($errors->first('contactscientists')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.contactscientists_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="contactstudents"><?php echo e(trans('cruds.scienceActivity.fields.contactstudent')); ?></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('contactstudents') ? 'is-invalid' : ''); ?>" name="contactstudents[]" id="contactstudents" multiple>
<?php $__currentLoopData = $contactstudents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $contactstudent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('contactstudents', [])) ? 'selected' : ''); ?>><?php echo e($contactstudent); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('student_create')): ?>
<?php if($useModal): ?>
<?php echo $__env->make('layouts.form_modal', ['fieldsLink' => 'admin.students.students-fields', 'compName' => 'Student', 'route' => route('admin.students.store'), 'title' => trans('global.create'), 'useModal' => false, 'nameModal' => true, 'modalBtn' => true], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<button class="btn btn-outline-primary ms-2" data-select-id="contactstudents" id="openStudentModal" >
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('contactstudents')): ?>
<span class="text-danger"><?php echo e($errors->first('contactstudents')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.contactstudent_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label class="required" for="activity_start"><?php echo e(trans('cruds.scienceActivity.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.scienceActivity.fields.activity_start_helper')); ?></span>
</div>
<div class="form-group">
<label for="activity_end"><?php echo e(trans('cruds.scienceActivity.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.scienceActivity.fields.activity_end_helper')); ?></span>
</div>
<div class="form-group">
<label for="activity_types"><?php echo e(trans('cruds.scienceActivity.fields.activity_type')); ?></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('activity_types') ? 'is-invalid' : ''); ?>" name="activity_types[]" id="activity_types" multiple>
<?php $__currentLoopData = $activity_types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $activity_type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($activity_type->id); ?>" <?php echo e(in_array($activity_type->id, old('activity_types', [])) ? 'selected' : ''); ?>><?php echo e($activity_type->name); ?></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="activity_types" class="btn btn-outline-primary ms-2" id="openActivityTypeModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('activity_types')): ?>
<span class="text-danger"><?php echo e($errors->first('activity_types')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.activity_type_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="activity_subtypes"><?php echo e(trans('cruds.scienceActivity.fields.activity_subtype')); ?></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('activity_subtypes') ? 'is-invalid' : ''); ?>" name="activity_subtypes[]" id="activity_subtypes" multiple>
<?php $__currentLoopData = $activity_subtypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $activity_subtype): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('activity_subtypes', [])) ? 'selected' : ''); ?>><?php echo e($activity_subtype); ?></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="activity_subtypes" class="btn btn-outline-primary ms-2" id="openActivitySubTypeModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('activity_subtypes')): ?>
<span class="text-danger"><?php echo e($errors->first('activity_subtypes')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.activity_subtype_helper')); ?></span>
</div>
</div>
<div class="form-group">
<div class="form-check <?php echo e($errors->has('is_mtep') ? 'is-invalid' : ''); ?>">
<input type="hidden" name="is_mtep" value="0">
<input class="form-check-input" type="checkbox" name="is_mtep" id="is_mtep" value="1" <?php echo e(old('is_mtep', 0) == 1 ? 'checked' : ''); ?>>
<label class="form-check-label" for="is_mtep"><?php echo e(trans('cruds.scienceActivity.fields.is_mtep')); ?></label>
</div>
<?php if($errors->has('is_mtep')): ?>
<span class="text-danger"><?php echo e($errors->first('is_mtep')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.is_mtep_helper')); ?></span>
</div>
<div class="form-group">
<label for="science_areas"><?php echo e(trans('cruds.scienceActivity.fields.science_area')); ?></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('science_areas') ? 'is-invalid' : ''); ?>" name="science_areas[]" id="science_areas" multiple>
<?php $__currentLoopData = $science_areas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $science_area): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($science_area->id); ?>" <?php echo e(in_array($science_area->id, old('science_areas', [])) ? 'selected' : ''); ?>><?php echo e($science_area->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('science_area_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' => 'ScienceArea','title' => ''.e(trans('global.add')).'','name' => 'name','label' => ''.e(trans('cruds.scienceArea.fields.name')).'','route' => ''.e(route('admin.science-areas.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="science_areas" class="btn btn-outline-primary ms-2" id="openScienceAreaModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('science_areas')): ?>
<span class="text-danger"><?php echo e($errors->first('science_areas')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.science_area_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="sciencedirections"><?php echo e(trans('cruds.scienceActivity.fields.sciencedirection')); ?></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('sciencedirections') ? 'is-invalid' : ''); ?>" name="sciencedirections[]" id="sciencedirections" multiple>
<?php $__currentLoopData = $sciencedirections; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $sciencedirection): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('sciencedirections', [])) ? 'selected' : ''); ?>><?php echo e($sciencedirection); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('science_direction_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' => 'ScienceDirection','title' => ''.e(trans('global.add')).'','name' => 'name','label' => ''.e(trans('cruds.scienceDirection.fields.name')).'','route' => ''.e(route('admin.science-directions.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="sciencedirections" class="btn btn-outline-primary ms-2" id="openScienceDirectionModal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('sciencedirections')): ?>
<span class="text-danger"><?php echo e($errors->first('sciencedirections')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.sciencedirection_helper')); ?></span>
</div>
</div>
<div class="form-group">
<div class="form-check <?php echo e($errors->has('is_financed') ? 'is-invalid' : ''); ?>">
<input type="hidden" name="is_financed" value="0">
<input class="form-check-input" type="checkbox" name="is_financed" id="is_financed" value="1" <?php echo e(old('is_financed', 0) == 1 ? 'checked' : ''); ?>>
<label class="form-check-label" for="is_financed"><?php echo e(trans('cruds.scienceActivity.fields.is_financed')); ?></label>
</div>
<?php if($errors->has('is_financed')): ?>
<span class="text-danger"><?php echo e($errors->first('is_financed')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.is_financed_helper')); ?></span>
</div>
<div class="form-group">
<label for="description"><?php echo e(trans('cruds.scienceActivity.fields.description')); ?></label>
<textarea class="form-control ckeditor <?php echo e($errors->has('description') ? 'is-invalid' : ''); ?>" name="description" id="description"><?php echo 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.scienceActivity.fields.description_helper')); ?></span>
</div>
<div class="form-group">
<label class="required" for="value"><?php echo e(trans('cruds.scienceActivity.fields.value')); ?></label>
<input class="form-control <?php echo e($errors->has('value') ? 'is-invalid' : ''); ?>" type="number" name="value" id="value" value="<?php echo e(old('value', '0')); ?>" step="0.01" required>
<?php if($errors->has('value')): ?>
<span class="text-danger"><?php echo e($errors->first('value')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.value_helper')); ?></span>
</div>
<div class="form-group">
<label class="required" for="accountabledepartments"><?php echo e(trans('cruds.scienceActivity.fields.accountabledepartment')); ?></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('accountabledepartments') ? 'is-invalid' : ''); ?>" name="accountabledepartments[]" id="accountabledepartmentss" multiple required>
<?php $__currentLoopData = $accountabledepartments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $accountabledepartment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('accountabledepartments', [])) ? 'selected' : ''); ?>><?php echo e($accountabledepartment); ?></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' => 'Department1','name' => 'name','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="accountabledepartmentss" class="btn btn-outline-primary ms-2" id="openDepartment1Modal">
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('accountabledepartments')): ?>
<span class="text-danger"><?php echo e($errors->first('accountabledepartments')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.accountabledepartment_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label for="accountablesubsections"><?php echo e(trans('cruds.scienceActivity.fields.accountablesubsection')); ?></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('accountablesubsections') ? 'is-invalid' : ''); ?>" name="accountablesubsections[]" id="accountablesubsections" multiple>
<?php $__currentLoopData = $accountablesubsections; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $accountablesubsection): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('accountablesubsections', [])) ? 'selected' : ''); ?>><?php echo e($accountablesubsection); ?></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.create'), 'useModal' => false, 'nameModal' => true, 'modalBtn' => true], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<button class="btn btn-outline-primary ms-2" data-select-id="accountablesubsections" id="openDepartmentSubsectionModal" >
<i class="fa fa-plus"></i>
</button>
<?php endif; ?>
<?php endif; ?>
<?php if($errors->has('accountablesubsections')): ?>
<span class="text-danger"><?php echo e($errors->first('accountablesubsections')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.accountablesubsection_helper')); ?></span>
</div>
</div>
<div class="form-group">
<label class="required" for="accountablepersonkks"><?php echo e(trans('cruds.scienceActivity.fields.accountablepersonkk')); ?></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>
<select class="form-control select2 <?php echo e($errors->has('accountablepersonkks') ? 'is-invalid' : ''); ?>" name="accountablepersonkks[]" id="accountablepersonkks" multiple required>
<?php $__currentLoopData = $accountablepersonkks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $accountablepersonkk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($id); ?>" <?php echo e(in_array($id, old('accountablepersonkks', [])) ? 'selected' : ''); ?>><?php echo e($accountablepersonkk); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if($errors->has('accountablepersonkks')): ?>
<span class="text-danger"><?php echo e($errors->first('accountablepersonkks')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.accountablepersonkk_helper')); ?></span>
</div>
<div class="form-group">
<label for="other_accountable"><?php echo e(trans('cruds.scienceActivity.fields.other_accountable')); ?></label>
<input class="form-control <?php echo e($errors->has('other_accountable') ? 'is-invalid' : ''); ?>" type="text" name="other_accountable" id="other_accountable" value="<?php echo e(old('other_accountable', '')); ?>">
<?php if($errors->has('other_accountable')): ?>
<span class="text-danger"><?php echo e($errors->first('other_accountable')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.other_accountable_helper')); ?></span>
</div>
<div class="form-group">
<label for="other_accountable_contact"><?php echo e(trans('cruds.scienceActivity.fields.other_accountable_contact')); ?></label>
<textarea class="form-control <?php echo e($errors->has('other_accountable_contact') ? 'is-invalid' : ''); ?>" name="other_accountable_contact" id="other_accountable_contact"><?php echo e(old('other_accountable_contact')); ?></textarea>
<?php if($errors->has('other_accountable_contact')): ?>
<span class="text-danger"><?php echo e($errors->first('other_accountable_contact')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.other_accountable_contact_helper')); ?></span>
</div>
<div class="form-group">
<label><?php echo e(trans('cruds.scienceActivity.fields.state')); ?></label>
<select class="form-control <?php echo e($errors->has('state') ? 'is-invalid' : ''); ?>" name="state" id="state">
<option value disabled <?php echo e(old('state', null) === null ? 'selected' : ''); ?>><?php echo e(trans('global.pleaseSelect')); ?></option>
<?php $__currentLoopData = App\Models\ScienceActivity::STATE_SELECT; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($key); ?>" <?php echo e(old('state', 'not_started') === (string) $key ? 'selected' : ''); ?>><?php echo e($label); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if($errors->has('state')): ?>
<span class="text-danger"><?php echo e($errors->first('state')); ?></span>
<?php endif; ?>
<span class="help-block"><?php echo e(trans('cruds.scienceActivity.fields.state_helper')); ?></span>
</div>
<div class="form-group">
<label for="attachments"><?php echo e(trans('cruds.scienceActivity.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.scienceActivity.fields.attachments_helper')); ?></span>
</div>
<script>
$(document).ready(function () {
const modalId = "#<?php echo e($compName); ?>Modal";
function initializeCKEditor() {
$(modalId)
.find('.ckeditor')
.each(function () {
if (!this.ckeditorInstance) {
ClassicEditor.create(this, {
extraPlugins: [SimpleUploadAdapter],
}).then(editor => {
this.ckeditorInstance = editor;
});
}
});
}
function destroyCKEditor() {
$(modalId)
.find('.ckeditor')
.each(function () {
if (this.ckeditorInstance) {
this.ckeditorInstance.destroy();
this.ckeditorInstance = null;
}
});
}
function SimpleUploadAdapter(editor) {
editor.plugins.get('FileRepository').createUploadAdapter = function (loader) {
return {
upload: function () {
return loader.file.then(function (file) {
return new Promise(function (resolve, reject) {
const xhr = new XMLHttpRequest();
xhr.open('POST', '<?php echo e(route('admin.science-activities.storeCKEditorImages')); ?>', true);
xhr.setRequestHeader('x-csrf-token', window._token);
xhr.responseType = 'json';
xhr.addEventListener('load', function () {
const response = xhr.response;
if (!response || xhr.status !== 201) {
reject(response.message || 'Upload failed');
} else {
$(modalId).append(
`<input type="hidden" name="ck-media[]" value="${response.id}">`
);
resolve({ default: response.url });
}
});
xhr.addEventListener('error', () => reject('Upload failed'));
xhr.addEventListener('abort', () => reject('Upload aborted'));
const data = new FormData();
data.append('upload', file);
data.append('crud_id', '<?php echo e($futureActivityPlanning->id ?? 0); ?>');
xhr.send(data);
});
});
},
};
};
}
$(modalId).on('dialogopen', function () {
destroyCKEditor();
initializeCKEditor();
});
$(modalId).on('dialogclose', function () {
destroyCKEditor();
});
});
// $(document).ready(function () {
// function SimpleUploadAdapter(editor) {
// editor.plugins.get('FileRepository').createUploadAdapter = function(loader) {
// return {
// upload: function() {
// return loader.file
// .then(function (file) {
// return new Promise(function(resolve, reject) {
// // Init request
// var xhr = new XMLHttpRequest();
// xhr.open('POST', '<?php echo e(route('admin.science-activities.storeCKEditorImages')); ?>', true);
// xhr.setRequestHeader('x-csrf-token', window._token);
// xhr.setRequestHeader('Accept', 'application/json');
// xhr.responseType = 'json';
// // Init listeners
// var genericErrorText = `Couldn't upload file: ${ file.name }.`;
// xhr.addEventListener('error', function() { reject(genericErrorText) });
// xhr.addEventListener('abort', function() { reject() });
// xhr.addEventListener('load', function() {
// var response = xhr.response;
// if (!response || xhr.status !== 201) {
// return reject(response && response.message ? `${genericErrorText}\n${xhr.status} ${response.message}` : `${genericErrorText}\n ${xhr.status} ${xhr.statusText}`);
// }
// $('form').append('<input type="hidden" name="ck-media[]" value="' + response.id + '">');
// resolve({ default: response.url });
// });
// if (xhr.upload) {
// xhr.upload.addEventListener('progress', function(e) {
// if (e.lengthComputable) {
// loader.uploadTotal = e.total;
// loader.uploaded = e.loaded;
// }
// });
// }
// // Send request
// var data = new FormData();
// data.append('upload', file);
// data.append('crud_id', '<?php echo e($scienceActivity->id ?? 0); ?>');
// xhr.send(data);
// });
// })
// }
// };
// }
// }
// var allEditors = document.querySelectorAll('.ckeditor');
// for (var i = 0; i < allEditors.length; ++i) {
// ClassicEditor.create(
// allEditors[i], {
// extraPlugins: [SimpleUploadAdapter]
// }
// );
// }
// });
</script>
<script>
// var uploadedAttachmentsMap = {}
// Dropzone.options.attachmentsDropzone = {
// url: '<?php echo e(route('admin.science-activities.storeMedia')); ?>',
// maxFilesize: 10, // MB
// addRemoveLinks: true,
// headers: {
// 'X-CSRF-TOKEN': "<?php echo e(csrf_token()); ?>"
// },
// params: {
// size: 10
// },
// success: function (file, response) {
// $('form').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]
// }
// $('form').find('input[name="attachments[]"][value="' + name + '"]').remove()
// },
// init: function () {
// <?php if(isset($scienceActivity) && $scienceActivity->attachments): ?>
// var files =
// <?php echo json_encode($scienceActivity->attachments); ?>
// for (var i in files) {
// var file = files[i]
// this.options.addedfile.call(this, file)
// file.previewElement.classList.add('dz-complete')
// $('form').append('<input type="hidden" name="attachments[]" value="' + file.file_name + '">')
// }
// <?php endif; ?>
// },
// error: function (file, response) {
// if ($.type(response) === 'string') {
// var message = response //dropzone sends it's own error messages in string
// } else {
// var message = response.errors.file
// }
// file.previewElement.classList.add('dz-error')
// _ref = file.previewElement.querySelectorAll('[data-dz-errormessage]')
// _results = []
// for (_i = 0, _len = _ref.length; _i < _len; _i++) {
// node = _ref[_i]
// _results.push(node.textContent = message)
// }
// return _results
// }
// }
$(document).ready(function() {
var uploadedAttachmentsMap = {};
const modalId = "#<?php echo e($compName); ?>Modal";
var myDropzone = new Dropzone("#attachments-dropzone", {
url: '<?php echo e(route('admin.science-activities.storeMedia')); ?>',
maxFilesize: 10, // MB
addRemoveLinks: true,
headers: {
'X-CSRF-TOKEN': "<?php echo e(csrf_token()); ?>"
},
params: {
size: 20
},
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/scienceActivities/science-activities-fields.blade.php ENDPATH**/ ?>