Files
new_raffles/Modules/CCMS/resources/views/institution/add-institution-form.blade.php
2025-07-27 17:40:56 +05:45

43 lines
2.0 KiB
PHP

{{ html()->form('POST', route('institution.store'))->class('needs-validation')->attributes(['novalidate'])->open() }}
@isset($institution)
{{ html()->hidden('id', $institution->id) }}
@endisset
<div class="card-body">
<div class="row">
<div class="col-sm-12">
<div class="mb-3">
{{ html()->label('Title')->for('title') }}
{{ html()->span('*')->class('text-danger') }}
{{ html()->text('title')->value($institution->title ?? old('title'))->class('form-control')->placeholder('Enter Title')->required() }}
{{ html()->div('Please enter a title.')->class('invalid-feedback') }}
</div>
<div class="mb-3">
{{ html()->label('Link')->for('Link') }}
{{ html()->text('link')->value($institution->link ?? old('link'))->class('form-control')->placeholder('Enter Related Link') }}
</div>
<div class="mb-3">
{{ html()->label('Location')->for('Location') }}
{{ html()->text('location')->value($institution->location ?? old('location'))->class('form-control')->placeholder('Enter Insititution Location') }}
</div>
<div class="mb-3">
{{ html()->label('Image')->class('form-label')->for('image') }}
<x-image-input :editable="$editable" id="image" name="image" :data="$editable ? $institution->getRawOriginal('image') : null" :multiple="false" />
</div>
<div class="mb-3">
{{ html()->label('Country')->class('form-label')->for('country_id') }}
{{ html()->select('country_id', $countryOptions)->value($institution->country_id ?? old('country_id'))->class('form-select choices-select')->placeholder('Select') }}
</div>
</div>
<x-form-buttons :href="route('institution.index')" :label="isset($institution) ? 'Update' : 'Create'" />
</div>
</div>
{{ html()->form()->close() }}