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