form.blade.php 19.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537
@csrf

@isset($house)
    @method('PUT')
@endisset

<label for="title">Заголовок офиса: <span class="req">*</span></label><br>
@error('title')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="title" placeholder="Название офиса"
       required maxlength="100" style="width: 80%" value="{{ old('title') ?? $house->title ?? '' }}"><br><br>

<label for="best">Лучшее предложение: </label><br>
@error('best')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="best" id="best" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->best == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->best == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="area_id">Объект недвижимости (ЖК): <span class="req">*</span></label><br>
@error('area_id')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="area_id" id="area_id" class="form-control">
    @foreach($areas as $area)
        <option value="{{ $area->id }}"
                @isset($house)
                @if($house->area_id == $area->id)
                selected
            @endif
            @endisset
        >{{ $area->name_area }}</option>
    @endforeach
</select><br><br>

<label for="type_area_id">Тип недвижимости: <span class="req">*</span></label><br>
@error('type_area_id')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="type_area_id" id="type_area_id" class="form-control">
    @foreach($type_areas as $tarea)
        <option value="{{ $tarea->id }}"
                @isset($house)
                @if($house->type_area_id == $tarea->id)
                selected
            @endif
            @endisset
        >{{ $tarea->name_type }}</option>
    @endforeach
</select><br><br>

<label for="format_area_id">Формат недвижимости: <span class="req">*</span></label><br>
@error('format_area_id')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="format_area_id" id="format_area_id" class="form-control">
    @foreach($format_areas as $farea)
        <option value="{{ $farea->id }}"
                @isset($house)
                @if($house->format_area_id == $farea->id)
                selected
            @endif
            @endisset
        >{{ $farea->name_format }}</option>
    @endforeach
</select><br><br>

<label for="metro">Метро: <span class="req">*</span></label><br>
@error('metro')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="metro" placeholder="Название метро"
       required maxlength="100" style="width: 80%" value="{{ old('metro') ?? $house->metro ?? '' }}"><br><br>

<label for="description_metro">Удаленность метро: </label><br>
@error('description_metro')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="description_metro" placeholder="Удаленность метро"
       required maxlength="100" style="width: 80%" value="{{ old('description_metro') ?? $house->description_metro ?? '' }}"><br><br>

<label for="address">Адрес: <span class="req">*</span></label><br>
@error('address')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="address" placeholder="Адрес"
       required maxlength="100" style="width: 80%" value="{{ old('address') ?? $house->address ?? '' }}"><br><br>

<label for="okrug">Округ: <span class="req">*</span></label><br>
@error('okrug')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="okrug" placeholder="Округ"
       required maxlength="100" style="width: 80%" value="{{ old('okrug') ?? $house->okrug ?? '' }}"><br><br>

<label for="foto_main">Файл-картинка:</label><br>
<input type="file" class="form-control-file txt" name="foto_main" id="foto_main" accept="image/png, image/jpeg"><br>

@isset($house->foto_main)
    <div class="form-group form-check">
        <img src="/storage/app/public/<?=$house->foto_main;//=asset(Storage::url($house->foto_main))?>" width="100px"/>
        <!--<input type="checkbox" class="form-check-input" name="remove" id="remove">
        <label class="form-check-label" for="remove">
            Удалить загруженное изображение
        </label>-->
    </div>
@endisset
<br>

<label for="articul_area">Артикул помещения: </label><br>
@error('articul_area')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="articul_area" placeholder="Артикул помещения"
       required maxlength="100" style="width: 80%" value="{{ old('articul_area') ?? $house->articul_area ?? '' }}"><br><br>

<label for="format_house">Формат помещения: <span class="req">*</span></label><br>
@error('format_house')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="format_house" id="format_house" class="form-control">
    <option value="Аренда"
            @isset($house)
              @if($house->format_house == 'Аренда')
               selected
              @endif
            @endisset
    >Аренда</option>
    <option value="Продажа"
            @isset($house)
            @if($house->format_house == 'Продажа')
            selected
        @endif
        @endisset
    >Продажа</option>
    <option value="Бизнес"
            @isset($house)
            @if($house->format_house == 'Бизнес')
            selected
        @endif
        @endisset
    >Бизнес</option>
    <option value="Арендованные"
            @isset($house)
            @if($house->format_house == 'Арендованные')
            selected
        @endif
        @endisset
    >Арендованные</option>
