From 39c31522636152975f29aea3f62390e148bc58fa Mon Sep 17 00:00:00 2001 From: Julian Leucker <leuckerj@gmail.com> Date: Tue, 4 May 2021 11:55:53 +0200 Subject: [PATCH] Add a crude template for a material_form widget, this should be enough for now --- .../fields/ckeditor_ckeditorwidget.html | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 aleksis/core/templates/material/fields/ckeditor_ckeditorwidget.html diff --git a/aleksis/core/templates/material/fields/ckeditor_ckeditorwidget.html b/aleksis/core/templates/material/fields/ckeditor_ckeditorwidget.html new file mode 100644 index 000000000..b2bda535a --- /dev/null +++ b/aleksis/core/templates/material/fields/ckeditor_ckeditorwidget.html @@ -0,0 +1,28 @@ +{% load material_form material_form_internal %} +{% part bound_field.field %}<{{ field.widget.component|default:'dmc-textarea' }}> + <div class="row"> + <div{% attrs bound_field 'group' %} + id="id_{{ bound_field.html_name }}_container" + class="input-field col s12{% if field.required %} required{% endif %}{% if bound_field.errors %} has-error{% endif %}" + {% endattrs %}> + {% part field label %} + <label{% attrs bound_field 'label' %} + for="{{ bound_field.id_for_label }}" + {% if bound_field.value %}class="active"{% endif %} + {% endattrs %}>{{ bound_field.label }}</label> + {% endpart %} + <div style="margin-top: 35px"> + {% part field prefix %}{% endpart %}{% part field control %} + {{ bound_field }} + {% endpart %} + </div> + {% part field help_text %}{% if field.help_text %} + <div class="help-block">{{ bound_field.help_text|safe }}</div> + {% endif %} + {% endpart %}{% part field errors %} + {% if bound_field.errors %} + {% include 'material/field_errors.html' %} + {% endif %} + {% endpart %}{{ hidden_initial }} + </div> + </div></{{ field.widget.component|default:'dmc-textarea' }}>{% endpart %} -- GitLab