More color integration

This commit is contained in:
Patrick Jentsch
2020-08-24 14:21:16 +02:00
parent 778ff509ff
commit e9de641e30
7 changed files with 116 additions and 138 deletions

View File

@ -48,9 +48,10 @@
{% endmacro %}
{% macro render_file_field(field) %}
{% set color = kwargs.pop('color', none) %}
{% set placeholder = kwargs.pop('placeholder', '') %}
<div class="file-field input-field">
<div class="btn">
<div class="btn" {% if color is not none %}style="background-color: {{ color }};"{% endif %}>
<span>{{ field.label.text }}</span>
{{ field(*args, **kwargs) }}
</div>
@ -77,7 +78,8 @@
{% endmacro %}
{% macro render_submit_field(field) %}
<button class="btn waves-effect waves-light" id="{{ field.id }}" name="{{ field.name }}" type="submit" value="{{ field.label.text }}">
{% set color = kwargs.pop('color', none) %}
<button class="btn waves-effect waves-light" {% if color is not none %}style="background-color: {{ color }};"{% endif %} id="{{ field.id }}" name="{{ field.name }}" type="submit" value="{{ field.label.text }}">
{{ field.label.text }}
{% if 'material_icon' in kwargs %}
<i class="material-icons right">{{ kwargs.pop('material_icon') }}</i>