Fixes for the selection of current rigs.

Added checked in field for dry hires
This commit is contained in:
tomtom5152
2015-01-28 16:30:32 +00:00
parent df67788865
commit 41bd6bc384
4 changed files with 64 additions and 30 deletions

View File

@@ -230,32 +230,44 @@
<label for="{{ form.start_date.id_for_label }}"
class="col-sm-4 control-label">{{ form.start_date.label }}</label>
<div class="col-sm-4">
<input type="date" name="{{ form.start_date.name }}"
id="{{ form.start_date.id_for_label }}"
class="form-control start_date" required
value="{{ form.start_date.value|date:"Y-m-d" }}"/>
</div>
<div class="col-sm-4">
{% render_field form.start_time type="time" class+="form-control" %}
<div class="col-sm-8">
<div class="row">
<div class="col-sm-12 col-md-7">
<input type="date" name="{{ form.start_date.name }}"
id="{{ form.start_date.id_for_label }}"
class="form-control start_date" required
value="{{ form.start_date.value|date:"Y-m-d" }}"/>
</div>
<div class="col-sm-12 col-md-5">
{% render_field form.start_time type="time" class+="form-control" %}
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="{{ form.end_date.id_for_label }}"
class="col-sm-4 control-label">{{ form.end_date.label }}</label>
<div class="col-sm-4">
<input type="date" name="{{ form.end_date.name }}" id="{{ form.end_date.id_for_label }}"
class="form-control end_date" required
value="{{ form.end_date.value|date:"Y-m-d" }}"/>
</div>
<div class="col-sm-4">
{% render_field form.end_time type="time" class+="form-control end_time" %}
</div>
<div class="col-sm-offset-8 col-sm-4">
<div class="btn-group btn-group-justified">
<btn class="btn btn-default btn-xs" onclick="setTime23Hours()">23:00</btn>
<btn class="btn btn-default btn-xs" onclick="setTime02Hours()">02:00</btn>
<div class="col-sm-8">
<div class="row">
<div class="col-sm-12 col-md-7">
<input type="date" name="{{ form.end_date.name }}"
id="{{ form.end_date.id_for_label }}"
class="form-control end_date" required
value="{{ form.end_date.value|date:"Y-m-d" }}"/>
</div>
<div class="col-sm-12 col-md-5">
{% render_field form.end_time type="time" class+="form-control end_time" %}
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-offset-7 col-md-5">
<div class="btn-group btn-group-justified">
<btn class="btn btn-default btn-xs" onclick="setTime23Hours()">23:00</btn>
<btn class="btn btn-default btn-xs" onclick="setTime02Hours()">02:00</btn>
</div>
</div>
</div>
</div>
</div>
@@ -316,6 +328,25 @@
value="{{ object.mic.name|default_if_none:"" }}"/>
</div>
</div>
{% if object.dry_hire %}
<div class="form-group">
<label for="{{ form.checked_in_by.id_for_label }}"
class="col-sm-4 control-label">{{ form.checked_in_by.label }}</label>
<div class="col-sm-8">
<input type="hidden" id="{{ form.checked_in_by.id_for_label }}"
name="{{ form.checked_in_by.name }}"
value="{{ form.checked_in_by.value|default_if_none:"" }}"/>
<input type="text" id="{{ form.checked_in_by.id_for_label }}-input"
class="form-control autocomplete-json"
data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,username,initials"
data-target="{{ form.checked_in_by.id_for_label }}"
value="{{ object.checked_in_by.name|default_if_none:"" }}"/>
</div>
</div>
{% endif %}
</div>
</div>
</div>