42 lines
2.4 KiB
HTML
42 lines
2.4 KiB
HTML
{% extends "common.html" %}
|
|
{% block title %}{% if flower.organization %}Edit{% else %}New entry{% endif %} · Flowers{% endblock %}
|
|
{% block menuoptions %}
|
|
<form action="{{ url_for('flower_vase.application') }}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="action" value="list">
|
|
<button class="button ghost compact" type="submit">Cancel</button>
|
|
</form>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<section class="editor-layout">
|
|
<div>
|
|
<p class="eyebrow">{% if flower.organization %}New version{% else %}New credential{% endif %}</p>
|
|
<h1>{% if flower.organization %}Edit entry{% else %}Add an entry{% endif %}</h1>
|
|
<p class="muted">Saving creates a new version. Your historical rows remain untouched.</p>
|
|
</div>
|
|
<form class="card form-card wide" action="{{ url_for('flower_vase.application') }}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="action" value="save">
|
|
<input type="hidden" name="filter" value="{{ filter|default('') }}">
|
|
<label for="organization">Organization</label>
|
|
<input maxlength="80" id="organization" name="organization" type="text" value="{{ flower.organization }}" autocomplete="organization" required>
|
|
<label for="myname">Your name <span>optional</span></label>
|
|
<input maxlength="70" id="myname" name="myname" type="text" value="{{ flower.myName }}" autocomplete="name">
|
|
<label for="myid">Login</label>
|
|
<input maxlength="70" id="myid" name="myid" type="text" value="{{ flower.myID }}" autocomplete="username" required>
|
|
<label for="secret">Secret</label>
|
|
<input maxlength="120" id="secret" name="secret" type="password" autocomplete="new-password" required>
|
|
<button class="button primary" type="submit">Save new version</button>
|
|
</form>
|
|
{% if flower.dateCreated %}
|
|
<form class="danger-zone" action="{{ url_for('flower_vase.application') }}" method="post" onsubmit="return confirm('Remove this entry from the active list?')">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="action" value="deactivate">
|
|
<input type="hidden" name="organization" value="{{ flower.organization }}">
|
|
<input type="hidden" name="datetime" value="{{ flower.dateCreated }}">
|
|
<button class="button danger" type="submit">Deactivate entry</button>
|
|
</form>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|