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:
@@ -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>
|
||||
@@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user