Modal and other tweaks

* removes WIKI_URL, replaces with HELP_LINK since it was the same before as well
* refactors modal form processing (process_request())
   * modal form can now display errors directly inside the modal (as intended by the devs)
   * modals now properly support the GET-POST workflow that is intended by the devs. More information here: https://github.com/trco/django-bootstrap-modal-forms/issues/183
* Improves label-field linking in generic_table_form_body.html
* removes isDeleteForm attribute from modal_form_script.html
This commit is contained in:
mipel
2021-08-17 15:27:49 +02:00
parent da60ccc85d
commit 6c4ced784b
8 changed files with 44 additions and 51 deletions

View File

@@ -7,8 +7,7 @@ Created on: 16.11.20
"""
from django.http import HttpRequest
from konova.settings import HELP_LINK
from konova.sub_settings.context_settings import BASE_TITLE, WIKI_URL, BASE_FRONTEND_TITLE
from konova.sub_settings.context_settings import BASE_TITLE, HELP_LINK, BASE_FRONTEND_TITLE
class BaseContext:
@@ -19,11 +18,9 @@ class BaseContext:
"base_title": BASE_TITLE,
"base_frontend_title": BASE_FRONTEND_TITLE,
"language": "en",
"wiki_url": WIKI_URL,
"user": None,
"current_role": None,
"help_link": HELP_LINK,
"modal_reload_page": "true", # must be string and lower case true, since it's used in JS code
}
def __init__(self, request: HttpRequest, additional_context: dict = {}):