mikhailemv

Untitled

Jun 13th, 2023
771
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.04 KB | None | 0 0
  1. {% extends 'users/profile/categories/category_base.html' %}
  2. {% load static %}
  3.  
  4. {% block head %}
  5.   <link rel="stylesheet" href="{% static 'css/styleCategory.css' %}">
  6.     <link rel="stylesheet" href="{% static 'css/globalStyle.css' %}">
  7.   <title>Редактирование</title>
  8. {% endblock %}
  9.  
  10. {% block content %}
  11.     <main>
  12.         <h1>Создание/редактирование категории</h1>
  13.  
  14.         <form method="post" enctype="multipart/form-data">
  15.             {% csrf_token %}
  16.             <input type="hidden"
  17.                   name="csrfmiddlewaretoken"
  18.                   value="NtjTkiPCAGE6SNmjHBr8XUI0qxr5GVaNIlJKeitTto8dYLBw0knPNraHPkW2ZtmD">
  19.             <p>
  20.                 <label for="id_category_name">Category name:</label>
  21.                 <input type="text"
  22.                       name="category_name"
  23.                       value="{{ form.category_name.value }}"
  24.                       maxlength="100"
  25.                       id="id_category_name">
  26.             </p>
  27.             <p>
  28.                 <label for="id_key">Key:</label>
  29.                 <select name="key" id="id_key">
  30.                     <option value="" selected>---------</option>
  31.                     {% for key in keys %}
  32.                         {% if key == form.key.value %}
  33.                             <option value="{{ key }}" selected>{{ key }}</option>
  34.                         {% else %}
  35.                             <option value="{{ key }}">{{ key }}</option>
  36.                         {% endif %}
  37.                     {% endfor %}
  38.                 </select>
  39.             </p>
  40.             <p>
  41.                 <label for="id_color">Color:</label>
  42.                 <input type="color"
  43.                       name="color"
  44.                       value="{{ form.color.value }}"
  45.                       maxlength="7"
  46.                       required=""
  47.                       id="id_color">
  48.             </p>
  49.             <button type="submit">Сохранить</button>
  50.         </form>
  51.     </main>
  52. {% endblock %}
  53. {% block footer %}
  54. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment