Payments add modal form
* adds modal form for adding payments * generalizes generic_table_form.html for table-form-like usage in modal_form.html * adds css enhancements for focused input fields * adds BaseModalForm as specification to BaseForm, which inherits the BSModalForm class as well * adds translations
This commit is contained in:
@@ -8,12 +8,11 @@ Created on: 16.11.20
|
||||
|
||||
from abc import abstractmethod
|
||||
|
||||
from bootstrap_modal_forms.forms import BSModalModelForm, BSModalForm
|
||||
from bootstrap_modal_forms.forms import BSModalForm
|
||||
from django import forms
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.gis.forms import GeometryField, OSMWidget
|
||||
from django.contrib.gis.geos import Polygon
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
@@ -99,6 +98,13 @@ class RemoveForm(BaseForm):
|
||||
return self.object_to_remove
|
||||
|
||||
|
||||
class BaseModalForm(BaseForm, BSModalForm):
|
||||
""" A specialzed form class for modal form handling
|
||||
|
||||
"""
|
||||
is_modal_form = True
|
||||
|
||||
|
||||
class SimpleGeomForm(BaseForm):
|
||||
""" A geometry form for rendering geometry read-only using a widget
|
||||
|
||||
@@ -131,7 +137,7 @@ class SimpleGeomForm(BaseForm):
|
||||
self.area = geom.area
|
||||
|
||||
|
||||
class RemoveDocumentForm(BaseForm, BSModalForm):
|
||||
class RemoveDocumentForm(BaseModalForm):
|
||||
confirm = forms.BooleanField(
|
||||
label=_("Confirm"),
|
||||
label_suffix=_(""),
|
||||
|
||||
@@ -168,7 +168,7 @@ a {
|
||||
}
|
||||
|
||||
input:focus, textarea:focus, select:focus{
|
||||
border: 1px solid var(--rlp-red) !important;
|
||||
border-color: var(--rlp-red) !important;
|
||||
box-shadow: 0 0 3px var(--rlp-red) !important;
|
||||
-moz-box-shadow: 0 0 3px var(--rlp-red) !important;
|
||||
-webkit-box-shadow: 0 0 3px var(--rlp-red) !important;
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
{% block body %}
|
||||
<div class="column">
|
||||
{% include 'generic_table_form.html' %}
|
||||
{% include 'table/generic_table_form.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user