You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
2.0 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
  1. @model Sevomin.Models.JobParameterViewModel
  2. @{ string paramId = string.Format("value-{0}", Model.ParameterId);
  3. string muscowId = string.Format("moscow-{0}", Model.ParameterId);
  4. var MuSCoWList = Sevomin.Models.Helpers.StringEnum.GetSelectList(typeof(Sevomin.Models.Enums.MuSCoW), false); }
  5. <div class="form-group indented">
  6. <div class="row">
  7. <div class="col-md-3 pull-right">
  8. @Html.Label(Model.ParameterName)
  9. @if (!string.IsNullOrWhiteSpace(Model.CommentAvalin))
  10. {
  11. <span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="@paramId" data-placement="top" title="@Model.CommentAvalin"></span>
  12. }
  13. </div>
  14. <div class="col-md-4 pull-right">
  15. @switch (Model.DisplayMethod)
  16. {
  17. case 1:
  18. @Html.TextBox(paramId, Model.StringValue, new { @class = "form-control" })
  19. break;
  20. case 2:
  21. @Html.TextArea(paramId)
  22. break;
  23. case 3:
  24. @Html.TextBox(paramId, Model.StringValue, new { @class = "form-control", data_val = "true", data_val_number = "لطفا در این فیلد فقط عدد وارد شود." })
  25. @Html.ValidationMessage(paramId)
  26. break;
  27. case 4:
  28. @Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2", Model.StringValue), "انتخاب کنید ...", new { @class = "form-control" })
  29. break;
  30. default:
  31. @MvcHtmlString.Empty
  32. break;
  33. }
  34. </div>
  35. <div class="col-md-3 pull-right">
  36. @if (Model.HasMoscow)
  37. {
  38. @Html.DropDownList(muscowId, new SelectList(MuSCoWList, "Value", "Text", Model.MoscowValue == 0 ? 2 : Model.MoscowValue), new { @class = "form-control" })
  39. }
  40. </div>
  41. </div>
  42. </div>