</select><br><br>

<label for="area">Площадь помещения: <span class="req">*</span></label><br>
@error('area')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="area" placeholder="Площадь помещения"
       required maxlength="100" style="width: 80%" value="{{ old('area') ?? $house->area ?? '' }}"><br><br>

<label for="floor">Этаж: </label><br>
@error('floor')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="floor" placeholder="Этаж"
       required maxlength="100" style="width: 80%" value="{{ old('floor') ?? $house->floor ?? '' }}"><br><br>

<label for="floor_bild">Этажность здания: </label><br>
@error('floor_bild')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="floor_bild" placeholder="Этажность здания"
       required maxlength="100" style="width: 80%" value="{{ old('floor_bild') ?? $house->floor_bild ?? '' }}"><br><br>

<label for="renter">Арендатор (поле только для аренды и арендованные): </label><br>
@error('renter')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="renter" placeholder="Арендатор"
       required maxlength="100" style="width: 80%" value="{{ old('renter') ?? $house->renter ?? '' }}"><br><br>

<label for="price">Цена (или аренда за месяц): </label><br>
@error('price')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="price" placeholder="Цена"
       required maxlength="100" style="width: 80%" value="{{ old('price') ?? $house->price ?? '' }}"><br><br>

<label for="price_m2">Цена за метр2: </label><br>
@error('price_m2')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="price_m2" placeholder="Цена за метр2"
       required maxlength="100" style="width: 80%" value="{{ old('price_m2') ?? $house->price_m2 ?? '' }}"><br><br>

<label for="rent_in_year">Аренда в год (поле только для аренды и арендованные): </label><br>
@error('rent_in_year')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="rent_in_year" placeholder="Аренда в год"
       required maxlength="100" style="width: 80%" value="{{ old('rent_in_year') ?? $house->rent_in_year ?? '' }}"><br><br>

<label for="description_house">Описание офиса: </label><br>
@error('description_house')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<textarea class="form-control_ txtarea ckeditor" name="description_house" placeholder="Описание офиса" required
          rows="10" style="width: 80%">{{ old('description_house') ?? $house->description_house ?? '' }}</textarea><br><br>

<label for="object_plan">План-объекта (картинка):</label><br>
<input type="file" class="form-control-file txt" name="object_plan" id="object_plan" accept="image/png, image/jpeg">

@isset($house->object_plan)
    <div class="form-group form-check">
        <img src="/storage/app/public/<?=$house->object_plan;//=asset(Storage::url($house->object_plan))?>" width="100px"/>
    </div>
@endisset
<br><br>

<label for="floor_plan">План-этажа (картинка):</label><br>
<input type="file" class="form-control-file txt" name="floor_plan" id="floor_plan" accept="image/png, image/jpeg">

@isset($house->floor_plan)
    <div class="form-group form-check">
        <img src="/storage/app/public/<?=$house->floor_plan;//=asset(Storage::url($house->floor_plan))?>" width="100px"/>
    </div>
@endisset
<br><br>

<label for="present">Презентация:</label><br>
<input type="file" class="form-control-file txt" name="present" id="present">

@isset($house->present)
    <div class="form-group form-check">
        <a href="/storage/app/public/<?=$house->present//asset(Storage::url($house->floor_plan))?>">Презентация</a>
    </div>
@endisset
<br><br>

