-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLinkedinstyle editing
182 lines (160 loc) · 6 KB
/
Linkedinstyle editing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@using System
@using System.Linq
@using System.Web.UI
@using System.Web.UI.WebControls
@using ClientManager.PersonalDetails.Controller
@model ClientManager.Contracts.PersonalDetail
@{
var referenceManager = new DAL();
var titles = referenceManager.Titles.Select(e => new SelectListItem
{
Value = e.TitleTypeID.ToString(),
Text = e.Name
});
var genders = referenceManager.Gender.Select(e => new SelectListItem
{
Value = e.GenderId.ToString(),
Text = e.Name
});
var martialStatuses = referenceManager.MaritalStatus.Select(e => new SelectListItem
{
Value = e.MaritalStatusID.ToString(),
Text = e.Name
});
}
<div class="form-group has-feedback">
<label class="col-xs-3 control-label" for="title">Title</label>
<div class="col-sm-5">
<div id="title-readonly" style="vertical-align: middle;">
@{
var rt = String.Empty;
var ct = titles.FirstOrDefault();
if (ct != null)
{
rt = ct.Text;
}
}
@rt
<a class="edit" data-field="title" href="#"><i class=" fa fa-pencil"></i></a>
</div>
<div id="editor-for-title" style = "display:none;">
@Html.DropDownListFor(m => m.Title, titles, "", new { @class = "form-control", })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
<input/>
</div>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.Title)
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="forename">Forename</label>
<div class="col-sm-5">
@Html.TextBoxFor(m => m.Forename, new { @class = "form-control", placeholder = "Forename" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.Forename)
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="middlename">Middle Name</label>
<div class="col-sm-5">
@Html.TextBoxFor(m => m.MiddleName, new { @class = "form-control", placeholder = "Middle Name" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.MiddleName)
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="surname">Surname</label>
<div class="col-sm-5">
@Html.TextBoxFor(m => m.Surname, new { @class = "form-control", placeholder = "Surname" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.Surname)
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="known-as">KnownAs</label>
<div class="col-sm-5">
@Html.TextBoxFor(m => m.KnownAs, new { @class = "form-control", placeholder = "Known As" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.KnownAs)
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="initials">Initials</label>
<div class="col-sm-5">
@Html.TextBoxFor(m => m.Initials, new { @class = "form-control", @readonly = "readonly" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="gender">Gender</label>
<div class="col-sm-5">
@Html.DropDownListFor(m => m.Gender, genders, "", new { @class = "form-control" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.Gender)
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="dobp">Date of Birth</label>
<div class="col-sm-5">
<div class="dateDropdownsWrapper input-group date">
@Html.TextBoxFor(m => m.Dob, new { @class = "form-control datepicker", type = "datetime", data_format=@"dd/mm/yyyy" })
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.Dob)
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="marital-status">Marital Status</label>
<div class="col-sm-5">
@Html.DropDownListFor(m => m.MaritalStatus, martialStatuses, "", new { @class = "form-control" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.MaritalStatus)
</div>
</div>
<div class="form-group">
<label class="col-xs-3 control-label" for="national-insurance-number">National Insurance Number</label>
<div class="col-sm-5">
@Html.TextBoxFor(m => m.NationalInsuranceNumber, new { @class = "form-control", placeholder = "National Insurance Number" })
<span class="glyphicon form-control-feedback" aria-hidden="true"></span>
</div>
<div class="col-sm-4">
@Html.ValidationMessageFor(x => x.NationalInsuranceNumber)
</div>
</div>
@section scripts{
<script>
$(document).ready(function() {
$('.datepicker').datetimepicker({
format: "DD/MMMM/YYYY"
});
$('input select').prop("readonly", true);
$('.edit').click(function() {
$(this).parent().css("display", "none");
var f = $(this).data("field");
$('#editor-for-' + f.trim()).css("display", "block");
});
});
</script>
}