diff --git a/aleksis/core/static/style.scss b/aleksis/core/static/style.scss index 48c53ffc17870b8e0764cae64ba8acc19de98786..cf5622d05d30df85c43b0668e4acb199d1e80dbf 100644 --- a/aleksis/core/static/style.scss +++ b/aleksis/core/static/style.scss @@ -326,6 +326,11 @@ input[type="checkbox"].chips-checkbox + span { } } +// Move label of ckeditor up +.margin-top-35 { + margin-top: 35px; +} + // Badges span.badge.new::after { 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 0000000000000000000000000000000000000000..73f57170017ed5e21a4c495f6f683dfb5b957ef4 --- /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 class="margin-top-35"> + {% 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 %}