+
+
+%def>
+
+<%def name="javascriptIncludes()">
+
+%def>
diff --git a/data/interfaces/default/config-templates.html b/data/interfaces/default/config-templates.html
new file mode 100644
index 000000000..bcd888e5b
--- /dev/null
+++ b/data/interfaces/default/config-templates.html
@@ -0,0 +1,705 @@
+##
+## Here defined all templates, required for CONFIG page of the app
+##
+
+## ===============================================
+## TEMPLATES for TABS
+## ===============================================
+
+<%def name="Tab(me, parent=None)">
+ ## ID for TAB here is required, it is used to choose appropriate tab
+ ## usign url in address bar (#bookmarks)
+ ## Do not delete ID!
+
+ % if me.message:
+
+ ${me.message}
+
+ % endif
+
+ % for item in me:
+ ${item.render(parent=me)}
+ % endfor
+
+
+
+
+
+%def>
+
+## ===============================================
+## TEMPLATES for common set of OPTIONS
+## ===============================================
+
+<%def name="OptionString(me, parent=None)">
+<%
+ uiname = me.uiName()
+ val = me.uiValue()
+
+ size_attr = '' if me.maxlength is None else ' maxlength="%d"' % me.maxlength
+ tooltip_attr = '' if me.tooltip is None else ' title="%s"' % me.tooltip
+%>
+
+ %if me.label is not None:
+
+ %endif
+
+
+
+
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render(parent=me)}
+ % endfor # for option in block
+
+
+
+ % if not me.readonly:
+
+ % endif
+
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render(parent=me)}
+ % endfor # for option in block
+
+ % endif
+%def>
+
+
+<%def name="OptionPassword(me, parent=None)">
+<%
+ uiname = me.uiName()
+ val = me.uiValue()
+
+ size_attr = '' if me.maxlength is None else ' maxlength="%d"' % me.maxlength
+ tooltip_attr = '' if me.tooltip is None else ' title="%s"' % me.tooltip
+%>
+
+ %if me.label is not None:
+
+ %endif
+
+
+
+
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render(me)}
+ % endfor # for option in block
+
+ % endif
+%def>
+
+
+<%def name="OptionNumber(me, parent=None)">
+<%
+ uiname = me.uiName()
+ val = me.uiValue()
+
+ min_attr = '' if me.minvalue is None else ' min="%d"' % me.minvalue
+ max_attr = '' if me.maxvalue is None else ' max="%d"' % me.maxvalue
+ tooltip_attr = '' if me.tooltip is None else ' title="%s"' % me.tooltip
+%>
+
+ %if me.label is not None:
+
+ %endif
+
+
+
+
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render(me)}
+ % endfor # for option in block
+
+ % endif
+%def>
+
+
+<%def name="OptionPercent(me, parent=None)">
+<%
+ uiname = me.uiName()
+ embed_id = uiname + '_embed'
+ val = me.uiValue()
+
+ min_attr = '' if me.minvalue is None else ' min="%d"' % me.minvalue
+ max_attr = '' if me.maxvalue is None else ' max="%d"' % me.maxvalue
+ tooltip_attr = '' if me.tooltip is None else ' title="%s"' % me.tooltip
+%>
+
+ %if me.label is not None:
+
+ %endif
+
+
+
+
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render(me)}
+ % endfor # for option in block
+
+ % endif
+%def>
+
+
+<%def name="OptionBool(me, parent=None)">
+<%
+ ## TODO: try to simplify this template
+ ## SORRY, there is enouth complicated layout in this template. The `alignleft` make it dirty....
+ ## When checkbox is left aligned - input is inside of the label. In other case - outside...
+
+ uiname = me.uiName()
+ checkbox_id = uiname
+ embed_id = uiname + '_embed'
+ val = me.uiValue()
+
+ need_label = me.label is not None
+ tooltip_attr = '' if me.tooltip is None else ' title="%s"' % me.tooltip
+ checked_attr = 'checked' if val else ''
+ hidden_value = '1' if val else '0'
+%>
+
+
+ ## ENTIRE LABEL or OPEN LABEL (when left aligned)
+ %if need_label:
+
+ % if me.alignleft:
+
+ % endif
+ %endif
+
+ % if me.alignleft:
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+ % endif
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render(me)}
+ % endfor # for option in block
+
+ % endif
+%def>
+
+
+<%def name="OptionSwitch(me, parent=None)">
+<%
+ ## TODO: try to simplify this template
+ ## SORRY, there is enouth complicated layout in this template. The `alignleft` make it dirty....
+ ## When checkbox is left aligned - input is inside of the label. In other case - outside...
+
+ uiname = me.uiName()
+ checkbox_id = uiname
+ embed_id = uiname + '_embed'
+ val = me.uiValue()
+
+ need_label = me.label is not None
+ checked_attr = 'checked' if val else ''
+ embed_hidden_style_attr = '' if val else 'style="display:none"'
+ tooltip_attr = '' if me.tooltip is None else ' title="%s"' % me.tooltip
+ hidden_value = '1' if val else '0'
+%>
+
+
+ ## ENTIRE LABEL or OPEN LABEL (when left aligned)
+ %if need_label:
+
+ % if me.alignleft:
+
+ % else:
+ ${me.label}
+ % endif
+ %endif
+
+ % if not me.alignleft:
+
+ % endif
+
+ ## IMPORTANT for web ui:
+ ## HIDDEN MUST be next sibling of CHECKBOX, jquery uses .next() to find it
+
+
+
+ % if not me.alignleft:
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+
+ % endif
+
+ ## CLOSE LABEL (when left aligned)
+ %if need_label:
+
+ % if me.alignleft:
+ ${me.label}
+ % endif
+ %endif
+
+ % if me.alignleft:
+ %if me.caption is not None:
+
${me.caption}
+ %endif
+ % endif
+
+
+ % if 0 < len(me):
+
+ % for option in me:
+ ${option.render()}
+ % endfor # for option in block
+
+%def>
+
+
+## ===============================================
+## TEMPLATES for
+##
+## TemplaterExtension
+##
+## Minimum of python code, just HTML and templates
+##
+## USE THESE AS RARE AS POSSIBLE
+##
+## ===============================================
+
+<%def name="ApiKeyExtension(me, parent=None)">
+<%
+ val = parent.uiValue()
+ uiname = parent.uiName()
+%>
+