forked from beba/foerderbarometer
				
			Neue Nutzungsbedingungen verlinkt
This commit is contained in:
		
							parent
							
								
									c691bc8c80
								
							
						
					
					
						commit
						4aeb330fa4
					
				| 
						 | 
				
			
			@ -8,6 +8,8 @@ from .models import Project, Volunteer, ConcreteVolunteer, Extern, ConcreteExter
 | 
			
		|||
                    BusinessCard
 | 
			
		||||
from .settings import DATAPROTECTION, FOERDERRICHTLINIEN, NUTZUNGSBEDINGUNGEN
 | 
			
		||||
 | 
			
		||||
from . import settings
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class FdbForm(ModelForm):
 | 
			
		||||
| 
						 | 
				
			
			@ -36,7 +38,7 @@ class ExternForm(FdbForm):
 | 
			
		|||
                         label='Was möchtest Du beantragen?')
 | 
			
		||||
 | 
			
		||||
    check = BooleanField(required=True,
 | 
			
		||||
                         label=format_html("Ich stimme den <a href='{}' target='_blank' rel='noopener'>Datenschutzbestimmungen</a> und den <a href='{}' target='_blank' rel='noopener'>Förderrichtlinen</a> zu",
 | 
			
		||||
                         label=format_html("Ich stimme den <a href='{}' target='_blank' rel='noopener'>Datenschutzbestimmungen</a> und der<br> <a href='{}' target='_blank' rel='noopener'>Richtlinie zur Förderung der Communitys</a> zu",
 | 
			
		||||
                         DATAPROTECTION, FOERDERRICHTLINIEN))
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
| 
						 | 
				
			
			@ -114,13 +116,31 @@ class IFGForm(FdbForm):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
class CheckForm(FdbForm):
 | 
			
		||||
    termstoaccept = NUTZUNGSBEDINGUNGEN
 | 
			
		||||
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
        self.fields['check'] = BooleanField(
 | 
			
		||||
            required=True,
 | 
			
		||||
            label=format_html(
 | 
			
		||||
                "Ich stimme den <a href='{}'>Nutzungsbedingungen</a> zu",
 | 
			
		||||
                self.termstoaccept
 | 
			
		||||
            )
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    """Baseclass for all classes which need a check for Nutzungsbedingungen"""
 | 
			
		||||
    check = BooleanField(required=True,
 | 
			
		||||
                         label=format_html("Ich stimme den <a href='{}'>Nutzungsbedingungen</a> zu",
 | 
			
		||||
                         NUTZUNGSBEDINGUNGEN))
 | 
			
		||||
#    def __init__(self, *args, **kwargs):
 | 
			
		||||
#    check = BooleanField(required=True,
 | 
			
		||||
#                        label=format_html("Ich stimme den <a href='{}'>Nutzungsbedingungen</a> zu",
 | 
			
		||||
#                        termstoaccept))
 | 
			
		||||
#                         NUTZUNGSBEDINGUNGEN))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class LiteratureForm(CheckForm):
 | 
			
		||||
    termstoaccept = settings.NUTZUNGSBEDINGUNGEN_LITERATURSTIPENDIUM
 | 
			
		||||
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
        self.fields['selfbuy_give_data'].required = True
 | 
			
		||||
| 
						 | 
				
			
			@ -138,6 +158,8 @@ ADULT_CHOICES = {'TRUE': format_html('Ich bin volljährig.'),
 | 
			
		|||
 | 
			
		||||
class EmailForm(CheckForm):
 | 
			
		||||
 | 
			
		||||
    termstoaccept = settings.NUTZUNGSBEDINGUNGEN_EMAIL_SERVICE
 | 
			
		||||
    
 | 
			
		||||
    # this is the code, to change required to false if needed
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
| 
						 | 
				
			
			@ -159,21 +181,23 @@ class EmailForm(CheckForm):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
class BusinessCardForm(CheckForm):
 | 
			
		||||
      # this is the code, to change required to false if needed
 | 
			
		||||
      def __init__(self, *args, **kwargs):
 | 
			
		||||
    termstoaccept = settings.NUTZUNGSBEDINGUNGEN_VISITENKARTEN
 | 
			
		||||
    # this is the code, to change required to false if needed
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        super().__init__(*args, **kwargs)
 | 
			
		||||
        self.fields['url_of_pic'].required = True
 | 
			
		||||
        self.fields['send_data_to_print'].required = True
 | 
			
		||||
 | 
			
		||||
      class Meta:
 | 
			
		||||
    class Meta:
 | 
			
		||||
        model = BusinessCard
 | 
			
		||||
        exclude = ['intern_notes', 'survey_mail_send', 'mail_state'] 
 | 
			
		||||
        fields = ['project', 'data', 'variant', 'url_of_pic', 'send_data_to_print', 'sent_to']
 | 
			
		||||
      class Media:
 | 
			
		||||
    class Media:
 | 
			
		||||
        js = ('dropdown/js/businessCard.js',)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class ListForm(CheckForm):
 | 
			
		||||
    termstoaccept = settings.NUTZUNGSBEDINGUNGEN_MAILINGLISTEN
 | 
			
		||||
    class Meta:
 | 
			
		||||
        model = List
 | 
			
		||||
        fields = ['domain', 'address']
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,8 +9,15 @@ SURVEYPREFIX = 'https://wikimedia.sslsurvey.de/Foerderbarometer/?'
 | 
			
		|||
 | 
			
		||||
# some links
 | 
			
		||||
DATAPROTECTION = "https://www.wikimedia.de/datenschutz/#datenerfassung"
 | 
			
		||||
FOERDERRICHTLINIEN = "https://de.wikipedia.org/wiki/Wikipedia:Wikimedia_Deutschland/F%C3%B6rderrichtlinien"
 | 
			
		||||
#FOERDERRICHTLINIEN = "https://de.wikipedia.org/wiki/Wikipedia:Wikimedia_Deutschland/F%C3%B6rderrichtlinien"
 | 
			
		||||
FOERDERRICHTLINIEN = "https://de.wikipedia.org/wiki/Wikipedia:Wikimedia_Deutschland/Richtlinie_zur_Förderung_der_Communitys"
 | 
			
		||||
 | 
			
		||||
NUTZUNGSBEDINGUNGEN = 'static/input/nutzungsbedingungen.html'
 | 
			
		||||
NUTZUNGSBEDINGUNGEN_EMAIL_SERVICE = 'static/input/nutzungsbedingungen-mail.pdf'
 | 
			
		||||
NUTZUNGSBEDINGUNGEN_MAILINGLISTEN = 'static/input/nutzungsbedingungen-mailinglisten.pdf'
 | 
			
		||||
NUTZUNGSBEDINGUNGEN_LITERATURSTIPENDIUM = 'static/input/nutzungsbedingungen-literaturstipendium.pdf'
 | 
			
		||||
NUTZUNGSBEDINGUNGEN_OTRS = 'static/input/2025_Nutzungsvereinbarung_OTRS.docx.pdf'
 | 
			
		||||
NUTZUNGSBEDINGUNGEN_VISITENKARTEN = 'static/input/nutzungsbedingungen-visitenkarten.pdf'
 | 
			
		||||
 | 
			
		||||
LANGUAGE_CODE = 'de'
 | 
			
		||||
TIME_ZONE = 'UTC'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue