@if ($competition->id)
{!! Form::model($competition, ['route' => ['admin.competitions.update', $competition],
'method' => 'PUT',
'id' => 'competition-update-form',
'data-competition-id' => $competition->id,
]) !!}
@else
{!! Form::model($competition, ['route' => ['admin.competitions.store'], 'method' => 'POST']) !!}
@endif
{{-- Name --}}
{{ Form::label('name', __('Name'), ['class' => 'col-form-label']) }}
{!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => __('Name')]) !!}
{{-- program --}}
{{ Form::label('program_id', __('Program'), ['class' => 'col-form-label']) }}
@if(@$hasPayment)
@endif
{!! Form::select('program_id', $programs ?? [], $competition->program_id, [
'class' => 'form-select', 'data-kt-select2' => 'true',
'data-remote' => route('resource-select', ['Program']),
'id' => 'competition-program-selected-id',
'data-placeholder' => __('Select Program'),
'data-allow-clear' => 'true',
'disabled' => @$hasPayment
]) !!}
{{-- currency --}}
{{ Form::label('currency', __('Currency'), ['class' => 'col-form-label']) }}
@if(@$hasPayment)
@endif
{!! Form::select('currency', $currency ?? [], $competition->currency, [
'data-placeholder' => 'Select Currency',
'class' => 'form-select', 'data-kt-select2' => 'true',
'data-remote' => route('resource-select', ['Currency']),
'data-allow-clear' => 'true',
'data-default' => $defaultCurrency,
'disabled' => @$hasPayment
])!!}
{{-- amount --}}
{{ Form::label('amount', __('Competition Amount'), ['class' => 'col-form-label']) }}
{!! Form::number('amount', null, ['class' => 'form-control', 'placeholder' => __('0.00')]) !!}
{{-- start date --}}
{{ Form::label('start_date', __('Start Date'), ['class' => 'col-form-label']) }}
{!! Form::date('start_date', $competition->start_date, ['class' => 'form-control flatpickr', 'placeholder' => __('Start Date'), 'x-model' => 'cal_start_date']) !!}
{{-- end date --}}
{{ Form::label('end_date', __('End Date'), ['class' => 'col-form-label']) }}
{!! Form::date('end_date', $competition->end_date, ['class' => 'form-control flatpickr', 'placeholder' => __('End Date'), 'x-model' => 'cal_end_date']) !!}
{!! Form::close() !!}