87 lines
2.6 KiB
Plaintext
87 lines
2.6 KiB
Plaintext
@{
|
|
ViewData["Title"] = "UpdateConference";
|
|
}
|
|
<style>
|
|
.text-center {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.general_style {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.button_action {
|
|
display: flex;
|
|
background-color: #5a9ad6;
|
|
}
|
|
|
|
.button_action:hover {
|
|
background-color: #225df2;
|
|
color: white;
|
|
}
|
|
|
|
input {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.spisok {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
</style>
|
|
<div class="text-center">
|
|
<h2 class="u-text u-text-custom-color-1 u-text-default u-text-1">Обновить конференцию</h2>
|
|
</div>
|
|
<form method="post">
|
|
<div class="spisok">
|
|
<label class="u-label u-text-custom-color-1 u-label-1">Конференции: </label>
|
|
<select id="conference" name="conference" class="form-control" asp-items="@(new SelectList(@ViewBag.Conferences, "Id", "ConferenceName"))"></select>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" name="conferenceName" placeholder="Введите название конференции" class="form-control" />
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" name="subject" placeholder="Введите тематику конференции" class="form-control" />
|
|
</div>
|
|
<div class="form-control">
|
|
<label class="form-control">Начало</label>
|
|
<input type="datetime-local"
|
|
placeholder="Выберите дату начала"
|
|
name="startDate"
|
|
class="form-control" />
|
|
</div>
|
|
<div class="general_style">
|
|
<div class="button">
|
|
<button class="btn button_action">Сохранить</button>
|
|
</div>
|
|
<div class="button">
|
|
<a asp-area="" asp-controller="Home" asp-action="Conferences" class="btn button_action">Назад</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
@section Scripts
|
|
{
|
|
<script>
|
|
function check() {
|
|
var conference = $('#conference').val();
|
|
if (conference {
|
|
$.ajax({
|
|
method: "GET",
|
|
url: "/Home/GetConference",
|
|
data: { conferenceId: conference },
|
|
success: function (result) {
|
|
$('#conferenceName').val(result.ConferenceName);
|
|
$('#subject').val(result.Subject);
|
|
$('#startDate').val(result.StartDate);
|
|
}
|
|
});
|
|
};
|
|
}
|
|
check();
|
|
$('#conference').on('change', function () {
|
|
check();
|
|
});
|
|
</script>
|
|
} |