Browse Source

job create form done

confirmation-email
Milad Karbasizadeh 11 years ago
parent
commit
ecf7cca367
7 changed files with 78 additions and 38 deletions
  1. +10
    -0
      Sevomin.WebFrontend/Scripts/sevomin-ui.js
  2. +3
    -2
      Sevomin.WebFrontend/Sevomin.WebFrontend.csproj
  3. +5
    -0
      Sevomin.WebFrontend/Views/Account/ProfileAvalin.cshtml
  4. +5
    -0
      Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml
  5. +17
    -9
      Sevomin.WebFrontend/Views/Job/JobEditor.cshtml
  6. +2
    -2
      Sevomin.WebFrontend/Views/Job/NewJob.cshtml
  7. +36
    -25
      Sevomin.WebFrontend/Views/Shared/JobParameterViewModel.cshtml

+ 10
- 0
Sevomin.WebFrontend/Scripts/sevomin-ui.js View File

@ -10,4 +10,14 @@ $(function () {
} }
$(this).tooltip(); $(this).tooltip();
}); });
$('.assess-inputs').each(function () {
$(this).bind('submit', function (e) {
//var alert = '<div class="alert alert-info fade in rtl"><button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">×</button><h4>فرم شما خیلی خلوته!</h4><p>با این شرایط ما نمیتونیم به شما کمک کنیم. اگر مایل هستید اطلاعات بیشتری پر کنید.</p><p><button type="submit" class="btn btn-danger">ارسال آگهی</button></p></div>';
//$(this).children('input[type=submit], button[type=submit]').fadeOut('fast')
//$(this).prepend(alert);
//$(this).data('sparse-alert-showed', 'true');
//e.preventDefault();
});
});
}); });

+ 3
- 2
Sevomin.WebFrontend/Sevomin.WebFrontend.csproj View File

@ -238,8 +238,9 @@
<Content Include="Views\Account\Login.cshtml" /> <Content Include="Views\Account\Login.cshtml" />
<Content Include="Views\Job\JobEditor.cshtml" /> <Content Include="Views\Job\JobEditor.cshtml" />
<Content Include="Views\Job\NewJob.cshtml" /> <Content Include="Views\Job\NewJob.cshtml" />
<Content Include="Views\Shared\EditorTemplates\JobParameterViewModel.cshtml" />
<Content Include="Views\Job\JobParametersEditor.cshtml" />
<Content Include="Views\Shared\JobParameterViewModel.cshtml" />
<Content Include="Views\Account\ProfileAvalin.cshtml" />
<Content Include="Views\Account\ProfileDovomin.cshtml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</None> </None>


+ 5
- 0
Sevomin.WebFrontend/Views/Account/ProfileAvalin.cshtml View File

@ -0,0 +1,5 @@
@{
ViewBag.Title = "View1";
}
<h2>ProfileAvalin</h2>

+ 5
- 0
Sevomin.WebFrontend/Views/Account/ProfileDovomin.cshtml View File

@ -0,0 +1,5 @@
@{
ViewBag.Title = "ProfileDovomin";
}
<h2>ProfileDovomin</h2>

+ 17
- 9
Sevomin.WebFrontend/Views/Job/JobEditor.cshtml View File

