81 lines
4.0 KiB
Plaintext
81 lines
4.0 KiB
Plaintext
@using CandidateReviewContracts.ViewModels
|
|
@using CandidateReviewDataModels.Enums
|
|
@model ResumeViewModel
|
|
|
|
@{
|
|
var title = Model.Id <= 0 ? "Создать резюме" : "Редактировать резюме";
|
|
}
|
|
|
|
|
|
<div class="container">
|
|
<h1>@title</h1>
|
|
<form method="post" class="row g-3 needs-validation" novalidate>
|
|
<input type="hidden" name="id" value="@Model?.Id" />
|
|
<input type="hidden" name="vacancyId" value="@Model?.VacancyId" />
|
|
<input type="hidden" name="userId" value="@Model?.UserId" />
|
|
|
|
<div class="col-md-6">
|
|
<label for="Title" class="form-label">Название резюме <span class="text-danger">*</span></label>
|
|
<input type="text" class="form-control" id="JobTitle" name="Title" value="@Model?.Title" required placeholder="Введите название резюме">
|
|
<div class="invalid-feedback">Пожалуйста, введите название резюме.</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<label for="experience" class="form-label">Опыт работы <span class="text-danger">*</span></label>
|
|
<textarea class="form-control" id="experience" name="experience" rows="3" placeholder="Внесите ваш опыт работы">@Model?.Experience</textarea>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<label for="Education" class="form-label">Образование <span class="text-danger">*</span></label>
|
|
<textarea class="form-control" id="Education" name="Education" rows="3" placeholder="Внесите ваше образование">@Model?.Education</textarea>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<label for="Skills" class="form-label">Навыки <span class="text-danger">*</span></label>
|
|
<textarea class="form-control" id="skills" name="Skills" rows="3" placeholder="Перечислите ваши навыки">@Model?.Skills</textarea>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<label for="description" class="form-label">Описание</label>
|
|
<input type="text" class="form-control" id="description" name="description" value="@Model?.Description" placeholder="Введите описание резюме">
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="PhotoFilePath" class="form-label">Ваше фото для текущего резюме</label>
|
|
<input type="file" class="form-control" id="PhotoFilePath" name="PhotoFilePath" accept=".jpg,.jpeg,.png" />
|
|
<img id="avatarPreview" src="@Model?.PhotoFilePath" alt="Предварительный просмотр фото" style="max-width: 100px; max-height: 100px;" />
|
|
<div class="invalid-feedback">Выберите файл изображения.</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
@if (Model.Status == ResumeStatusEnum.Черновик)
|
|
{
|
|
<button type="submit" class="btn btn-primary" name="isDraft" value="false">Сохранить и отправить на оценку</button>
|
|
}
|
|
@if (Model.Id <= 0)
|
|
{
|
|
<button type="submit" formmethod="post" class="btn btn-secondary" name="isDraft" value="true">Сохранить черновик</button>
|
|
}
|
|
<button class="btn btn-secondary" onclick="window.history.back();">Назад</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
(function () {
|
|
'use strict'
|
|
|
|
var forms = document.querySelectorAll('.needs-validation')
|
|
|
|
Array.prototype.slice.call(forms)
|
|
.forEach(function (form) {
|
|
form.addEventListener('submit', function (event) {
|
|
if (!form.checkValidity()) {
|
|
event.preventDefault()
|
|
event.stopPropagation()
|
|
}
|
|
|
|
form.classList.add('was-validated')
|
|
}, false)
|
|
})
|
|
})()
|
|
</script> |