23 lines
1.2 KiB
HTML
23 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{% if edit %}Rediģēt{% else %}Pievienot{% endif %} jaunu piezīmi{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1 class="mb-4">{% if edit %}Rediģēt{% else %}Pievienot{% endif %} jaunu piezīmi</h1>
|
|
<form method="post">
|
|
<div class="mb-3">
|
|
<label for="noteTitle" class="form-label">Nosaukums</label>
|
|
<input type="text" class="form-control" value="{{ note.name }}" name="name" id="noteTitle" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="noteTags" class="form-label">Birkas</label>
|
|
<input type="text" class="form-control" value="{{ '|'.join(note.tags) }}" id="noteTags" name="tags" placeholder="Birkas raksta, atdalot tās ar simbolu '|'!">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="noteContent" class="form-label">Saturs</label>
|
|
<textarea class="form-control" id="noteContent" name="content" rows="5" required>{{ note.content }}</textarea>
|
|
</div>
|
|
<button type="submit" class="btn btn-success">{% if edit %}Rediģēt{% else %}Pievienot{% endif %} piezīmi</button>
|
|
<a href="{{ url_for('edit_list', name=list_name) }}" class="btn btn-secondary">Atcelt</a>
|
|
</form>
|
|
{% endblock %} |