mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 09:22:21 +00:00
Updates to AJAX forms and adding autofill function to the event form when adding things via AJAX
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
$(document).ready(function () {
|
||||
{% if not object.pk and not form.errors %}
|
||||
|
||||
|
||||
$('.form-hws').slideUp(function () {
|
||||
$('.form-is_rig').slideUp();
|
||||
});
|
||||
@@ -111,11 +110,9 @@
|
||||
data-target="{{ form.person.id_for_label }}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 align-right">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-url="{#% url invoiceitem_add object.pk %#}"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<a href="{% url 'person_create' %}" class="btn btn-default modal-href" data-target="#{{ form.person.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,11 +135,9 @@
|
||||
data-target="{{ form.organisation.id_for_label }}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 align-right">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-url="{#% url invoiceitem_add object.pk %#}"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<a href="{% url 'organisation_create' %}" class="btn btn-default modal-href" data-target="#{{ form.organisation.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,11 +194,9 @@
|
||||
data-target="{{ form.venue.id_for_label }}"/>
|
||||
</div>
|
||||
<div class="col-xs-3 align-right">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-url="{#% url invoiceitem_add object.pk %#}"
|
||||
data-toggle="modal" data-target="#itemModal">
|
||||
<a href="{% url 'venue_create' %}" class="btn btn-default modal-href" data-target="#{{ form.venue.id_for_label }}">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<h3>{{ object.pk|yesno:"Edit,Add" }} Organisation</h3>
|
||||
|
||||
<form action="{{ form.action }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'form_errors.html' %}
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<h3>{{ object.pk|yesno:"Edit,Add" }} Person</h3>
|
||||
|
||||
<form action="{{ form.action }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="row">
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="col-md-6">
|
||||
{% include 'form_errors.html' %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.name.id_for_label }}"
|
||||
class="col-sm-2 control-label">{{ form.name.label }}</label>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col-sm-offset-1 col-sm-10">
|
||||
<h3>{{ object.pk|yesno:"Edit,Add" }} Venue</h3>
|
||||
|
||||
<form action="{{ form.action }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<form action="{{ form.action|default:request.path }}" method="post" class="form-horizontal">{% csrf_token %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{% include 'form_errors.html' %}
|
||||
|
||||
Reference in New Issue
Block a user