Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c90cef6dcf | |||
| b5451a4ef0 | |||
| a4afef8283 | |||
| b2951eed6c | |||
| 9a37c047c1 | |||
| 7290fb4ed1 | |||
| ee9ef3df6f | |||
| 9f3799a77f |
+3
-2
@@ -3787,6 +3787,7 @@ def api_item_detail(item_id):
|
||||
<h2>{html.escape(str(item.get('Name', 'Untitled')))}</h2>
|
||||
<p><strong>ISBN:</strong> {html.escape(str(item.get('ISBN', item.get('Code4', '-'))))}</p>
|
||||
<p><strong>Anzahl:</strong> {html.escape(str(item.get('SeriesCount', '-')))}</p>
|
||||
<p><strong>Code:</strong> {html.escape(str(item.get('Code_4', '-')))}</p>
|
||||
<p><strong>Ort:</strong> {html.escape(str(item.get('Ort', '-')))}</p>
|
||||
<p><strong>Typ:</strong> {html.escape(str(item.get('ItemType', '-')))}</p>
|
||||
<p><strong>Kategorie:</strong> {html.escape(str(item.get('library_category', '-')))}</p>
|
||||
@@ -5779,7 +5780,7 @@ def upload_item():
|
||||
app.logger.warning('Audit write failed for library_item_created')
|
||||
|
||||
flash(success_msg, 'success')
|
||||
return redirect(url_for(success_redirect_endpoint, highlight_item=str(item_id)))
|
||||
return redirect(url_for(success_redirect_endpoint))
|
||||
else:
|
||||
error_msg = 'Fehler beim Hinzufügen des Elements'
|
||||
if is_mobile:
|
||||
@@ -7696,7 +7697,7 @@ def user_del():
|
||||
last_name = ""
|
||||
fullname = None
|
||||
users_list.append({
|
||||
'username': username,
|
||||
'username': decrypt_text(username),
|
||||
'admin': user.get('Admin', False),
|
||||
'fullname': fullname,
|
||||
'name': name,
|
||||
|
||||
@@ -650,7 +650,7 @@ def add_user(
|
||||
safe_last_name = last_name.strip() if last_name else ''
|
||||
|
||||
user_doc = {
|
||||
'Username': dp.encrypt_text(username),
|
||||
'Username': username,
|
||||
'Password': hashing(password),
|
||||
'Admin': (permission_preset == "full_access"),
|
||||
'active_ausleihung': None,
|
||||
|
||||
+638
-542
File diff suppressed because it is too large
Load Diff
@@ -4315,6 +4315,7 @@ document.addEventListener('DOMContentLoaded', ()=>{
|
||||
hiddenInput.value = image;
|
||||
editForm.appendChild(hiddenInput);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5632,6 +5633,61 @@ document.addEventListener('DOMContentLoaded', ()=>{
|
||||
futureAppointments.sort((a, b) => new Date(a.date) - new Date(b.date));
|
||||
return futureAppointments[0];
|
||||
}
|
||||
|
||||
// Load location options
|
||||
function loadLocationOptions() {
|
||||
fetch('/get_predefined_locations')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const ortSelect = document.getElementById('ort');
|
||||
if (ortSelect) {
|
||||
// Clear existing options except the first one
|
||||
while (ortSelect.children.length > 1) {
|
||||
ortSelect.removeChild(ortSelect.lastChild);
|
||||
}
|
||||
|
||||
// Add new options - data.locations contains the array
|
||||
data.locations.forEach(location => {
|
||||
const option = document.createElement('option');
|
||||
option.value = location;
|
||||
option.textContent = location;
|
||||
ortSelect.appendChild(option);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error loading location options:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// Function to add new location
|
||||
function addNewLocation() {
|
||||
const newLocationInput = document.getElementById('new-location-input');
|
||||
const newLocation = newLocationInput.value.trim();
|
||||
|
||||
if (!newLocation) {
|
||||
alert('Bitte geben Sie einen Ort ein.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Add to dropdown
|
||||
const ortSelect = document.getElementById('ort');
|
||||
const option = document.createElement('option');
|
||||
option.value = newLocation;
|
||||
option.textContent = newLocation;
|
||||
option.selected = true;
|
||||
ortSelect.appendChild(option);
|
||||
|
||||
// Hide the input container
|
||||
document.getElementById('new-location-container').style.display = 'none';
|
||||
newLocationInput.value = '';
|
||||
}
|
||||
|
||||
// Function to cancel adding new location
|
||||
function cancelAddLocation() {
|
||||
document.getElementById('new-location-container').style.display = 'none';
|
||||
document.getElementById('new-location-input').value = '';
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Include edit item functions -->
|
||||
|
||||
Reference in New Issue
Block a user