{% extends "templates/web.html" %} {% block title %}{{ _(title) }}{% endblock %} {% block header %}

{{ _(title) }}

{% endblock %} {% block breadcrumbs %} {% if has_header and login_required %} {% include "templates/includes/breadcrumbs.html" %} {% endif %} {% endblock %} {% block header_actions %} {% if not read_only and has_header %}
{% if login_required -%} {{ _("Cancel") }} {%- endif %} {% if not is_list %} {% endif %}
{% endif %} {% if is_list %}
{{ _("New") }}
{% endif %} {%- if allow_print and not is_list and not _login_required -%}
{{ _("Print") }}
{%- endif -%} {% endblock %} {% block page_content %}
{% if introduction_text %}

{{ _(introduction_text) }}

{% endif %}
{% if _login_required %}
{{ _("Please sign-up or login to begin") }}

{{ _("Login") }}

{% elif is_list %} {% include "templates/includes/list/list.html" %} {% else %}
{%- macro properties(field) %} name="{{ field.fieldname }}" data-fieldname="{{ field.fieldname }}" {% if field.placeholder -%} placeholder="{{ _(field.placeholder) }}" {%- endif %} data-label="{{ _(field.label) }}" data-fieldtype="{{ field.fieldtype }}" data-doctype="{{ field.parent }}" data-default="{{ field.default or "" }}" {{ field.reqd and "data-reqd=1" or "" }} {{ (read_only or field.read_only) and "disabled" or "" }} {% endmacro -%} {%- macro value(field, _doc) -%} {%- if _doc -%} {%- set _value = _doc.get(field.fieldname) or frappe.form_dict.get(field.fieldname) -%} {%- else -%} {%- set _value = frappe.form_dict.get(field.fieldname) or field.default -%} {%- endif -%} {{ "" if _value==None else _value }} {%- endmacro -%} {%- macro help(field) -%} {% if field.description -%} {{ _(field.description) }} {%- endif -%} {%- endmacro %} {% macro label(field) %} {% endmacro %} {% macro render_field(field, _doc=None, with_label=True) %} {% if field.hidden %} {% elif field.fieldtype == "HTML" and field.options %}
{{ field.options }}
{% elif field.fieldtype in ("Data", "Date", "Datetime", "Int", "Float") %}
{% if with_label %}{{ label(field) }}{% endif %} {{ help(field) }}
{% elif field.fieldtype=="Link" %}
{% if with_label %}{{ label(field) }}{% endif %} {{ help(field) }}
{% elif field.fieldtype=="Select" %}
{% if with_label %}{{ label(field) }}{% endif %} {{ help(field) }}
{% elif field.fieldtype in ("Text", "Small Text") %}
{% if with_label %}{{ label(field) }}{% endif %} {{ help(field) }}
{% elif field.fieldtype == "Text Editor" %}
{% if with_label %}{{ label(field) }}{% endif %} {{ help(field) }}
{{ value(field, _doc) }}
{% elif field.fieldtype=="Attach" %}
{% if with_label %}{{ label(field) }}{% endif %} {% if value(field, _doc) -%}

{{ _doc.get(field.fieldname) }}

{%- endif %}

{{ _("Max attachment size is {0}MB").format(max_attachment_size) }}

{{ help(field) }}
{% elif field.fieldtype=="Check" %}
{% if with_label %} {% endif %} {{ help(field) }}
{% endif %} {% endmacro %} {% macro render_row(field, d=None, hidden=False) %} {% for df in frappe.get_meta(field.options).fields %} {% if df.in_list_view %} <{{ 'th' if d==None else 'td' }} style="width: {{ (df.columns or 2) * 8.3333 }}%;"> {% if d!=None %} {{ render_field(df, d, False) }} {% else %} {{ _(df.label) }} {% endif %} {% endif %} {% endfor %} {% if d!=None %} {% endif %} {% endmacro %} {% macro render_table(field) %} {{ label(field) }}
{{ render_row(field) }} {{ render_row(field, {}, True) }} {% if doc and doc.get(field.fieldname) %} {% for d in doc.get(field.fieldname) %} {{ render_row(field, d) }} {% endfor %} {% endif %}

{% endmacro %} {% if not frappe.form_dict.new and layout|len > 1 %}
{% for page in layout %} {% endfor %}
{% endif %}
{% if frappe.form_dict.name and web_page_link_text %}
{% endif %} {% for page in layout %} {% set last_page = True if loop.index == layout|len else False %}
{% if page.label %}

{{ page.label }}

{% endif %} {% if page.description %}

{{ page.description }}


{% endif %} {% for section in page.sections %}
{% if section.label %}
{{ _(section.label) }}
{{ _(section.description) }} {% endif %}
{% for column in section.columns %}
{% for field in column %} {% if field.fieldtype=='Table' %} {{ render_table(field) }} {% else %} {{ render_field(field, doc) }} {% endif %} {% endfor %}
{% endfor %}
{% endfor %} {% if last_page and accept_payment %}
{% if not doc.paid %} {% if payment_button_help %}
{{ payment_button_help }}
{% endif %} {{ payment_button_label or "Pay"}} {% else %}
{{ _("Payment Complete") }}
{% endif %}
{% endif %}
{% if layout|len > 1 %}

{{ _("Page {0} of {1}").format(loop.index, layout|len) }}

{% endif %}

{%- if loop.index > 1 -%} {%- endif -%} {% if (loop.index == layout|len or frappe.form_dict.new) %} {% if not read_only %} {% endif %} {% elif layout|len > 1 %} {% endif %}

{% endfor %}
{% if allow_comments and not frappe.form_dict.new -%}


{{ _("Comments") }}

{% include 'templates/includes/comments/comments.html' %}
{%- endif %} {% endif %}
{% endblock %} {% block script %} {% endblock %} {% block style %} {% endblock %}