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"> <form class="login" method="POST">
{% csrf_token %} {% csrf_token %}
{% bootstrap_form form %} {% bootstrap_form form %}
<button class="form-control btn btn-primary" type="submit">Save</button> <button class="btn btn-primary" type="submit">Save</button>
</form> </form>
</div> </div>
</div> </div>

View file

@ -4,133 +4,139 @@
{% block profile_content %} {% block profile_content %}
<div class="panel-group"> <div class="panel panel-default">
<div class="panel panel-default"> <div class="panel-heading">
<div class="panel panel-heading"> <h4>Details for Order #{{ order.id }}</h4>
<h4>Details for Order #{{ order.id }}</h4> </div>
</div> <div class="panel-body">
<div class="panel panel-body"> {% if not order.paid %}
{% if not order.paid %} <form method="POST" class="form-inline">
<form method="POST" class="form-inline"> {% csrf_token %}
{% csrf_token %} {% endif %}
{% endif %} <table class="table table-bordered {% if not order.open == None %}table-hover{% endif %}">
<table class="table table-bordered {% if not order.open == None %}table-hover{% endif %}">
<thead>
<thead> <tr>
<tr> <th>
<th> Name
Name <th>
<th> Quantity
Quantity <th>
<th> Price
Price <th>
<th> Total
Total
<tbody>
<tbody> {% for order_product in order.orderproductrelation_set.all %}
{% for order_product in order.orderproductrelation_set.all %} <tr>
<tr> <td>
<td> {{ order_product.product.name }}
{{ order_product.product.name }} <td>
<td> {% if not order.open == None %}
{% if not order.open == None %} <input type="number"
<input type="number" class="form-control"
class="form-control" style="width: 75px;"
style="width: 75px;" min=1
min=1 name="{{ order_product.id }}"
name="{{ order_product.id }}" value="{{ order_product.quantity }}" />
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 %}
{% bootstrap_button '<i class="glyphicon glyphicon-remove"></i>' button_type="submit" button_class="btn-danger" name="remove_product" value=order_product.pk %} {% else %}
{% else %} {{ order_product.quantity }}
{{ order_product.quantity }} {% endif %}
{% endif %} <td>
<td> {{ order_product.product.price|currency }}
{{ order_product.product.price|currency }} <td>
<td> {{ order_product.total|currency }}
{{ order_product.total|currency }}
{% endfor %}
{% endfor %}
<tr>
<tr> <td colspan="2">
<td colspan="2"> <td>
<td> <strong>Included VAT (25%)</strong>
<strong>Included VAT (25%)</strong> <td>
<td> {{ order.vat|currency }}
{{ order.vat|currency }}
<tr>
<tr> <td colspan="2">
<td colspan="2"> <td>
<td> <strong>Total</strong>
<strong>Total</strong> <td>
<td> {{ order.total|currency }}<br />
{{ order.total|currency }}<br />
</table>
</table>
{% if not order.open == None %}
{% if not order.open == None %} <h4>Comment:</h4>
<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>
<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 %}
{% elif order.open == None and order.comment %} <div class="alert alert-info">{{ order.comment|linebreaks }}</div>
<div class="alert alert-info">{{ order.comment|linebreaks }}</div> {% endif %}
{% endif %}
{% if not order.open == None %}
{% if not order.open == None %} <h4>Invoice Address:</h4>
<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>
<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 %}
{% elif order.open == None and order.invoice_address %} <h4>Invoice Address:</h4>
<h4>Invoice Address:</h4> <div class="alert alert-info">{{ order.invoice_address|linebreaks }}</div>
<div class="alert alert-info">{{ order.invoice_address|linebreaks }}</div> {% endif %}
{% endif %}
{% if order.open %}
{% if order.open %} {% bootstrap_button "Update order" button_type="submit" button_class="btn-primary" name="update_order" %}
{% bootstrap_button "Update order" button_type="submit" button_class="btn-primary" name="update_order" %} {% endif %}
{% endif %} {% if not order.paid %}
{% if not order.paid %} {% bootstrap_button "Cancel order" button_type="submit" button_class="btn-danger" name="cancel_order" %}
{% 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>
{% endif %} {% 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> </div>
{% endif %} {% if order.paid %}
<div class="panel-footer">
<h4>Your order is paid in full.</h4>
</div>
{% endif %}
</div> </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 %} {% endblock %}

View file

@ -15,7 +15,7 @@
{% csrf_token %} {% csrf_token %}
{% bootstrap_field form.name %} {% bootstrap_field form.name %}
{% bootstrap_field form.email %} {% 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> </form>
</div> </div>