#7 New Form
* refactors/renames folders and files for generic template rendering * removes unused choiceColumnForm.html
This commit is contained in:
		
							parent
							
								
									3842bcf0b1
								
							
						
					
					
						commit
						0e839f5e44
					
				@ -240,7 +240,7 @@ class EcoAccountTable(BaseTable):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        value_total, value_relative = record.get_available_rest()
 | 
					        value_total, value_relative = record.get_available_rest()
 | 
				
			||||||
        html = render_to_string("konova/custom_widgets/progressbar.html", {"value": value_relative})
 | 
					        html = render_to_string("konova/widgets/progressbar.html", {"value": value_relative})
 | 
				
			||||||
        return format_html(html)
 | 
					        return format_html(html)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def render_r(self, value, record: EcoAccount):
 | 
					    def render_r(self, value, record: EcoAccount):
 | 
				
			||||||
 | 
				
			|||||||
@ -35,7 +35,7 @@
 | 
				
			|||||||
                        <td class="align-middle">
 | 
					                        <td class="align-middle">
 | 
				
			||||||
                            {{available_total|floatformat:2}} / {{obj.deductable_surface|default_if_none:0.00|floatformat:2}} m²
 | 
					                            {{available_total|floatformat:2}} / {{obj.deductable_surface|default_if_none:0.00|floatformat:2}} m²
 | 
				
			||||||
                            {% with available as value %}
 | 
					                            {% with available as value %}
 | 
				
			||||||
                                {% include 'konova/custom_widgets/progressbar.html' %}
 | 
					                                {% include 'konova/widgets/progressbar.html' %}
 | 
				
			||||||
                            {% endwith %}
 | 
					                            {% endwith %}
 | 
				
			||||||
                        </td>
 | 
					                        </td>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
 | 
				
			|||||||
