svoydom/resources/views/admin/project/_form.blade.php

113 lines
4.7 KiB
PHP
Raw Normal View History

2023-05-17 09:57:20 +03:00
<div class="mb-3">
<label class="form-label">id Региона</label>
2023-05-17 10:32:43 +03:00
<select class="form-select" name="region_id">
2023-05-17 09:57:20 +03:00
<option>Выбрать регион</option>
@foreach($regions as $region)
<option value="{{$region->id}}" {{isset($project) && $project->region_id == $region->id ? 'selected' : ''}}>{{$region->id}}</option>
@endforeach
</select>
</div>
<div class="mb-3">
<label class="form-label">Кол-во квартир:</label>
<input type="number" name="apartments" class="form-control" placeholder="Кол-во квартир"
value="{{$project->apartments ?? ''}}">
@error('apartments')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Кол-во этажей:</label>
<input type="number" name="floors" class="form-control" placeholder="Кол-во этажей"
value="{{$project->floors ?? ''}}">
@error('floors')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Картинка карточки:</label>
<input type="file" name="card_image" class="form-control" placeholder="Картинка карточки"
2023-05-17 10:32:43 +03:00
value="{{$project->card_image ?? ''}}"><img src="{{'/uploads/images/'.$project->card_image ?? ''}}"></span>
2023-05-17 09:57:20 +03:00
@error('card_image')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Фоновая картинка:</label>
<input type="file" name="background_image" class="form-control" placeholder="Фоновая картинка"
2023-05-17 10:32:43 +03:00
value="{{$project->background_image ?? ''}}">
2023-05-17 09:57:20 +03:00
@error('background_image')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Логотип:</label>
<input type="file" name="logo" class="form-control" placeholder="Логотип"
2023-05-17 10:32:43 +03:00
value="{{$project->logo ?? ''}}">
2023-05-17 09:57:20 +03:00
@error('logo')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Статус проекта:</label>
<input type="text" name="status" class="form-control" placeholder="Статус проекта" value="{{$project->status ?? '1'}}">
@error('status')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">3d-тур-1:</label>
<input type="text" name="3d_tour_one" class="form-control" placeholder="3d-тур-1"
value="{{isset($project) ? $project->getAttribute('3d_tour_one') : ''}}">
@error('3d_tour_one')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">3d-тур-2:</label>
<input type="text" name="3d_tour_two" class="form-control" placeholder="3d-тур-2"
value="{{isset($project) ? $project->getAttribute('3d_tour_two') : ''}}">
@error('3d_tour_two')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Фото двора:</label>
<input type="file" name="yard_image" class="form-control" placeholder="Фото двора"
2023-05-17 10:32:43 +03:00
value="{{$project->yard_image ?? ''}}">
2023-05-17 09:57:20 +03:00
@error('yard_image')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Фото вестибюля:</label>
<input type="file" name="hall_image" class="form-control" placeholder="Фото вестибюля"
2023-05-17 10:32:43 +03:00
value="{{$project->hall_image ?? ''}}">
2023-05-17 09:57:20 +03:00
@error('hall_image')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Местонахождение:</label>
<input type="text" name="location" class="form-control" placeholder="Местонахождение" value="{{$project->location ?? ''}}">
@error('location')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">slug:</label>
<input type="text" name="slug" class="form-control" placeholder="Slug" value="{{$project->slug ?? ''}}">
@error('slug')
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
@enderror
</div>
<div class="d-flex justify-content-between">
<button type="submit" class="btn btn-primary me-2">
@isset($project)
Обновить
@else
Сохранить
@endisset
</button>
</div>