Minor tweaks before testing

This commit is contained in:
Tobias 2018-09-30 08:56:30 +13:00
parent c47c22d617
commit bcdc6a864a
5 changed files with 18 additions and 11 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
/usr/local/bin/python /app/symposion_app/manage.py migrate /usr/local/bin/python /app/symposion_app/manage.py migrate
/usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/{conference,proposal_base,sites,sitetree,flatpages}.json /usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/{conference,proposal_base,sites,flatpages}.json
/usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/{2019_groups,2019_registrasion,2019_schedule,2019_sitetree,2019_flatpages}.json /usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/{2019_groups,2019_registrasion,2019_schedule,2019_sitetree,2019_flatpages}.json
/usr/local/bin/python /app/symposion_app/manage.py create_review_permissions /usr/local/bin/python /app/symposion_app/manage.py create_review_permissions

View file

@ -48,12 +48,10 @@
</fieldset> </fieldset>
{% endfor %} {% endfor %}
<div class="btn-group">
{% if current_step > 1 %} {% if current_step > 1 %}
<a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a> <a class="btn btn-primary" role="button" href="{{ previous_step }}">Back</a>
{% endif %} {% endif %}
<input class="btn btn-primary" type="submit" value="Next Step" /> <input class="btn btn-primary" type="submit" value="Next Step" />
</div>
</form> </form>

View file

@ -91,9 +91,7 @@
{% csrf_token %} {% csrf_token %}
{% include "_form_snippet.html" with form=form %} {% include "_form_snippet.html" with form=form %}
<br /> <br />
<div class="btn-group">
<input id="pay" class="btn btn-primary" type="submit" value="Pay ${{ invoice.balance_due }}" /> <input id="pay" class="btn btn-primary" type="submit" value="Pay ${{ invoice.balance_due }}" />
</div>
</fieldset> </fieldset>
</form> </form>
{% endblock %} {% endblock %}

View file

@ -4,6 +4,7 @@
{% load teams_tags %} {% load teams_tags %}
{% load registrasion_tags %} {% load registrasion_tags %}
{% load lca2018_tags %} {% load lca2018_tags %}
{% load lca2019_tags %}
{% load staticfiles %} {% load staticfiles %}
{% if user.is_staff %} {% if user.is_staff %}
@ -78,7 +79,7 @@
<div class="col-6 my-3 d-flex flex-column"> <div class="col-6 my-3 d-flex flex-column">
<h4>Items pending payment</h4> <h4>Items pending payment</h4>
{% include "registrasion/_items_list.html" with items=pending %} {% include "registrasion/_items_list.html" with items=pending %}
<a class="btn btn-lg btn-success" role="button" href="{% url "checkout" %}">Check out and pay</a> <a class="btn btn-lg btn-primary" role="button" href="{% url "checkout" %}">Check out and pay</a>
</div> </div>
{% endif %} {% endif %}
@ -107,9 +108,11 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% if invoices|any_is_void %}
<div class="mt-auto"> <div class="mt-auto">
<button id="toggle-void-invoices" onclick="toggleVoidInvoices();" class="btn btn-lg btn-default">Show void invoices</button> <button id="toggle-void-invoices" onclick="toggleVoidInvoices();" class="btn btn-lg btn-default">Show void invoices</button>
</div> </div>
{% endif %}
</div> </div>
{% endif %} {% endif %}

View file

@ -14,3 +14,11 @@ def has_required_fields(form):
if field.field.required: if field.field.required:
return True return True
return False return False
@register.filter
def any_is_void(invoices):
for invoice in invoices:
if invoice.is_void:
return True
return False