Completed a backwards compatible radio button list property editor - re-uses all of the other already created list type editors.

This commit is contained in:
Shannon
2013-08-29 18:06:16 +10:00
parent 339ee11dc0
commit ac83fa781b
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<div>
<ul class="unstyled">
<li ng-repeat="(key, val) in model.config.items">
<label class="radio">
<input type="radio" name="checkboxlist"
value="{{key}}"
ng-model="model.value" />
{{val}}
</label>
</li>
</ul>
</div>

View File

@@ -29,4 +29,18 @@ namespace Umbraco.Web.PropertyEditors
}
}
/// <summary>
/// A property editor to allow the individual selection of pre-defined items.
/// </summary>
/// <remarks>
/// Due to remaining backwards compatible, this stores the id of the item in the database which is why it is marked
/// as INT and we have logic in here to ensure it is formatted correctly including ensuring that the INT ID value is published
/// in cache and not the string value.
/// </remarks>
[PropertyEditor(Constants.PropertyEditors.RadioButtonList, "Radio button list", "radiobuttons", ValueType = "INT")]
public class RadioButtonsPropertyEditor : DropDownWithKeysPropertyEditor
{
}
}