diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..fcac5760 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +# Ignore artifacts: +build +coverage + +# Ignore all HTML files: +**/*.html \ No newline at end of file diff --git a/parks/forms.py b/parks/forms.py index 23b81d9b..be770220 100644 --- a/parks/forms.py +++ b/parks/forms.py @@ -85,7 +85,7 @@ class ParkForm(forms.ModelForm): }), 'description': forms.Textarea(attrs={ 'class': 'w-full border-gray-300 rounded-lg form-textarea dark:border-gray-600 dark:bg-gray-700 dark:text-white', - 'rows': 4 + 'rows': 2 }), 'owner': forms.Select(attrs={ 'class': 'w-full border-gray-300 rounded-lg form-select dark:border-gray-600 dark:bg-gray-700 dark:text-white' diff --git a/templates/parks/park_form.html b/templates/parks/park_form.html index 2bb150a4..9fa45df4 100644 --- a/templates/parks/park_form.html +++ b/templates/parks/park_form.html @@ -1,208 +1,241 @@ -{% extends 'base/base.html' %} -{% load static %} - -{% block title %}{% if is_edit %}Edit{% else %}Add{% endif %} Park - ThrillWiki{% endblock %} - +{% extends 'base/base.html' %} {% load static %} {% block title %}{% if is_edit %}Edit {{ object.name }}{% else %}Add Park{% endif %} - ThrillWiki{% endblock %} {% block content %}
-
- -
-

{% if is_edit %}Edit{% else %}Add{% endif %} Park

+
+ +
+

+ {% if is_edit %}Edit {{ object.name }}{% else %}Add Park{% endif %} +

- {% if form.errors %} -
-

Please correct the following errors:

-
    - {% for field in form %} - {% for error in field.errors %} -
  • {{ field.label }}: {{ error }}
  • - {% endfor %} - {% endfor %} - {% for error in form.non_field_errors %} -
  • {{ error }}
  • - {% endfor %} -
-
- {% endif %} + {% if form.errors %} +
+

Please correct the following errors:

+
    + {% for field in form %} {% for error in field.errors %} +
  • {{ field.label }}: {{ error }}
  • + {% endfor %} {% endfor %} {% for error in form.non_field_errors %} +
  • {{ error }}
  • + {% endfor %} +
+
+ {% endif %} -
- {% csrf_token %} - - - {{ form.country }} - {{ form.region }} - {{ form.city }} - - -
- -
- {{ form.name }} -
- {% if form.name.errors %} -
- {{ form.name.errors }} -
- {% endif %} -
+ + {% csrf_token %} - -
- - - -
    - -
-
+ + {{ form.country }} {{ form.region }} {{ form.city }} -
- - - -
    - -
-
- -
- - - -
    - -
-
- - - {% for field in form %} - {% if field.name not in 'name,country,region,city,country_name,region_name,city_name' %} -
- -
- {{ field }} -
- {% if field.help_text %} -

{{ field.help_text }}

- {% endif %} - {% if field.errors %} -
- {{ field.errors }} -
- {% endif %} -
- {% endif %} - {% endfor %} - - {% if not user.role == 'MODERATOR' and not user.role == 'ADMIN' and not user.role == 'SUPERUSER' %} -
-

Your submission will be reviewed by a moderator before being published.

-
-
-
- - -
-
- - -
-
- {% endif %} - -
- - Cancel - - -
-
+ +
+ +
{{ form.name }}
+ {% if form.name.errors %} +
+ {{ form.name.errors }} +
+ {% endif %}
- - {% if is_edit %} -
- {% include "media/partials/photo_manager.html" with photos=object.photos.all content_type="parks.park" object_id=object.id %} -
+ +
+ + + +
    + +
+
+ +
+ + + +
    + +
+
+ +
+ + + +
    + +
+
+ + + {% for field in form %} {% if field.name not in 'name,country,region,city,country_name,region_name,city_name' %} +
+ +
{{ field }}
+ {% if field.help_text %} +

+ {{ field.help_text }} +

+ {% endif %} {% if field.errors %} +
+ {{ field.errors }} +
+ {% endif %} +
+ {% endif %} {% endfor %} {% if not user.role == 'MODERATOR' and not user.role == 'ADMIN' and not user.role == 'SUPERUSER' %} +
+

+ Your submission will be reviewed by a moderator before being + published. +

+
+
+
+ + +
+
+ + +
+
{% endif %} + +
+ + Cancel + + +
+
+ + + {% if is_edit %} +
+ {% include "media/partials/photo_manager.html" with photos=object.photos.all content_type="parks.park" object_id=object.id %} +
+ {% endif %} +
{% endblock %} diff --git a/templates/parks/park_list.html b/templates/parks/park_list.html index 42126ec3..ee5dac35 100644 --- a/templates/parks/park_list.html +++ b/templates/parks/park_list.html @@ -6,7 +6,7 @@ {% block content %}