#86 Edit payment
* adds button for payment editing * adds new edit form payment editing * adds tests for views and workflow
This commit is contained in:
@@ -87,7 +87,7 @@ class BaseForm(forms.Form):
|
||||
"""
|
||||
self.fields[field].widget.attrs["placeholder"] = val
|
||||
|
||||
def load_initial_data(self, form_data: dict, disabled_fields: list):
|
||||
def load_initial_data(self, form_data: dict, disabled_fields: list = None):
|
||||
""" Initializes form data from instance
|
||||
|
||||
Inserts instance data into form and disables form fields
|
||||
@@ -99,8 +99,9 @@ class BaseForm(forms.Form):
|
||||
return
|
||||
for k, v in form_data.items():
|
||||
self.initialize_form_field(k, v)
|
||||
for field in disabled_fields:
|
||||
self.disable_form_field(field)
|
||||
if disabled_fields:
|
||||
for field in disabled_fields:
|
||||
self.disable_form_field(field)
|
||||
|
||||
def add_widget_html_class(self, field: str, cls: str):
|
||||
""" Adds a HTML class string to the widget of a field
|
||||
|
||||
@@ -46,6 +46,7 @@ DEADLINE_REMOVED = _("Deadline removed")
|
||||
|
||||
# PAYMENTS
|
||||
PAYMENT_ADDED = _("Payment added")
|
||||
PAYMENT_EDITED = _("Payment edited")
|
||||
PAYMENT_REMOVED = _("Payment removed")
|
||||
|
||||
# REVOCATIONS
|
||||
|
||||
Reference in New Issue
Block a user