{% extends 'dashboard/layout.html' %} {% load currency_filters %} {% load i18n %} {% block title %} {{ title }} | {% trans "Accounts" %} | {{ block.super }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block headertext %}{{ title }}{% endblock %} {% block dashboard_content %} {% if account %} {% include 'accounts/dashboard/partials/account_detail.html' %}

{% trans "Edit this account" %}

{% endif %}
{% trans "Edit" %}
{% csrf_token %} {{ form.non_field_errors }} {% include 'dashboard/partials/form_field.html' with field=form.name %} {% include 'dashboard/partials/form_field.html' with field=form.description %} {% if form.account_type %} {% include 'partials/form_field.html' with field=form.account_type %} {% endif %} {% if form.initial_amount %} {% trans "Initial transaction" %} {% if form.source_account %} {% include 'dashboard/partials/form_field.html' with field=form.source_account %} {% endif %} {% include 'dashboard/partials/form_field.html' with field=form.initial_amount %} {% endif %} {% trans "Restrictions" %}

{% trans "Restrict WHEN the account can be used" %}

{% include 'dashboard/partials/form_field.html' with field=form.start_date %} {% include 'dashboard/partials/form_field.html' with field=form.end_date %}

{% trans "Restrict WHO can use the account" %}

{% include 'dashboard/partials/form_field.html' with field=form.primary_user %} {% include 'dashboard/partials/form_field.html' with field=form.secondary_users %}

{% trans "Restrict WHAT can be bought" %}

{% include 'dashboard/partials/form_field.html' with field=form.product_range %} {% include 'dashboard/partials/form_field.html' with field=form.can_be_used_for_non_products %}
{% trans "or" %} {% trans "cancel" %}
{% endblock dashboard_content %} {% block onbodyload %} {{ block.super }} $('a.form-toggle').click(function(){ $($(this)[0].parentNode.nextElementSibling).toggle(); // Bind datepicker oscar.dashboard.init(); return false; }); {% endblock %}