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.
 
 
 
 

42 lines
2.0 KiB

@model Sevomin.Models.JobParameterViewModel
@{ string paramId = string.Format("value-{0}", Model.ParameterId);
string muscowId = string.Format("moscow-{0}", Model.ParameterId);
var MuSCoWList = Sevomin.Models.Helpers.StringEnum.GetSelectList(typeof(Sevomin.Models.Enums.MuSCoW), false); }
<div class="form-group indented">
<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, Model.StringValue, new { @class = "form-control" })
break;
case 2:
@Html.TextArea(paramId)
break;
case 3:
@Html.TextBox(paramId, Model.StringValue, new { @class = "form-control", data_val = "true", data_val_number = "لطفا در این فیلد فقط عدد وارد شود." })
@Html.ValidationMessage(paramId)
break;
case 4:
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2", Model.StringValue), "انتخاب کنید ...", 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, "Value", "Text", Model.MoscowValue == 0 ? 2 : Model.MoscowValue), new { @class = "form-control" })
}
</div>
</div>
</div>