@ -1,17 +1,17 @@
@model Sevomin.Models.JobViewModel @model Sevomin.Models.JobViewModel
<div class="row rtl">
<div class="clearfix">
<div class="row" style="margin-bottom: 20px">
<div class="col-md-12">
<button type="submit" class="btn btn-primary pull-left">ارسال آگهی</button> <button type="submit" class="btn btn-primary pull-left">ارسال آگهی</button>
</div> </div>
</div>
<div class="row rtl">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">مشخصات اصلی آگهی</div> <div class="panel-heading">مشخصات اصلی آگهی</div>
<div class="panel-body"> <div class="panel-body">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<div class="checkbox"> <div class="checkbox">
@*<label for="exampleInputEmail1">تاریخ انقضا</label> <span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="boogh" data-placement="top" title="این یک راهنما برای این فیلد است"></span>
<input type="text" class="form-control datepickerify" id="boogh" placeholder="Enter email">*@
<label> <label>
@Html.DisplayNameFor(model => model.IsFullTime) @Html.CheckBoxFor(model => model.IsFullTime) @Html.DisplayNameFor(model => model.IsFullTime) @Html.CheckBoxFor(model => model.IsFullTime)
</label> </label>
@ -57,17 +57,25 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">مشخصات اضافه آگهی</div> <div class="panel-heading">مشخصات اضافه آگهی</div>
<div class="panel-body"> <div class="panel-body">
<div class="alert alert-info"><strong>سلام</strong> چطورین؟</div>
<div class="col-md-12"> <div class="col-md-12">
@foreach (var category in Model.Parameters.GroupBy(m => m.GroupName)) @foreach (var category in Model.Parameters.GroupBy(m => m.GroupName))
{ {
@category.Key
foreach (var item in category)
{
@Html.Partial("JobParameterViewModel", item)
}
<div class="panel panel-default">
<div class="panel-body">
<h3>@category.Key</h3>
@foreach (var item in category)
{
@Html.Partial("JobParameterViewModel", item)
}
</div>
</div>
} }
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="clearfix">
<button type="submit" class="btn btn-primary pull-left">ارسال آگهی</button>
</div> </div>

+ 2
- 2
Sevomin.WebFrontend/Views/Job/NewJob.cshtml View File

@ -1,13 +1,13 @@
 
@{ @{
ViewBag.Title = "NewJob";
ViewBag.Title = "انتشار آگهی جدید";
} }
<div class="page-header rtl"> <div class="page-header rtl">
<h1>انتشار آگهی استخدام <small>لورم ایپسوم</small></h1> <h1>انتشار آگهی استخدام <small>لورم ایپسوم</small></h1>
</div> </div>
@using (Html.BeginForm("NewJob", "Job", FormMethod.Post, new { role = "form" }))
@using (Html.BeginForm("NewJob", "Job", FormMethod.Post, new { role = "form", @class = "assess-inputs" }))
{ {
@Html.Partial("JobEditor") @Html.Partial("JobEditor")
} }

+ 36
- 25
Sevomin.WebFrontend/Views/Shared/JobParameterViewModel.cshtml View File

@ -1,30 +1,41 @@
@model Sevomin.Models.JobParameterViewModel @model Sevomin.Models.JobParameterViewModel
@{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); @{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString());
string muscowId = string.Format("moscow-{0}", Model.ParameterId.ToString()); string muscowId = string.Format("moscow-{0}", Model.ParameterId.ToString());
var MuSCoWList = new List<Tuple<string, string>>() { new Tuple<string, string>("Must", "4"), new Tuple<string, string>("Should", "3"), new Tuple<string, string>("Could", "2"), new Tuple<string, string>("Won't", "1") }; }
@Html.Label(Model.ParameterName)
var MuSCoWList = new List<Tuple<string, string>>() { new Tuple<string, string>("الزامی", "4"), new Tuple<string, string>("خیلی مهم", "3"), new Tuple<string, string>("مفید", "2") }; }
<div class="form-group"> <div class="form-group">
@switch (Model.DisplayMethod)
{
case 1:
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
break;
case 2:
@Html.TextArea(paramId)
break;
case 3:
/* validator bezar baraye numeric gereftan */
@Html.TextBox(paramId)
break;
case 4:
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), new { @class = "form-control" })
break;
default:
@MvcHtmlString.Empty
break;
}
@if (Model.HasMoscow)
{
@Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1"), new { @class = "form-control" })
}
<div class="row">
<div class="col-md-3 pull-right">
@Html.Label(Model.ParameterName)
@if (!string.IsNullOrWhiteSpace(Model.CommentAvalin)) {
<span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="@paramId" data-placement="top" title="@Model.CommentAvalin"></span>
}
</div>
<div class="col-md-4 pull-right">
@switch (Model.DisplayMethod)
{
case 1:
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
break;
case 2:
@Html.TextArea(paramId)
break;
case 3:
/* validator bezar baraye numeric gereftan */
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
break;
case 4:
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), Model.ParameterName, new { @class = "form-control" })
break;
default:
@MvcHtmlString.Empty
break;
}
</div>
<div class="col-md-3 pull-right">
@if (Model.HasMoscow)
{
@Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1", "2"), new { @class = "form-control" })
}
</div>
</div>
</div> </div>

Loading…
Cancel
Save