@ -2,5 +2,5 @@
 | 
				
			|||||||
{% load i18n l10n %}
 | 
					{% load i18n l10n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block body %}
 | 
					{% block body %}
 | 
				
			||||||
    {% include 'form/main_data_collapse_form.html' %}
 | 
					    {% include 'form/collapsable/form.html' %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@ -2,5 +2,5 @@
 | 
				
			|||||||
{% load i18n l10n %}
 | 
					{% load i18n l10n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block body %}
 | 
					{% block body %}
 | 
				
			||||||
    {% include 'form/main_data_collapse_form.html' %}
 | 
					    {% include 'form/collapsable/form.html' %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@ -8,11 +8,11 @@ class DummyFilterInput(forms.HiddenInput):
 | 
				
			|||||||
    filter widget being rendered to the template.
 | 
					    filter widget being rendered to the template.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    template_name = "konova/custom_widgets/dummy-filter-input.html"
 | 
					    template_name = "konova/widgets/empty-dummy-input.html"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TextToClipboardInput(forms.TextInput):
 | 
					class TextToClipboardInput(forms.TextInput):
 | 
				
			||||||
    template_name = "konova/custom_widgets/text-to-clipboard-input.html"
 | 
					    template_name = "konova/widgets/text-to-clipboard-input.html"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class GenerateInput(forms.TextInput):
 | 
					class GenerateInput(forms.TextInput):
 | 
				
			||||||
@ -29,4 +29,4 @@ class GenerateInput(forms.TextInput):
 | 
				
			|||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    template_name = "konova/custom_widgets/generate-content-input.html"
 | 
					    template_name = "konova/widgets/generate-content-input.html"
 | 
				
			||||||
 | 
				
			|||||||
@ -2,5 +2,5 @@
 | 
				
			|||||||
{% load i18n l10n %}
 | 
					{% load i18n l10n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block body %}
 | 
					{% block body %}
 | 
				
			||||||
    {% include 'form/main_data_collapse_form.html' %}
 | 
					    {% include 'form/collapsable/form.html' %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@ -1,5 +0,0 @@
 | 
				
			|||||||
 | 
					 | 
				
			||||||
<form action="{{ form.action_url }}" method="post">
 | 
					 | 
				
			||||||
    {% csrf_token %}
 | 
					 | 
				
			||||||
    {{ form.as_p }}
 | 
					 | 
				
			||||||
</form>
 | 
					 | 
				
			||||||
@ -3,6 +3,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block body %}
 | 
					{% block body %}
 | 
				
			||||||
<div class="column">
 | 
					<div class="column">
 | 
				
			||||||
    {% include 'form/generic_table_form.html' %}
 | 
					    {% include 'form/table/generic_table_form.html' %}
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
@ -465,7 +465,7 @@ msgstr "Nicht freigegeben - Datensatz nur lesbar"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#: compensation/tables.py:177
 | 
					#: compensation/tables.py:177
 | 
				
			||||||
#: compensation/templates/compensation/detail/eco_account/view.html:35
 | 
					#: compensation/templates/compensation/detail/eco_account/view.html:35
 | 
				
			||||||
#: konova/templates/konova/custom_widgets/progressbar.html:3
 | 
					#: konova/templates/konova/widgets/progressbar.html:3
 | 
				
			||||||
msgid "Available"
 | 
					msgid "Available"
 | 
				
			||||||
msgstr "Verfügbar"
 | 
					msgstr "Verfügbar"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1231,7 +1231,7 @@ msgstr "Löschen"
 | 
				
			|||||||
msgid "You are about to remove {} {}"
 | 
					msgid "You are about to remove {} {}"
 | 
				
			||||||
msgstr "Sie sind dabei {} {} zu löschen"
 | 
					msgstr "Sie sind dabei {} {} zu löschen"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: konova/forms.py:243 templates/form/main_data_collapse_form.html:45
 | 
					#: konova/forms.py:243 templates/form/collapsable/form.html:45
 | 
				
			||||||
msgid "Geometry"
 | 
					msgid "Geometry"
 | 
				
			||||||
msgstr "Geometrie"
 | 
					msgstr "Geometrie"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1317,15 +1317,15 @@ msgstr "Kontrolle am"
 | 
				
			|||||||
msgid "Other"
 | 
					msgid "Other"
 | 
				
			||||||
msgstr "Sonstige"
 | 
					msgstr "Sonstige"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: konova/templates/konova/custom_widgets/generate-content-input.html:6
 | 
					#: konova/templates/konova/widgets/generate-content-input.html:6
 | 
				
			||||||
msgid "Generate new"
 | 
					msgid "Generate new"
 | 
				
			||||||
msgstr "Neu generieren"
 | 
					msgstr "Neu generieren"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: konova/templates/konova/custom_widgets/text-to-clipboard-input.html:6
 | 
					#: konova/templates/konova/widgets/text-to-clipboard-input.html:6
 | 
				
			||||||
msgid "Copy to clipboard"
 | 
					msgid "Copy to clipboard"
 | 
				
			||||||
msgstr "In Zwischenablage kopieren"
 | 
					msgstr "In Zwischenablage kopieren"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: konova/templates/konova/custom_widgets/text-to-clipboard-input.html:16
 | 
					#: konova/templates/konova/widgets/text-to-clipboard-input.html:16
 | 
				
			||||||
msgid "Copied to clipboard"
 | 
					msgid "Copied to clipboard"
 | 
				
			||||||
msgstr "In Zwischenablage kopiert"
 | 
					msgstr "In Zwischenablage kopiert"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1437,21 +1437,21 @@ msgstr ""
 | 
				
			|||||||
msgid "Contact"
 | 
					msgid "Contact"
 | 
				
			||||||
msgstr "Kontakt"
 | 
					msgstr "Kontakt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: templates/form/generic_table_form.html:23
 | 
					#: templates/form/table/generic_table_form.html:23
 | 
				
			||||||
#: templates/form/main_data_collapse_form.html:58
 | 
					#: templates/form/collapsable/form.html:58
 | 
				
			||||||
msgid "Cancel"
 | 
					msgid "Cancel"
 | 
				
			||||||
msgstr "Abbrechen"
 | 
					msgstr "Abbrechen"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: templates/form/generic_table_form.html:27
 | 
					#: templates/form/table/generic_table_form.html:27
 | 
				
			||||||
#: templates/form/main_data_collapse_form.html:62
 | 
					#: templates/form/collapsable/form.html:62
 | 
				
			||||||
msgid "Save"
 | 
					msgid "Save"
 | 
				
			||||||
msgstr "Speichern"
 | 
					msgstr "Speichern"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: templates/form/generic_table_form_body.html:24
 | 
					#: templates/form/table/generic_table_form_body.html:24
 | 
				
			||||||
msgid "Fields with * are required."
 | 
					msgid "Fields with * are required."
 | 
				
			||||||
msgstr "* sind Pflichtfelder."
 | 
					msgstr "* sind Pflichtfelder."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: templates/form/main_data_collapse_form.html:14
 | 
					#: templates/form/collapsable/form.html:14
 | 
				
			||||||
msgid ""
 | 
					msgid ""
 | 
				
			||||||
"\n"
 | 
					"\n"
 | 
				
			||||||
"                    First enter the most basic data. Of course you can "
 | 
					"                    First enter the most basic data. Of course you can "
 | 
				
			||||||
@ -1468,11 +1468,11 @@ msgstr ""
 | 
				
			|||||||
"Speichern des neuen Eintrags hinzugefügt werden.\n"
 | 
					"Speichern des neuen Eintrags hinzugefügt werden.\n"
 | 
				
			||||||
" "
 | 
					" "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: templates/form/main_data_collapse_form.html:20
 | 
					#: templates/form/collapsable/form.html:20
 | 
				
			||||||
msgid "Open the input topic with a simple click."
 | 
					msgid "Open the input topic with a simple click."
 | 
				
			||||||
msgstr "Mit einem Linksklick öffnen Sie den jeweiligen Formularbereich."
 | 
					msgstr "Mit einem Linksklick öffnen Sie den jeweiligen Formularbereich."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: templates/form/main_data_collapse_form.html:30
 | 
					#: templates/form/collapsable/form.html:30
 | 
				
			||||||
msgid "General data"
 | 
					msgid "General data"
 | 
				
			||||||
msgstr "Allgemeine Daten"
 | 
					msgstr "Allgemeine Daten"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@
 | 
				
			|||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div id="dataCard" class="collapse" aria-labelledby="dataCardHeader">
 | 
					            <div id="dataCard" class="collapse" aria-labelledby="dataCardHeader">
 | 
				
			||||||
                <div class="card-body">
 | 
					                <div class="card-body">
 | 
				
			||||||
                    {% include 'form/generic_table_form_body.html' %}
 | 
					                    {% include 'form/table/generic_table_form_body.html' %}
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@ -16,7 +16,7 @@
 | 
				
			|||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
    <form method="post" action="{{ form.action_url }}" {% for attr_key, attr_val in form.form_attrs.items %} {{attr_key}}="{{attr_val}}"{% endfor %}>
 | 
					    <form method="post" action="{{ form.action_url }}" {% for attr_key, attr_val in form.form_attrs.items %} {{attr_key}}="{{attr_val}}"{% endfor %}>
 | 
				
			||||||
        {% csrf_token %}
 | 
					        {% csrf_token %}
 | 
				
			||||||
        {% include 'form/generic_table_form_body.html' %}
 | 
					        {% include 'form/table/generic_table_form_body.html' %}
 | 
				
			||||||
        <div class="row">
 | 
					        <div class="row">
 | 
				
			||||||
            <div class="col-6">
 | 
					            <div class="col-6">
 | 
				
			||||||
                <a href="{{ form.cancel_redirect }}">
 | 
					                <a href="{{ form.cancel_redirect }}">
 | 
				
			||||||
@ -18,7 +18,7 @@
 | 
				
			|||||||
        <article>
 | 
					        <article>
 | 
				
			||||||
            {{ form.form_caption }}
 | 
					            {{ form.form_caption }}
 | 
				
			||||||
        </article>
 | 
					        </article>
 | 
				
			||||||
        {% include 'form/generic_table_form_body.html' %}
 | 
					        {% include 'form/table/generic_table_form_body.html' %}
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    {% if form.render_submit %}
 | 
					    {% if form.render_submit %}
 | 
				
			||||||
    <div class="modal-footer">
 | 
					    <div class="modal-footer">
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
{% extends 'base.html' %}
 | 
					{% extends 'base.html' %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block body %}
 | 
					{% block body %}
 | 
				
			||||||
    {% include 'form/generic_table_form.html' %}
 | 
					    {% include 'form/table/generic_table_form.html' %}
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user