{% from '_maintenance_fields.html' import maintenance_fields with context %} {% set page_title = 'Maintenance conflict' %} {% include '_header.html' %} {#- The refused write (ADR-0014). Two refusals land here, because the admin's situation is the same in both: **nothing was written**, and their own words are still theirs. One is the compare-and-set — the token the form carried no longer matches the stored pin, so both texts are shown, the stored one named and dated, and the re-submit carries the **refreshed** token. Two forms rather than one clever one: taking the stored words is a plain one-click submit, so it needs no JavaScript and no server-side "which field wins" rule. The other is an **expiry we will not accept** (`problem`): not one of the explicit duration/calendar forms, not in the future, or longer than a year. A zero or negative window used to be written happily and then swept away a tick later, taking the reason and both authorships with it — a lost explanation behind a redirect that looked like success, which is exactly what this page exists to make impossible. Here the token is unchanged, because nothing about the stored pin moved — and so is what the expiry field had been filled with. The expiry field (ADR-0104 decision 5): `duration` is what it shows and `expiry_was` what the form says it was filled with. Where the admin left the field as filled (`kept`) the route fills both again from the pin as it stands now, so saving their words keeps that expiry, and the button that would carry *their* expiry over the stored note has nothing to carry; where the pin is gone the field is a new pin's. -#}
{#- The node's path as every page writes one; `path` is what the form posted, which a node's own page spells without its leading slash, and is what these forms post back. -#}

Maintenance — {{ node_path }}{% if slug %} · one reason{% endif %}

{% if problem %}

Nothing was saved. {{ problem }}

Your note

{%- if slug %}{% endif %} {{ maintenance_fields(mine, duration, 'conflict', maintenance_default, maintenance_timezone, false, expiry_was) }}
Change nothing {% elif stored %}

Nothing was saved. {{ stored.set_by or 'Someone else' }} changed this pin {{ stored.set_at | localtime }}, after the form you submitted was drawn.

Pinned by {{ stored.created_by or 'unknown' }} {{ stored.created_at | localtime }}; expires {{ stored.expires_at | localtime }}.

The stored note

{% if stored.reason and stored.reason != 'maintenance' %}
{{ stored.reason | markdown }}
{% else %}

No explanation was given.

{% endif %}
{% if clearing %}

You asked to clear a pin that is no longer the one above. Clear it anyway, or leave it as it stands.

{%- if slug %}{% endif %}
Leave it pinned {% else %}

Your note

{%- if slug %}{% endif %} {{ maintenance_fields(mine, duration, 'conflict', maintenance_default, maintenance_timezone, false, expiry_was) }}
{%- if not kept %}
{%- if slug %}{% endif %}
{%- endif %} Change nothing {% endif %} {% else %}

Nothing was saved. The pin you were working on is gone — someone cleared it, or it expired — so this node is not in maintenance at all.

{% if clearing %}

There is nothing left to clear.

Back {% else %}

Pin it again

{%- if slug %}{% endif %} {{ maintenance_fields(mine, duration, 'conflict', maintenance_default, maintenance_timezone) }}
Leave it unpinned {% endif %} {% endif %}
{% include '_page_end.html' %}