Fix some minor visual things.

This commit is contained in:
Víðir Valberg Guðmundsson 2019-03-27 09:51:48 +01:00
parent 313ce98f8a
commit 5db3b8bf23
3 changed files with 133 additions and 127 deletions

View file

@ -16,7 +16,7 @@
<form class="login" method="POST">
{% csrf_token %}
{% bootstrap_form form %}
<button class="form-control btn btn-primary" type="submit">Save</button>
<button class="btn btn-primary" type="submit">Save</button>
</form>
</div>
</div>

View file

@ -4,133 +4,139 @@
{% block profile_content %}
<div class="panel-group">
<div class="panel panel-default">
<div class="panel panel-heading">
<h4>Details for Order #{{ order.id }}</h4>
</div>
<div class="panel panel-body">
{% if not order.paid %}
<form method="POST" class="form-inline">
{% csrf_token %}
{% endif %}
<table class="table table-bordered {% if not order.open == None %}table-hover{% endif %}">
<thead>
<tr>
<th>
Name
<th>
Quantity
<th>
Price
<th>
Total
<tbody>
{% for order_product in order.orderproductrelation_set.all %}
<tr>
<td>
{{ order_product.product.name }}
<td>
{% if not order.open == None %}
<input type="number"
class="form-control"
style="width: 75px;"
min=1
name="{{ order_product.id }}"
value="{{ order_product.quantity }}" />
{% bootstrap_button '<i class="glyphicon glyphicon-remove"></i>' button_type="submit" button_class="btn-danger" name="remove_product" value=order_product.pk %}
{% else %}
{{ order_product.quantity }}
{% endif %}
<td>
{{ order_product.product.price|currency }}
<td>
{{ order_product.total|currency }}
{% endfor %}
<tr>
<td colspan="2">
<td>
<strong>Included VAT (25%)</strong>
<td>
{{ order.vat|currency }}
<tr>
<td colspan="2">
<td>
<strong>Total</strong>
<td>
{{ order.total|currency }}<br />
</table>
{% if not order.open == None %}
<h4>Comment:</h4>
<textarea class="form-control" name="customer_comment" style="width: 100%;" placeholder="Please enter any comments or shipping address here...">{{ order.customer_comment }}</textarea></p>
{% elif order.open == None and order.comment %}
<div class="alert alert-info">{{ order.comment|linebreaks }}</div>
{% endif %}
{% if not order.open == None %}
<h4>Invoice Address:</h4>
<textarea class="form-control" name="invoice_address" style="width: 100%;" placeholder="Please enter the invoice address. Leave blank to use the email associated with the logged in user.">{{ order.invoice_address }}</textarea></p>
{% elif order.open == None and order.invoice_address %}
<h4>Invoice Address:</h4>
<div class="alert alert-info">{{ order.invoice_address|linebreaks }}</div>
{% endif %}
{% if order.open %}
{% bootstrap_button "Update order" button_type="submit" button_class="btn-primary" name="update_order" %}
{% endif %}
{% if not order.paid %}
{% bootstrap_button "Cancel order" button_type="submit" button_class="btn-danger" name="cancel_order" %}
{% endif %}
</div>
{% if order.paid %}
<div class="panel panel-footer">
<h4>Your order is paid in full.</h4>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4>Details for Order #{{ order.id }}</h4>
</div>
<div class="panel-body">
{% if not order.paid %}
<form method="POST" class="form-inline">
{% csrf_token %}
{% endif %}
<table class="table table-bordered {% if not order.open == None %}table-hover{% endif %}">
<thead>
<tr>
<th>
Name
<th>
Quantity
<th>
Price
<th>
Total
<tbody>
{% for order_product in order.orderproductrelation_set.all %}
<tr>
<td>
{{ order_product.product.name }}
<td>
{% if not order.open == None %}
<input type="number"
class="form-control"
style="width: 75px;"
min=1
name="{{ order_product.id }}"
value="{{ order_product.quantity }}" />
{% bootstrap_button '<i class="glyphicon glyphicon-remove"></i>' button_type="submit" button_class="btn-danger" name="remove_product" value=order_product.pk %}
{% else %}
{{ order_product.quantity }}
{% endif %}
<td>
{{ order_product.product.price|currency }}
<td>
{{ order_product.total|currency }}
{% endfor %}
<tr>
<td colspan="2">
<td>
<strong>Included VAT (25%)</strong>
<td>
{{ order.vat|currency }}
<tr>
<td colspan="2">
<td>
<strong>Total</strong>
<td>
{{ order.total|currency }}<br />
</table>
{% if not order.open == None %}
<h4>Comment:</h4>
<textarea class="form-control" name="customer_comment" style="width: 100%;" placeholder="Please enter any comments or shipping address here...">{{ order.customer_comment }}</textarea></p>
{% elif order.open == None and order.comment %}
<div class="alert alert-info">{{ order.comment|linebreaks }}</div>
{% endif %}
{% if not order.open == None %}
<h4>Invoice Address:</h4>
<textarea class="form-control" name="invoice_address" style="width: 100%;" placeholder="Please enter the invoice address. Leave blank to use the email associated with the logged in user.">{{ order.invoice_address }}</textarea></p>
{% elif order.open == None and order.invoice_address %}
<h4>Invoice Address:</h4>
<div class="alert alert-info">{{ order.invoice_address|linebreaks }}</div>
{% endif %}
{% if order.open %}
{% bootstrap_button "Update order" button_type="submit" button_class="btn-primary" name="update_order" %}
{% endif %}
{% if not order.paid %}
{% bootstrap_button "Cancel order" button_type="submit" button_class="btn-danger" name="cancel_order" %}
{% endif %}
</div>
{% if not order.paid %}
<div class="panel panel-default">
<div class="panel panel-heading">
<h4>Terms and Payment Options</h4><i class="icon-btc"></i>
</div>
<div class="panel panel-body">
<form method="POST" class="form-inline">
{% csrf_token %}
<div class="checkbox" style="margin-top: -10px;">
<label><input type="checkbox" name="accept_terms"> I accept the <a href="{% url 'general-terms' %}">general terms &amp; conditions</a>. Finally I accept to adhere to our <a href="{% url 'conduct' %}">Code of Conduct</a> during events as well as in BornHack online channels.</label>
</div>
<div class="btn-group btn-group-justified">
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-bitcoin'></i> Blockchain" button_type="submit" button_class="btn-primary" name="payment_method" value="blockchain" %}
</div>
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-piggy-bank'></i> Bank transfer" button_type="submit" button_class="btn-primary" name="payment_method" value="bank_transfer" %}
</div>
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-menu-hamburger'></i> Cash" button_type="submit" button_class="btn-primary" name="payment_method" value="cash" %}
</div>
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-credit-card'></i> Credit card*" button_type="submit" button_class="btn-primary" name="payment_method" value="credit_card" %}
</div>
</div>
</form>
<div class="alert alert-info" style="margin-top: 5px; margin-bottom: -10px;">* Please consider the alternatives before choosing credit card. Credit cards are expensive and difficult for us to handle. Thank you!</div>
</div>
<div class="panel panel-footer">
<i>Bank transfers take up to a week to get registered, but the other
payment methods should be more or less instant. Please
<a href="{% url 'contact' %}">contact us</a> if your have questions.</i>
</div>
</div>
{% endif %}
{% if order.paid %}
<div class="panel-footer">
<h4>Your order is paid in full.</h4>
</div>
{% endif %}
</div>
{% if not order.paid %}
<div class="panel panel-default">
<div class="panel-heading">
<h4>Terms and Payment Options</h4><i class="icon-btc"></i>
</div>
<div class="panel-body">
<form method="POST" class="form-inline">
{% csrf_token %}
<div class="checkbox" style="margin-top: -10px;">
<label>
<input type="checkbox" name="accept_terms" />
I accept the <a href="{% url 'general-terms' %}">general terms &amp; conditions</a>.
Finally I accept to adhere to our <a href="{% url 'conduct' %}">Code of Conduct</a>
during events as well as in BornHack online channels.
</label>
</div>
<div class="btn-group btn-group-justified">
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-bitcoin'></i> Blockchain" button_type="submit" button_class="btn-primary" name="payment_method" value="blockchain" %}
</div>
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-piggy-bank'></i> Bank transfer" button_type="submit" button_class="btn-primary" name="payment_method" value="bank_transfer" %}
</div>
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-menu-hamburger'></i> Cash" button_type="submit" button_class="btn-primary" name="payment_method" value="cash" %}
</div>
<div class="btn-group">
{% bootstrap_button "<i class='glyphicon glyphicon-credit-card'></i> Credit card*" button_type="submit" button_class="btn-primary" name="payment_method" value="credit_card" %}
</div>
</div>
</form>
<div class="alert alert-info" style="margin-top: 5px; margin-bottom: -10px;">* Please consider the alternatives before choosing credit card. Credit cards are expensive and difficult for us to handle. Thank you!</div>
</div>
<div class="panel-footer">
<i>Bank transfers take up to a week to get registered, but the other
payment methods should be more or less instant. Please
<a href="{% url 'contact' %}">contact us</a> if your have questions.</i>
</div>
</div>
{% endif %}
{% endblock %}

View file

@ -15,7 +15,7 @@
{% csrf_token %}
{% bootstrap_field form.name %}
{% bootstrap_field form.email %}
<button class="btn btn-primary form-control" type="submit"><i class="glyphicon glyphicon-check"></i> Save</button>
<button class="btn btn-primary" type="submit"><i class="glyphicon glyphicon-check"></i> Save</button>
</form>
</div>