mirror of
https://forge.dns-witch.net/dns-witch/nomilo.git
synced 2026-07-02 20:55:03 +02:00
71 lines
2.8 KiB
HTML
71 lines
2.8 KiB
HTML
<h1>{{ tr(msg="record-config-web-heading", name=new_record_name) }}</h1>
|
|
|
|
<form id="main-form" method="post" action="">
|
|
{% include "partials/advanced_mode.html" %}
|
|
|
|
<h3>{{ tr(msg="record-config-section-web", attr="servers") }}</h3>
|
|
|
|
{% if advanced %}
|
|
<div class="form-input">
|
|
{{
|
|
<form.input
|
|
id="address-ttl"
|
|
name="addresses[ttl]"
|
|
value={input_data?.addresses?.ttl}
|
|
type="number"
|
|
errors={errors}
|
|
errors_keys={[ "/addresses/ttl" ]}
|
|
error_msg_id="record-input-ttl"
|
|
description={tr(msg="record-input-ttl", attr="help")}
|
|
label={tr(msg="record-input-ttl", attr="input-label")}
|
|
lang={lang}
|
|
/>
|
|
}}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<input
|
|
type="hidden"
|
|
name="addresses[ttl]"
|
|
value="{{ input_data?.addresses?.ttl | default(value="") }}"
|
|
>
|
|
{% endif %}
|
|
|
|
{%- for address in input_data?.addresses?.data?.addresses | default(value=[ none ]) -%}
|
|
<div class="form-input" data-new-item-template="address">
|
|
{{
|
|
<form.input
|
|
id={"address-" ~ loop.index0}
|
|
name={"addresses[data][addresses][" ~loop.index0 ~ "][address]"}
|
|
value={address?.address}
|
|
type="text"
|
|
errors={errors}
|
|
errors_keys={[
|
|
"/addresses/data",
|
|
"/addresses/data/addresses/" ~ loop.index0 ~ "/address",
|
|
]}
|
|
error_msg_id="record-input-addresses"
|
|
label={tr(msg="record-input-addresses", attr="input-label", index=loop.index)}
|
|
label_attributes={ {"data-new-item-template-attr": "for",
|
|
"data-template-for": "address-{i}",
|
|
"data-new-item-template-content": tr(msg="record-input-addresses", attr="input-label", index="{i}")
|
|
} }
|
|
delete_button_msg={tr(msg="record-input-addresses", attr="delete-button", index=loop.index)}
|
|
delete_button_msg_template={tr(msg="record-input-addresses", attr="delete-button", index="{i}")}
|
|
attributes={ {
|
|
"data-new-item-template-attr": "name id",
|
|
"data-template-name": "addresses[data][addresses][{i}][address]",
|
|
"data-template-id": "address-{i}",
|
|
} }
|
|
lang={lang}
|
|
/>
|
|
}}
|
|
</div>
|
|
{%- endfor -%}
|
|
<button class="link" type="button" data-new-item="address">
|
|
{{ <icon.plus_circle /> }}
|
|
{{ tr(msg="button-add-address") }}
|
|
</button>
|
|
|
|
{% include "partials/form_submit.html" %}
|
|
</form>
|