mikhailemv

Untitled

Jun 13th, 2023
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.08 KB | None | 0 0
  1. {% extends 'users/profile/operations/operations_base.html' %}
  2.  
  3. {% block content %}
  4. <h1>Добавление регулярной операции</h1>
  5.  
  6.   <form method="post">
  7.     {% csrf_token %}
  8.     <input type="hidden"
  9.           name="csrfmiddlewaretoken"
  10.           value="3kQdU0kuMYeBBLrrwaFHnGiy92FfwLjYYcg4O0YLFGIIHJGEPTBoddKfyPacPjvO">
  11.  
  12.     <p>
  13.       <label for="id_key">Key:</label>
  14.       <select name="key"
  15.              id="id_key">
  16.         {% for key in keys %}
  17.             {% if key == form.key.value %}
  18.                 <option value="{{ key }}" selected>{{ key }}</option>
  19.             {% else %}
  20.                 <option value="{{ key }}">{{ key }}</option>
  21.             {% endif %}
  22.         {% endfor %}
  23.       </select>
  24.     </p>
  25.  
  26.     <p>
  27.       <label for="id_category">Category:</label>
  28.       <select name="category"
  29.              class="form-control"
  30.              required=""
  31.              id="id_category">
  32.         <option value="" selected>---------</option>
  33.         {% for category in categories %}
  34.           {% if category.id == form.category.value %}
  35.             <option value="{{ category.id }}" selected>{{ category.category_name }}</option>
  36.           {% else %}
  37.             <option value="{{ category.id }}">{{ category.category_name }}</option>
  38.           {% endif %}
  39.         {% endfor %}
  40.       </select>
  41.     </p>
  42.  
  43.     <p>
  44.       <label for="id_amount">Amount:</label>
  45.       <input type="number"
  46.             name="amount"
  47.             class="form-control"
  48.             step="0.01"
  49.             required=""
  50.             id="id_amount">
  51.     </p>
  52.  
  53.     <p>
  54.       <label for="id_account">Account:</label>
  55.       <select name="account"
  56.              class="form-control"
  57.              required=""
  58.              id="id_account">
  59.         {% for account in accounts %}
  60.           <option value="{{ account.id }}">{{ account.name }}</option>
  61.         {% endfor %}
  62.       </select>
  63.     </p>
  64.  
  65.     <p>
  66.       <label for="id_date">Date:</label>
  67.       <input type="date"
  68.             name="date"
  69.             value="{{ form.date.value }}"
  70.             class="form-control"
  71.             required=""
  72.             id="id_date">
  73.     </p>
  74.  
  75.     <p>
  76.       <label for="id_periodicity">Periodicity:</label>
  77.       <select name="periodicity" id="id_periodicity">
  78.         <option value="" selected>---------</option>
  79.         {% for period in periods %}
  80.           <option value="{{ period.periodicity }}">{{ period.periodicity }}</option>
  81.         {% endfor %}
  82.       </select>
  83.     </p>
  84.  
  85.     <p>
  86.       <label for="id_time_of_notification">Time of notification:</label>
  87.       <input type="time"
  88.             name="time_of_notification"
  89.             class="form-control"
  90.             required=""
  91.             id="id_time_of_notification">
  92.     </p>
  93.  
  94.     <p>
  95.       <label for="id_comment">Comment:</label>
  96.       <input type="text"
  97.             name="comment"
  98.             class="form-control"
  99.             maxlength="255"
  100.             required=""
  101.             id="id_comment">
  102.     </p>
  103.  
  104.     <button type="submit">Сохранить</button>
  105.   </form>
  106. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment