@using TravelCompanyContracts.ViewModels.TouristViewModels

@model TravelViewModel

@{
    ViewData["Title"] = "Privacy Policy";
}
<div class="text-center">
    <h2 class="display-4">Путешествие</h2>
</div>
<form method="post" style="margin-top:50px">
    <div class="row">
        <div class="col-4"></div>
        <div class="col-2">Название:</div>
        <div class="col-4"><input type="text" name="travelname" value="@Model.TravelName" /></div>
    </div>
    <div class="row">
        <div class="col-4"></div>
        <div class="col-2">Начало путешествия:</div>
        <div class="col-4">
            <input type="date" class="form-control" name="datestart" value="@Model.DateStart.ToString("yyyy-MM-dd")" />
        </div>
    </div>
    <div class="row">
        <div class="col-4"></div>
        <div class="col-2">Описание путешествия:</div>
        <div class="col-4"><input type="text" name="description" value="@Model.TravelDescription" /></div>
    </div>
    <div class="row">
        <div class="col-4"></div>
        <div class="col-2">Туры:</div>
        <div class="col-4">
            <select name="tourselect" class="form-control" multiple size="4" id="tourselect">
                @foreach (var tour in ViewBag.Tours)
                {
                    var isSelected = Model.TourTravels.Any(x => x.Key == tour.Id);
                    <option value="@tour.Id" selected="@isSelected">@tour.TourName</option>
                }
            </select>
        </div>
    </div>
    <div class="row">
        <div class="col-4"></div>
        <div class="col-2">Экскурсии:</div>
        <div class="col-4">
            <ul>
                @foreach (var exc in Model.ExcursionTravels)
                {
                    <li> @exc.Value.ExcursionName</li>
                }
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-8"></div>
        <div class="col-4"><input type="submit" value="Сохранить" class="btn btn-primary" style="margin-top:20px"/></div>
    </div>
</form>