0.8.31 fix registration form

This commit is contained in:
SDE
2023-12-03 19:07:49 +03:00
parent fe9be61772
commit 3b52cab162
2 changed files with 13 additions and 11 deletions

View File

@@ -34,9 +34,9 @@ class RegistrationForm(forms.Form):
i = 0
names = list(cleaned_data.keys())
while i < len(names):
# for name, val in cleaned_data.items():
if not cleaned_data[names[i]]:
self.add_error(names[i], _('Обязательное поле'))
if self.fields[names[i]].required:
self.add_error(names[i], _('Обязательное поле'))
i += 1
if cleaned_data and 'confirm_password' in cleaned_data and 'password' in cleaned_data:

View File

@@ -8,15 +8,8 @@
</div>
<div class="block_text_message {% get_msg_side user ticket msg %}">
<div class="container_text_message {% get_msg_side user ticket msg %}">
{% if msg.text %}
<span class="text_message">
{{ msg.text }}
</span>
{% elif ticket %}
<span class="text_message">
{{ ticket.text }}
</span>
{% elif msg.files %}
{% if msg.files %}
{% for file in msg.files %}
<div class="file_border_cont {{ msg.id }}_ident">
<div class="left_part_file_w">
@@ -29,6 +22,15 @@
<div class="clear_both"></div>
</div>
{% endfor %}
{% elif msg.text %}
<span class="text_message">
{{ msg.text }}
</span>
{% elif ticket and ticket.text %}
<span class="text_message">
{{ ticket.text }}
</span>
{% endif %}
</div>
<div class="data_send_message {% get_msg_side user ticket msg %}">