Inputvaledierung für die Projektnummern
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
</div>
|
||||
<div class="nav-right">
|
||||
<span>Verwaltung: <%= user.firstname %> <%= user.lastname %></span>
|
||||
<a href="/verwaltung/projektauswertung" class="btn btn-secondary" style="margin-right: 10px;">Projektauswertung</a>
|
||||
<select id="verwaltungNav" class="role-switcher" style="margin-right: 10px; padding: 5px 10px; border-radius: 4px; border: 1px solid #ddd;">
|
||||
<option value="/verwaltung" selected>Postfach</option>
|
||||
<option value="/verwaltung/projektauswertung">Projektauswertung</option>
|
||||
</select>
|
||||
<% if (user.roles && user.roles.length > 1) { %>
|
||||
<select id="roleSwitcher" class="role-switcher" style="margin-right: 10px; padding: 5px 10px; border-radius: 4px; border: 1px solid #ddd;">
|
||||
<% const roleLabels = { 'mitarbeiter': 'Mitarbeiter', 'verwaltung': 'Verwaltung', 'admin': 'Administrator' }; %>
|
||||
@@ -1192,6 +1195,14 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const verwaltungNav = document.getElementById('verwaltungNav');
|
||||
if (verwaltungNav) {
|
||||
verwaltungNav.addEventListener('change', function() {
|
||||
const url = this.value;
|
||||
if (url) window.location.href = url;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<%- include('footer') %>
|
||||
|
||||
Reference in New Issue
Block a user