Añadidas tandas: 4, 4b y 7 #33
@ -7,9 +7,9 @@
|
||||
{% block content %}
|
||||
<h2>Editar categoría</h2>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||
<a class="btn btn-secondary" href="{% url 'category_list' %}">Cancelar</a>
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
|
||||
<h1>Mis categorías</h1>
|
||||
|
||||
<h3> Nueva categoría</h3>
|
||||
<form method="post">
|
||||
<h3>Nueva categoría</h3>
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<button type="submit" class="btn btn-primary">Crear</button>
|
||||
</form>
|
||||
|
||||
@ -19,15 +19,16 @@
|
||||
|
||||
<h3>Listado</h3>
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Categoría</th>
|
||||
<th>Categoría padre</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Categoría</th>
|
||||
<th>Categoría padre</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td>{{ category.name }}</td>
|
||||
<td>{% if category.parent %}{{ category.parent.name }}{% endif %}</td>
|
||||
@ -36,9 +37,9 @@
|
||||
<a href="{% url 'category_delete' category.id %}" class="danger">Eliminar</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@ -10,9 +10,9 @@
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||
|
||||
@ -17,34 +17,10 @@
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
|
||||
{% for field in form %}
|
||||
{% if field.name == "tags" %}
|
||||
<div class="form-field">
|
||||
{{ field.label_tag }}
|
||||
<div class="tag-chip-list">
|
||||
{% for checkbox in field %}
|
||||
<label class="tag-chip">
|
||||
{{ checkbox.tag }}
|
||||
<span>{{ checkbox.choice_label }}</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if field.errors %}
|
||||
<div class="form-errors">{{ field.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p>
|
||||
{{ field.label_tag }} {{ field }}
|
||||
{% if field.errors %}
|
||||
<span class="form-errors">{{ field.errors }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% if form.instance.pk %}
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
{% block content %}
|
||||
<h1>Etiqueta</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">Guardar</button>
|
||||
<a class="btn btn-secondary" href="{% url 'tag_list' %}">Volver</a>
|
||||
|
||||
@ -17,10 +17,10 @@
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{% if editing %}
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
{% extends "expenses/base.html" %}
|
||||
{% block title %}
|
||||
Nuevo objetivo
|
||||
{{ title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
Nuevo objetivo
|
||||
{{ title }}
|
||||
</h1>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Guardar
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
|
||||
<h2>Iniciar sesión</h2>
|
||||
|
||||
<form method="post">
|
||||
<form method="post" class="app-form">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% include "expenses/_form_fields.html" %}
|
||||
<button type="submit" class="btn btn-primary">Entrar</button>
|
||||
</form>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user