Files
conference/templates/organizer/edit_event_confirm.html
T
2026-04-18 14:53:41 +00:00

126 lines
3.0 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ 'confirm_changes'|t }} - {{ event.name }}{% endblock %}
{% block content %}
<style>
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: #fff;
border-radius: 12px;
padding: 30px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-header {
margin-bottom: 20px;
}
.modal-header h2 {
margin: 0 0 10px 0;
color: #2c3e50;
}
.modal-header p {
margin: 0;
color: #666;
}
.changes-list {
background: #f8f9fa;
border-radius: 8px;
padding: 15px;
margin-bottom: 20px;
}
.change-item {
padding: 10px 0;
border-bottom: 1px solid #e9ecef;
}
.change-item:last-child {
border-bottom: none;
}
.change-label {
font-weight: 600;
color: #495057;
margin-bottom: 5px;
}
.change-values {
display: flex;
gap: 10px;
align-items: center;
}
.old-value {
color: #dc3545;
text-decoration: line-through;
opacity: 0.7;
}
.arrow {
color: #666;
}
.new-value {
color: #28a745;
font-weight: 500;
}
.modal-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
}
</style>
<div class="modal-overlay">
<div class="modal-content">
<div class="modal-header">
<h2>{{ 'event_updated'|t }}</h2>
<p>{{ 'changes_made_to'|t }} "{{ event.name }}":</p>
</div>
<div class="changes-list">
{% for field, old_val, new_val in changes %}
<div class="change-item">
<div class="change-label">{{ field }}</div>
<div class="change-values">
<span class="old-value">{{ old_val or '(' + 'empty' + ')' }}</span>
<span class="arrow"></span>
<span class="new-value">{{ new_val or '(' + 'empty' + ')' }}</span>
</div>
</div>
{% endfor %}
</div>
<form method="POST" action="{{ url_for('notify_event_attendees', event_id=event.id) }}" id="notify-form">
<input type="hidden" name="changes_text" id="changes-text">
</form>
<div class="modal-actions">
<button type="button" class="btn btn-outline" onclick="skipNotify()">{{ 'skip'|t }}</button>
<button type="button" class="btn btn-primary" onclick="notifyAttendees()">{{ 'notify_attendees_email'|t }}</button>
</div>
</div>
</div>
<script>
function notifyAttendees() {
const changesText = `{% for field, old_val, new_val in changes %}{{ field }}: {{ old_val }} → {{ new_val }}
{% endfor %}`.trim();
document.getElementById('changes-text').value = changesText;
document.getElementById('notify-form').submit();
}
function skipNotify() {
window.location.href = "{{ url_for('event_detail', code=event.code) }}";
}
</script>
{% endblock %}