Merge branch 'develop' into feature

This commit is contained in:
jeremystretch
2023-04-07 13:00:00 -04:00
39 changed files with 166 additions and 205 deletions

View File

@@ -34,8 +34,8 @@ class CommentField(forms.CharField):
Markdown</a> syntax is supported
"""
def __init__(self, *, label='', help_text=help_text, required=False, **kwargs):
super().__init__(label=label, help_text=help_text, required=required, **kwargs)
def __init__(self, *, help_text=help_text, required=False, **kwargs):
super().__init__(help_text=help_text, required=required, **kwargs)
class SlugField(forms.SlugField):

View File

@@ -1,3 +1,5 @@
<a href="{{ url }}" class="btn btn-sm btn-success" role="button">
<i class="mdi mdi-content-copy" aria-hidden="true"></i>&nbsp;Clone
</a>
{% if url %}
<a href="{{ url }}" class="btn btn-sm btn-success" role="button">
<i class="mdi mdi-content-copy" aria-hidden="true"></i> Clone
</a>
{% endif %}

View File

@@ -3,9 +3,7 @@
<div class="row mb-3{% if field.errors %} has-errors{% endif %}">
{# Render the field label, except for: #}
{# 1. Checkboxes (label appears to the right of the field #}
{# 2. Textareas with no label set (will expand across entire row) #}
{# Render the field label (if any), except for checkboxes #}
{% if label and not field|widget_type == 'checkboxinput' %}
<label for="{{ field.id_for_label }}" class="col-sm-3 col-form-label text-lg-end{% if field.field.required %} required{% endif %}">
{{ label }}

View File

@@ -20,6 +20,8 @@ def clone_button(instance):
param_string = prepare_cloned_fields(instance).urlencode()
if param_string:
url = f'{url}?{param_string}'
else:
url = None
return {
'url': url,