Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a0b2e6dd3d
4 changed files with 10 additions and 7 deletions
1
app/static/css/select2-bootstrap.min.css
vendored
Normal file
1
app/static/css/select2-bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -24,8 +24,8 @@
|
||||||
<h4>Order:</h4>
|
<h4>Order:</h4>
|
||||||
<form method="post" action="{{ url_for('.order_item_create', id=order.id) }}">
|
<form method="post" action="{{ url_for('.order_item_create', id=order.id) }}">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="form-group {{ 'has-errors' if form.product_id.errors else ''}}">
|
<div class="form-group select2-container select2 {{ 'has-errors' if form.product_id.errors}}">
|
||||||
{{ form.product_id.label(class='control-label') }}
|
{{ form.product_id.label(class='control-label') }}<br>
|
||||||
{{ form.product_id(class='form-control select') }}
|
{{ form.product_id(class='form-control select') }}
|
||||||
{{ util.render_form_field_errors(form.product_id) }}
|
{{ util.render_form_field_errors(form.product_id) }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
{{ util.render_form_field_errors(form.name) }}
|
{{ util.render_form_field_errors(form.name) }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="form-group">
|
<div class="form-group" style="padding-top: 8px;">
|
||||||
{{ form.submit_button(class='btn btn-primary') }}
|
{{ form.submit_button(class='btn btn-primary') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -71,6 +71,7 @@
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/select2-bootstrap.min.css') }}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
<h3>Create new order:</h3>
|
<h3>Create new order:</h3>
|
||||||
<form method="post" action="{{ url_for('.order_create') }}">
|
<form method="post" action="{{ url_for('.order_create') }}">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="form-group {{ 'has-errors' if form.courrier_id.errors else ''}}">
|
<div class="form-group select2 {{ 'has-errors' if form.courrier_id.errors else ''}}">
|
||||||
{{ form.courrier_id.label(class='control-label') }}
|
{{ form.courrier_id.label(class='control-label') }}<br>
|
||||||
{{ form.courrier_id(class='form-control select') }}
|
{{ form.courrier_id(class='form-control select') }}
|
||||||
{{ util.render_form_field_errors(form.courrier_id) }}
|
{{ util.render_form_field_errors(form.courrier_id) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group {{ 'has-errors' if form.location_id.errors else ''}}{{ ' required' if form.location_id.flags.required }}">
|
<div class="form-group select2 {{ 'has-errors' if form.location_id.errors else ''}}{{ ' required' if form.location_id.flags.required }}">
|
||||||
{{ form.location_id.label(class='control-label') }}
|
{{ form.location_id.label(class='control-label') }}
|
||||||
{{ form.location_id(class='form-control select') }}
|
{{ form.location_id(class='form-control select') }}
|
||||||
{{ util.render_form_field_errors(form.location_id) }}
|
{{ util.render_form_field_errors(form.location_id) }}
|
||||||
|
@ -63,6 +63,7 @@
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-datetimepicker.min.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-datetimepicker.min.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/select2-bootstrap.min.css') }}">
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{% block scripts -%}
|
{% block scripts -%}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
|
|
|
@ -56,7 +56,7 @@ def order_item_create(id):
|
||||||
abort(404)
|
abort(404)
|
||||||
if current_order.stoptime and current_order.stoptime < datetime.now():
|
if current_order.stoptime and current_order.stoptime < datetime.now():
|
||||||
abort(404)
|
abort(404)
|
||||||
if current_user.is_anonymous() and not order.public:
|
if current_user.is_anonymous() and not current_order.public:
|
||||||
flash('Please login to see this order.', 'info')
|
flash('Please login to see this order.', 'info')
|
||||||
abort(401)
|
abort(401)
|
||||||
form = AnonOrderItemForm() if current_user.is_anonymous() else OrderItemForm()
|
form = AnonOrderItemForm() if current_user.is_anonymous() else OrderItemForm()
|
||||||
|
|
Loading…
Reference in a new issue