Initial
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
@using MileageTraker.Web.Utility
|
||||
@model Enum
|
||||
@{
|
||||
var listItems = Model.GetSelectListItems();
|
||||
var prefix = ViewData.TemplateInfo.HtmlFieldPrefix;
|
||||
ViewData.TemplateInfo.HtmlFieldPrefix = string.Empty;
|
||||
var index = 0;
|
||||
|
||||
foreach (var li in listItems)
|
||||
{
|
||||
var fieldName = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}_{1}", prefix.Replace('.', '_'), index++);
|
||||
<span class="radiobutton">
|
||||
@Html.RadioButton(prefix, li.Value, li.Selected, new { @id = fieldName })
|
||||
@Html.Label(fieldName, li.Text)
|
||||
</span>
|
||||
}
|
||||
ViewData.TemplateInfo.HtmlFieldPrefix = prefix;
|
||||
}
|
||||
Reference in New Issue
Block a user