1
0
mirror of https://github.com/chyzy/RSystem-MVC synced 2024-12-26 10:35:28 +01:00
RSystem-MVC-Fork/RSystem/Areas/Recruit/Views/Home/Data.cshtml

263 lines
15 KiB
Plaintext
Raw Normal View History

2018-04-17 11:20:49 +02:00

@using RSystem.Models
@model RSystem.ViewModels.RecruitDataViewModel
2018-04-17 16:52:46 +02:00
@using RSystem.App_LocalResources.Recruit.Data
2018-04-17 11:20:49 +02:00
@{
2018-04-17 16:52:46 +02:00
ViewBag.Title = Data.PersonalData;
2018-04-17 11:20:49 +02:00
}
@using (Html.BeginForm())
{
@Html.HiddenFor(m=>m.RecruitDataId)
@Html.AntiForgeryToken()
<div class="row py-20 ">
<div class="col-md-6 col-lg-4">
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.PersonalData</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.FirstName ,new { @class = "label-form required" })
@Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.SecondName, new { @class = "label-form" })
@Html.EditorFor(model => model.SecondName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.LastName, new { @class = "label-form required" })
@Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.Sex, new { @class = "label-form required" })
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.Sex, Sex.Female) @Data.Female</label>
2018-04-17 11:20:49 +02:00
</div>
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.Sex, Sex.Male) @Data.Male</label>
2018-04-17 11:20:49 +02:00
</div>
</div>
</div>
</section>
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.Parents</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.FathersName, new { @class = "label-form required" })
@Html.EditorFor(model => model.FathersName, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.MothersName, new { @class = "label-form required" })
@Html.EditorFor(model => model.MothersName, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</section>
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.DateAndPlaceOfBirth</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.DayOfBirth, new { @class = "label-form required" })
@Html.EditorFor(model => model.DayOfBirth, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.BirthCity, new { @class = "label-form required" })
@Html.EditorFor(model => model.BirthCity, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.BirthCountry, new { @class = "label-form required" })
@Html.DropDownListFor(model=>model.BirthCountry,Model.Countries ,new { @class = "form-control" } )
</div>
</div>
</section>
</div>
<div class="col-md-6 col-lg-4">
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.Identity</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.Citizenship, new { @class = "label-form required" })
@Html.EditorFor(model => model.Citizenship, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.DocumentType, new { @class = "label-form required" })
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.DocumentType, DocumentType.ID, new { id = "ID-Card" }) @Data.IDCard</label>
2018-04-17 11:20:49 +02:00
</div>
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.DocumentType, DocumentType.Passport, new { id = "Passport" }) @Data.Passport</label>
2018-04-17 11:20:49 +02:00
</div>
</div>
<div class="form-group">
2018-04-17 16:52:46 +02:00
@Html.LabelFor(model => model.DocumentNumber,Data.NumberOfIDCard ,new { @class = "label-form required", id="DocumentTypeId"})
2018-04-17 11:20:49 +02:00
@Html.EditorFor(model => model.DocumentNumber, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</section>
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.Disablility</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.IsDisabled, new { @class = "label-form required" })
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.IsDisabled,false) @Data.Yes</label>
2018-04-17 11:20:49 +02:00
</div>
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.IsDisabled, true) @Data.No</label>
2018-04-17 11:20:49 +02:00
</div>
</div>
</div>
</section>
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.Contact</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.Email, new { @class = "label-form required" })
@Html.EditorFor(model=>model.Email, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group">
@Html.LabelFor(model => model.Phone, new { @class = "label-form required" })
@Html.EditorFor(model => model.Phone, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</section>
</div>
<div class="col-md-6 col-lg-4">
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.Address</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.Street, new { @class = "label-form required" })
@Html.EditorFor(model => model.Street, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.House, new { @class = "label-form required" })
@Html.EditorFor(model => model.House, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.Flat, new { @class = "label-form" })
@Html.EditorFor(model => model.Flat, new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.City, new { @class = "label-form required" })
@Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control" } })
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.PostalCode, new { @class = "label-form required" })
@Html.EditorFor(model => model.PostalCode, new { htmlAttributes = new { @class = "form-control", PlaceHolder = "__-___" } })
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.Country, new { @class = "label-form required" })
@Html.DropDownListFor(model=>model.Country,Model.Countries ,new { @class = "form-control" } )
</div>
</div>
</div>
</section>
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.CorespondentAddress</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.CorespondentAdressSameAsResidence, new { @class = "label-form required" })
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.CorespondentAdressSameAsResidence, true, new { id = "SameAsResident" }) @Data.Yes</label>
2018-04-17 11:20:49 +02:00
</div>
<div class="radio-switch">
2018-04-17 16:52:46 +02:00
<label class="label-ratio">@Html.RadioButtonFor(model => model.CorespondentAdressSameAsResidence, false, new { id = "NotSameAsResident" }) @Data.No</label>
2018-04-17 11:20:49 +02:00
</div>
</div>
<div @if (Model.CorespondentAdressSameAsResidence)
{
<text>class="hidden" </text>
} id="corespondent-form">
<div class="form-group">
@Html.LabelFor(model => model.CorespondentStreet, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentStreet, new {htmlAttributes = new {@class = "form-control"}})
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentHouse, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentHouse, new {htmlAttributes = new {@class = "form-control"}})
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentFlat, new {@class = "label-form"})
@Html.EditorFor(model => model.CorespondentFlat, new {htmlAttributes = new {@class = "form-control"}})
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.CorespondentCity, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentCity, new {htmlAttributes = new {@class = "form-control"}})
</div>
<div class="row">
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentPostalCode, new {@class = "label-form required" })
@Html.EditorFor(model => model.CorespondentPostalCode, new {htmlAttributes = new {@class = "form-control", PlaceHolder = "__-___"}})
</div>
<div class="form-group col-md-6">
@Html.LabelFor(model => model.CorespondentCountry, new {@class = "label-form required" })
@Html.DropDownListFor(model=>model.CorespondentCountry,Model.Countries ,new { @class = "form-control" } )
</div>
</div>
</div>
</div>
</section>
<section class="form-section">
2018-04-17 16:52:46 +02:00
<header>@Data.Military</header>
2018-04-17 11:20:49 +02:00
<div class="p-20">
<div class="form-group">
@Html.LabelFor(model => model.MilitaryAttitude, new { @class = "label-form required" })
@Html.EnumDropDownListFor(model => model.MilitaryAttitude, new { @class = "form-control" })
</div>
</div>
</section>
</div>
<div class="row col-sm-12 text-center pt-20">
2018-04-17 16:52:46 +02:00
<input type="submit" class="submit-blue form-btn" value="@Data.Save"/>
@Html.ActionLink(Data.Cancel,"Index","Home",new {@class="form-cancel form-btn"})
2018-04-17 11:20:49 +02:00
</div>
</div>
}
@section DedicatedStyles
{
<link rel="stylesheet" href="~/Content/css/HomeData.css" />
}
@section scripts
{
<script>
$(document).ready(function() {
$('.required').prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("#ID-Card").click(function () {
var handler = $("#DocumentTypeId");
2018-04-17 16:52:46 +02:00
handler.text('@Data.NumberOfIDCard');
2018-04-17 11:20:49 +02:00
handler.prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("#Passport").click(function () {
var hander=$("#DocumentTypeId");
2018-04-17 16:52:46 +02:00
hander.text('@Data.NumberOfPass');
2018-04-17 11:20:49 +02:00
hander.prepend('<span class="glyphicon glyphicon-asterisk"></span>');
});
$("#NotSameAsResident").click(function() {
$("#corespondent-form").removeClass('hidden');
});
$("#SameAsResident").click(function() {
$("#corespondent-form").addClass('hidden');
});
</script>
}