-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathadd.html
More file actions
88 lines (81 loc) · 3.03 KB
/
add.html
File metadata and controls
88 lines (81 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}
{% if action == 'edit' %}
{% trans "Edit Exhibitor" %}
{% else %}
{% trans "Add Exhibitor" %}
{% endif %}
{% endblock %}
{% block content %}
<nav id="event-nav" class="header-nav">
<div class="navigation">
<div class="navigation-title">
<h1>
{% if action == 'edit' %}
{% trans "Edit Exhibitor" %}
{% else %}
{% trans "Add Exhibitor" %}
{% endif %}
</h1>
</div>
{% include "pretixcontrol/event/component_link.html" %}
</div>
</nav>
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %}
{% bootstrap_form_errors form %}
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="control" %}
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.email layout="control" %}
{% bootstrap_field form.logo layout="control" %}
{% bootstrap_field form.url layout="control" %}
{% bootstrap_field form.booth_name layout="control" %}
{% bootstrap_field form.booth_id layout="control" %}
</fieldset>
<fieldset>
<legend>{% trans "Lead scanning" %}</legend>
{% bootstrap_field form.allow_voucher_access layout="control" %}
{% bootstrap_field form.lead_scanning_enabled layout="control" %}
{% bootstrap_field form.allow_lead_access layout="control" %}
{% bootstrap_field form.lead_scanning_scope_by_device layout="control" %}
</fieldset>
<fieldset>
<legend>{% trans "Status" %}</legend>
{% bootstrap_field form.status layout="control" %}
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% if action == 'edit' %}
{% trans "Save changes" %}
{% else %}
{% trans "Save" %}
{% endif %}
</button>
<a class="btn btn-default btn-lg"
href="{% url 'plugins:exhibition:info' organizer=request.event.organizer.slug event=request.event.slug %}">
{% trans "Cancel" %}
</a>
</div>
</form>
<script>
document.addEventListener('DOMContentLoaded', function() {
const form = document.querySelector('form.form-horizontal');
if (form) {
form.addEventListener('submit', function() {
const submitBtn = form.querySelector('button[type="submit"]');
if (submitBtn) {
// Prevent duplicate submission
submitBtn.disabled = true;
// Show loading indicator
const originalText = submitBtn.innerText;
submitBtn.innerHTML = '<i class="fa fa-spinner fa-spin"></i> ' + originalText;
}
});
}
});
</script>
{% endblock %}