fixes GMaps usage & Command creation
This commit is contained in:
@ -1,27 +1,18 @@
|
||||
@model RdvQuery
|
||||
@{ ViewData["Title"] = $"Proposition de rendez-vous à {Model.PerformerProfile.Performer.UserName} [{ViewBag.Activity.Name}]"; }
|
||||
@section scripts {
|
||||
@model RdvQuery
|
||||
@section header {
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
|
||||
<style>
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('#datetimepicker2').datetimepicker({
|
||||
locale: 'fr',
|
||||
format: "YYYY/MM/DD HH:mm"
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
@{ ViewData["Title"] = $"Proposition de rendez-vous à {Model.PerformerProfile.Performer.UserName} [{ViewBag.Activity.Name}]"; }
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
<form asp-action="Create" method="post">
|
||||
<div class="form-horizontal">
|
||||
@ -30,7 +21,7 @@
|
||||
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
|
||||
<div class="form-group" has-feedback>
|
||||
<fieldset>
|
||||
<legend>Votre évennement</legend>
|
||||
<legend>La date de votre évennement</legend>
|
||||
<label for="EventDate" class="col-md-2 control-label">
|
||||
Date de l'évennement
|
||||
</label>
|
||||
@ -41,80 +32,83 @@
|
||||
<div class='input-group date' id='datetimepicker2'>
|
||||
<input class="form-control" name="EventDate" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span asp-validation-for="EventDate" class="text-danger">
|
||||
</span>
|
||||
<span asp-validation-for="EventDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="Location_Address" class="col-md-2 control-label">
|
||||
Lieu
|
||||
|
||||
<div class="form-group">
|
||||
<fieldset>
|
||||
<label asp-for="Location.Address" class="col-md-2 control-label">@SR["Address"]</label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Location.Address" class="form-control" type="text" data-val-required="Spécifier un lieu" />
|
||||
|
||||
<span id="AddressError" asp-validation-for="Location.Address" class="text-danger"></span>
|
||||
<ul id="LocationCombo" >
|
||||
</ul>
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<fieldset>
|
||||
<label asp-for="Reason" class="col-md-2 control-label">
|
||||
Donnez ici une raison à cette demande
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div >
|
||||
<input asp-for="Location.Address" type="text" name="Location.Address" id="Location_Address" class="form-control"
|
||||
data-val-required="Spécifier un lieu" >
|
||||
<span asp-validation-for="Location.Address" class="text-danger"></span>
|
||||
<ul id="loccomb">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" class="map" data-val="valloc" data-addr="Location_Address" data-loccombo="loccomb" data-lat="Location_Latitude" data-lon="Location_Longitude" ></div>
|
||||
|
||||
</div>
|
||||
<label asp-for="Reason" class="col-md-2 control-label">
|
||||
Donnez ici une raison à cette demande
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div id='reason1'>
|
||||
<textarea rows="15" asp-for="Reason" type="text" name="Reason" id="Reason" maxlength="4096" class="form-control"></textarea>
|
||||
<span asp-validation-for="Reason" class="text-danger"></span>
|
||||
|
||||
<dl>
|
||||
<dt>@SR["Coordonées GPS"]
|
||||
</dt>
|
||||
<dd>
|
||||
<input class="text-box" id="Location_Latitude" name="Location.Latitude" type="text" value="@Model.Location.Latitude" readonly/>
|
||||
<input class="text-box" id="Location_Longitude" name="Location.Longitude" type="text" value="@Model.Location.Longitude" readonly/>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</div>
|
||||
<textarea rows="15" asp-for="Reason" type="text" name="Reason" id="Reason" maxlength="4096" class="form-control"></textarea>
|
||||
<span asp-validation-for="Reason" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" class="btn btn-default" value="Créer" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
|
||||
<input type="submit" class="btn btn-default" value="Créer" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@Html.HiddenFor(model=>model.ClientId)
|
||||
@Html.HiddenFor(model=>model.PerformerId)
|
||||
@Html.HiddenFor(model=>model.ActivityCode)
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@Html.HiddenFor(model=>model.ClientId)
|
||||
@Html.HiddenFor(model=>model.PerformerId)
|
||||
@Html.HiddenFor(model=>model.ActivityCode)
|
||||
@Html.HiddenFor(model=>model.Location.Latitude)
|
||||
@Html.Hidden("Location.Longitude")
|
||||
</form>
|
||||
|
||||
@section scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
@{ await Html.RenderPartialAsync("_MapScriptsPartial"); }
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#Location_Address").googlegeocode({
|
||||
culture: '@System.Globalization.CultureInfo.CurrentCulture.Name',
|
||||
mapsApiKey: '@Startup.GoogleSettings.BrowserApiKey',
|
||||
mapId: 'map',
|
||||
longId: 'Location_Longitude',
|
||||
latId: 'Location_Latitude',
|
||||
addrValidationId: 'AddressError',
|
||||
formValidId: 'ValidationSummary',
|
||||
locComboId: 'LocationCombo'});
|
||||
|
||||
$('#datetimepicker2').datetimepicker({
|
||||
locale: 'fr',
|
||||
format: "YYYY/MM/DD HH:mm"
|
||||
});
|
||||
})
|
||||
</script>
|
||||
}
|
Reference in New Issue
Block a user