79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
@{
|
|
ViewData["Title"] = "UpdateParticipant";
|
|
}
|
|
<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="participant" name="participant" class="form-control" asp-items="@(new SelectList(@ViewBag.Participants, "Id", "ParticipantFIO"))"></select>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" name="participantFIO" placeholder="Введите ФИО участника" class="form-control" />
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" name="number" placeholder="Введите номер телефона участника" class="form-control" />
|
|
</div>
|
|
<div class="general_style">
|
|
<div class="button">
|
|
<button class="btn button_action" type="submit">Сохранить</button>
|
|
</div>
|
|
<div class="button">
|
|
<a asp-area="" asp-controller="Home" asp-action="Participants" class="btn button_action">Назад</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
@section Scripts
|
|
{
|
|
<script>
|
|
function check() {
|
|
var member = $('#participant').val();
|
|
if (member) {
|
|
$.ajax({
|
|
method: "GET",
|
|
url: "/Home/GetParticipant",
|
|
data: { memberId: member },
|
|
success: function (result) {
|
|
$('#participantFIO').val(result.participantFIO);
|
|
$('#number').val(result.number);
|
|
}
|
|
});
|
|
};
|
|
}
|
|
check();
|
|
$('#participant').on('change', function () {
|
|
check();
|
|
});
|
|
</script>
|
|
} |