@model PerformerProfile 
@{ ViewData["Title"] = "Your performer profile"; } 
@section header {
<style>
    #map {
        width: 100%;
        height: 250px;
    }
</style>
}

<h2>@ViewData["Title"]</h2>

@Html.DisplayFor(model => model)

<form id="FrmSetAct" asp-controller="Manage" asp-action="SetActivity" method="post" class="form-horizontal" role="form">
    <h4>Setup below your activity parameters:</h4>
    <hr />
    <div asp-validation-summary="All" class="text-danger" id="valsum"></div>
    
    <div class="form-group">
        <label asp-for="AcceptNotifications" class="col-md-2 control-label">
            AcceptNotifications"]
        </label>
        <div class="col-md-10">
            <input asp-for="AcceptNotifications" class="form-control" />
            <span asp-validation-for="AcceptNotifications" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="AcceptPublicContact" class="col-md-2 control-label">AcceptPublicContact</label>
        <div class="col-md-10">
            <input asp-for="AcceptPublicContact" class="form-control" />

            <span asp-validation-for="AcceptPublicContact" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="UseGeoLocalizationToReduceDistanceWithClients" class="col-md-2 control-label">
            UseGeoLocalizationToReduceDistanceWithClients"]
        </label>
        <div class="col-md-10">
            <input asp-for="UseGeoLocalizationToReduceDistanceWithClients" class="form-control" />

            <span asp-validation-for="UseGeoLocalizationToReduceDistanceWithClients" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="WebSite" class="col-md-2 control-label">WebSite</label>
        <div class="col-md-10">
            <input asp-for="WebSite" class="form-control" />

            <span asp-validation-for="WebSite" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="MinDailyCost" class="col-md-2 control-label">MinDailyCost</label>
        <div class="col-md-10">
            <input asp-for="MinDailyCost" class="form-control" />

            <span asp-validation-for="MinDailyCost" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="MaxDailyCost" class="col-md-2 control-label">MaxDailyCost</label>
        <div class="col-md-10">
            <input asp-for="MaxDailyCost" class="form-control" />

            <span asp-validation-for="MaxDailyCost" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="Active" class="col-md-2 control-label">ActivateMyProSettings</label>
        <div class="col-md-10">
            <input asp-for="Active" class="form-control" />

            <span asp-validation-for="Active" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="SIREN" class="col-md-2 control-label">SIREN</label>
        <div class="col-md-10">
            <input asp-for="SIREN" class="form-control" />

            <span asp-validation-for="SIREN" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group">

        <label asp-for="OrganizationAddress.Address" class="col-md-2 control-label">Address</label>
        <div class="col-md-10">
            <input asp-for="OrganizationAddress.Address" class="form-control" type="text" />

            <span id="AddressError" asp-validation-for="OrganizationAddress.Address" class="text-danger"></span>
            <ul id="LocationCombo" >
            </ul>
           <div id="map" class="map" data-val="valloc" data-addr="OrganizationAddress_Address" data-loccombo="loccomb" data-lat="OrganizationAddress_Latitude" data-lon="OrganizationAddress_Longitude" data-val-slat="@Model.OrganizationAddress.Latitude" data-val-slon="@Model.OrganizationAddress.Longitude" ></div>

        </div>
    </div>
    @Html.Hidden("OrganizationAddress.Latitude") 
    @Html.Hidden("OrganizationAddress.Longitude") 
    @Html.Hidden("PerformerId")
    <button type="submit" class="btn btn-default">Save these settings</button>

</form>

<a asp-controller="InstrumentRating" asp-action="Index">Instrumentation</a>

<form asp-controller="Manage" asp-action="UnsetActivity" method="post" class="form-horizontal" role="form">
    @Html.Hidden("PerfomerId")
    <button type="submit" class="btn btn-default">UnsetActivity</button>
</form>
@section scripts { 
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
@{ await Html.RenderPartialAsync("_MapScriptsPartial"); }
<script>
    $(document).ready(function(){
    $("#OrganizationAddress_Address").googlegeocode({
        culture: '@System.Globalization.CultureInfo.CurrentCulture.Name',
        mapsApiKey: '@Startup.GoogleSettings.BrowserApiKey',
        mapId: 'map',
        longId: 'OrganizationAddress_Longitude',
        latId: 'OrganizationAddress_Latitude',
        addrValidationId: 'AddressError',
        formValidId: 'ValidationSummary',
        locComboId: 'LocationCombo'})
    })
</script>
}
