Compare commits

...

1 Commits

3 changed files with 12 additions and 6 deletions
+4 -2
View File
@@ -9935,6 +9935,7 @@ def admin_school_settings():
'school_number': sanitize_form_value(request.form.get('school_number')),
'it_admin': sanitize_form_value(request.form.get('it_admin')),
'logo_path': sanitize_form_value(request.form.get('logo_path')),
'logo_thumb': sanitize_form_value(request.form.get('logo_thumb')),
}
uploaded_logo = request.files.get('logo_upload')
@@ -9950,8 +9951,7 @@ def admin_school_settings():
if saved_logo_filename:
school_info['logo_path'] = saved_logo_filename
if saved_thumb_filename:
school_info['logo_thumb'] = saved_thumb_filename
school_info['logo_thumb'] = saved_thumb_filename or ''
# remove previous files if different
if previous_logo_path and previous_logo_path != saved_logo_filename:
@@ -9974,6 +9974,8 @@ def admin_school_settings():
if not school_info.get('logo_path') and current_school.get('logo_path'):
school_info['logo_path'] = current_school.get('logo_path', '')
if not school_info.get('logo_thumb') and current_school.get('logo_thumb'):
school_info['logo_thumb'] = current_school.get('logo_thumb', '')
missing_fields = [
label for label, key in [
+2
View File
@@ -69,6 +69,8 @@ DEFAULTS = {
'school_number': '000000',
'it_admin': 'IT-Beauftragte oder IT-Beauftragter',
'logo_path': '',
'logo_thumb': '',
'logo_thumb': '',
},
'schoolPeriods': {
"1": {"start": "08:00", "end": "08:45", "label": "1. Stunde (08:00 - 08:45)"},
+6 -4
View File
@@ -1312,11 +1312,13 @@
<nav class="navbar navbar-expand-lg navbar-dark" id="loginNavbar">
<div class="container-fluid">
<a class="navbar-brand py-0" href="{{ url_for('home') }}">
{% if school_info and (school_info.logo_thumb or school_info.logo_path) %}
{% if school_info.logo_thumb %}
<img src="{{ url_for('uploaded_file', filename=school_info.logo_thumb) }}" alt="{{ school_info.name or 'Schullogo' }}" class="invario-logo">
{% set school_logo_thumb = school_info.get('logo_thumb') if school_info else '' %}
{% set school_logo_path = school_info.get('logo_path') if school_info else '' %}
{% if school_logo_thumb or school_logo_path %}
{% if school_logo_thumb %}
<img src="{{ url_for('uploaded_file', filename=school_logo_thumb) }}" alt="{{ school_info.name or 'Schullogo' }}" class="invario-logo">
{% else %}
<img src="{{ url_for('uploaded_file', filename=school_info.logo_path) }}" alt="{{ school_info.name or 'Schullogo' }}" class="invario-logo">
<img src="{{ url_for('uploaded_file', filename=school_logo_path) }}" alt="{{ school_info.name or 'Schullogo' }}" class="invario-logo">
{% endif %}
{% else %}
<img src="{{ url_for('static', filename='img/invario-logo.png') }}" alt="Invario" class="invario-logo">