In the last post I described how to extend the All properties view. I changed the behavior of forms editing by subscribing to events between widgets. But code did not affect the On Page edit view. It was possible to edit message details, while it was not possible to change the ShowMaintenanceMessage bool property state. It would be much more convenient for the editors to turn the checkbox on/off directly on the page.
The page markup would look like this:

In the code above the InlineCheckbox tag points to the custom property renderer for ShowMaintenanceMessage property. Markup is simple, it’s just a preview of one of the two texts:

The PageEditing.PageIsInEditMode setting will show the property only in On Page edit mode. With those two small pieces of code we got the desired functionality working. Editor will be able to set ShowMaintenanceMessage directly in the On Page edit mode. But there is one more thing that could be improved – the property overlay editor. Now the the editor appears in a dialog with just one element to click.
inline checkbox dialog

It would be much better if we implemented an inline editor. This behaviour is controlled by uiWrapperType of CustomEditorSettings setting in EditorDescriptor. There are several available wrapper types – Inline, Flyout, Floating, Dialog and LegacyProperty. All of above constants are defined in UiWrapperType static class. In our case we are going to use Inline wrapper.

After I changed the wrapper type to inline I got a few client side exceptions saying that some methods are not implemented in the widget. So another thing to change was an underlying dojo widget assigned in uiType. EPiServer checkbox widget is displayed using epi.shell.widget.CheckBox classs. By default this class is used in On Page edit and in All Properties view modes. If we need to set On Page editing mode only, then we can use uiType key. Below is the full EditorDescriptor class:

The last thing left was to extend the checkbox widget by adding necessary methods. We needed to implement the isEditing, isValid and focus methods. I also created a title label linked to the checkbox.
The widget just extends the built in epi/shell/widget/CheckBox widget.

Now we have the On Page edit with inline checkbox editor.
inline checkbox final version

The full source code can be found on Gist.