@model Sevomin.Models.DovominParameterViewModel
|
|
@{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); }
|
|
<div class="form-group">
|
|
<div class="row">
|
|
<div class="col-md-3 pull-right">
|
|
@Html.Label(Model.ParameterName)
|
|
@if (!string.IsNullOrWhiteSpace(Model.CommentDovomin))
|
|
{
|
|
<span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="@paramId" data-placement="top" title="@Model.CommentDovomin"></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, Model.StringValue, new { @class = "form-control" })
|
|
break;
|
|
case 3:
|
|
/* validator bezar baraye numeric gereftan */
|
|
@Html.TextBox(paramId, Model.StringValue, new { @class = "form-control" })
|
|
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>
|
|
</div>
|