<label for="unloading_area">Зона разгрузки: </label><br>
@error('unloading_area')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="unloading_area" id="unloading_area" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->unloading_area == '1')
            selected
        @endif
        @endisset
    >Есть</option>
    <option value="0"
            @isset($house)
            @if($house->unloading_area == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="electric_power">Электрическая мощность: </label><br>
@error('electric_power')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="electric_power" placeholder="Электрическая мощность"
       required maxlength="100" style="width: 80%" value="{{ old('electric_power') ?? $house->electric_power ?? '' }}"><br><br>

<label for="travel_card">Проездное место: </label><br>
@error('travel_card')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="travel_card" id="travel_card" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->travel_card == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->travel_card == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="passing_place">Проходное место: </label><br>
@error('passing_place')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="passing_place" id="passing_place" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->passing_place == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->passing_place == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="separate_input">Отдельный вход: </label><br>
@error('separate_input')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="separate_input" id="separate_input" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->separate_input == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->separate_input == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="shop_windows">Витрины: </label><br>
@error('shop_windows')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="shop_windows" id="shop_windows" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->shop_windows == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->shop_windows == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="place_advertising">Место для рекламы: </label><br>
@error('place_advertising')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="place_advertising" id="place_advertising" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->place_advertising == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->place_advertising == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="windows">Окна: </label><br>
@error('windows')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="windows" placeholder="Окна"
       required maxlength="100" style="width: 80%" value="{{ old('windows') ?? $house->windows ?? '' }}"><br><br>

<label for="hood">Вытяжка: </label><br>
@error('hood')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="hood" id="hood" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->hood == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->hood == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="central_heating">Центральное отопление: </label><br>
@error('central_heating')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="central_heating" id="central_heating" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->central_heating == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->central_heating == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="opening_hours">Возможные часы работы: </label><br>
@error('opening_hours')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="opening_hours" placeholder="Возможные часы работы"
       required maxlength="100" style="width: 80%" value="{{ old('opening_hours') ?? $house->opening_hours ?? '' }}"><br><br>

<label for="finishing">Отделка: </label><br>
@error('finishing')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="finishing" id="finishing" class="form-control">
    <option value="1"
            @isset($house)
            @if($house->finishing == '1')
            selected
        @endif
        @endisset
    >Да</option>
    <option value="0"
            @isset($house)
            @if($house->finishing == '0')
            selected
        @endif
        @endisset
    >Нет</option>
</select><br><br>

<label for="parking">Парковка (кол-во мест): </label><br>
@error('parking')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="parking" placeholder="Парковка"
       required maxlength="100" style="width: 80%" value="{{ old('parking') ?? $house->parking ?? '' }}"><br><br>

<label for="scheme_deal">Схема сделки: </label><br>
@error('scheme_deal')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input type="text" class="form-control_ txt" name="scheme_deal" placeholder="Схема сделки"
       required maxlength="100" style="width: 80%" value="{{ old('scheme_deal') ?? $house->scheme_deal ?? '' }}"><br><br>

<label for="coord_x">Координаты дома X: </label><br>
<input type="text" class="form-control_ txt" name="coord_x" placeholder="Координаты дома X"
       required maxlength="100" value="{{ old('coord_x') ?? $house->coord_x ?? '0' }}"><br><br>

<label for="coord_y">Координаты дома Y: </label><br>
<input type="text" class="form-control_ txt" name="coord_y" placeholder="Координаты дома Y"
       required maxlength="100" value="{{ old('coord_y') ?? $house->coord_y ?? '0' }}"><br><br>

<label for="sos_obj">Состояние объекта: </label><br>
@error('sos_obj')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="sos_obj" id="sos_obj" class="form-control">
    <option value="Рабочее"
            @isset($house)
            @if($house->sos_obj == 'Рабочее')
            selected
        @endif
        @endisset
    >Рабочее</option>
    <option value="Не рабочее"
            @isset($house)
            @if($house->sos_obj == 'Не рабочее')
            selected
        @endif
        @endisset
    >Не рабочее</option>
</select><br><br>

<label for="type_plan">Тип планировки: </label><br>
@error('type_plan')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<select name="type_plan" id="type_plan" class="form-control">
    <option value="Открытая"
            @isset($house)
            @if($house->type_plan == 'Открытая')
            selected
        @endif
        @endisset
    >Открытая</option>
    <option value="Закрытая"
            @isset($house)
            @if($house->type_plan == 'Закрытая')
            selected
        @endif
        @endisset
    >Закрытая</option>
</select><br><br>

<label for="description_2">Описание офиса дополнительно: </label><br>
@error('description_2')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<textarea class="form-control_ txtarea ckeditor" name="description_2" placeholder="Описание офиса дополнительно" required
          rows="10" style="width: 80%">{{ old('description_2') ?? $house->description_2 ?? '' }}</textarea><br><br>

<br>
<button type="submit" class="btn hero-search__btn btn--main">Сохранить</button>