0.0.326 upd change_profile

This commit is contained in:
2023-12-15 16:56:14 +03:00
parent b8fdd61948
commit a3d6f498b1
4 changed files with 30 additions and 2 deletions

View File

@@ -20,6 +20,8 @@
.dropbtn{ .dropbtn{
margin-right: unset; margin-right: unset;
} }
.header_logo, .header_btn_mover{ .header_logo, .header_btn_mover{
margin-right: 20px; margin-right: 20px;
} }
@@ -123,6 +125,9 @@
.header_buttons{ .header_buttons{
display: none; display: none;
} }
.confirm_profile_btn{
width: 95%;
}
.not_found_routes>img{ .not_found_routes>img{
display: none; display: none;

View File

@@ -537,6 +537,15 @@ header .header-first {
font-size: 16px; font-size: 16px;
border: none; border: none;
} }
#changes_saved_txt{
display: none;
}
#changes_saved_txt.show{
display: block;
}
#save_changes_txt.hide{
display: none;
}
.dropdown { .dropdown {
position: relative; position: relative;

View File

@@ -405,6 +405,11 @@ function change_profile_confirm (el){
document.querySelector(".info_profile").innerHTML = data.html; document.querySelector(".info_profile").innerHTML = data.html;
document.getElementById('save_changes_txt').classList.add('hide')
document.getElementById('changes_saved_txt').classList.add('show')
}, },
error: function (data){ error: function (data){

View File

@@ -35,7 +35,7 @@
{% if profileForm.errors.lastname %}<div class="error_form_profile">{{ profileForm.errors.lastname }}</div>{% endif %} {% if profileForm.errors.lastname %}<div class="error_form_profile">{{ profileForm.errors.lastname }}</div>{% endif %}
</div> </div>
<div class="container_el_form_profile"> <div class="container_el_form_profile">
<label class="label_f_profile" for="id_tel">{% if profileForm.fields.tel.required %}<span class="orange-text">*</span>{% endif %}{% translate "Номер телефона" %} </label> <label class="label_f_profile" for="id_tel">{% translate "Номер телефона" %} </label>
<input class="input_f_profile" type="text" id="id_tel" name="tel" {% if profileForm.initial.tel %}value="{{ profileForm.initial.tel }}" {% endif %} {% if profileForm.initial.tel %}data-initial-value="{{ profileForm.initial.tel }}"{% else %}data-initial-value=""{% endif %}> <input class="input_f_profile" type="text" id="id_tel" name="tel" {% if profileForm.initial.tel %}value="{{ profileForm.initial.tel }}" {% endif %} {% if profileForm.initial.tel %}data-initial-value="{{ profileForm.initial.tel }}"{% else %}data-initial-value=""{% endif %}>
{% if profileForm.errors.tel %}<div class="error_form_profile">{{ profileForm.errors.tel|safe }}</div>{% endif %} {% if profileForm.errors.tel %}<div class="error_form_profile">{{ profileForm.errors.tel|safe }}</div>{% endif %}
</div> </div>
@@ -65,7 +65,16 @@
<label class="label_f_profile" for="id_confirm_password">{% translate "Подтвердить пароль" %} </label> <label class="label_f_profile" for="id_confirm_password">{% translate "Подтвердить пароль" %} </label>
<input class="input_f_profile" type="text" id="id_confirm_password" name="confirm_password" {% if profileForm.initial.confirm_password %}value="{{ profileForm.initial.confirm_password }}" {% endif %} {% if profileForm.initial.confirm_password %}data-initial-value="{{ profileForm.initial.confirm_password }}"{% else %}data-initial-value=""{% endif %}> <input class="input_f_profile" type="text" id="id_confirm_password" name="confirm_password" {% if profileForm.initial.confirm_password %}value="{{ profileForm.initial.confirm_password }}" {% endif %} {% if profileForm.initial.confirm_password %}data-initial-value="{{ profileForm.initial.confirm_password }}"{% else %}data-initial-value=""{% endif %}>
</div> </div>
<button class="confirm_profile_btn" onclick="change_profile_confirm(this)">{% translate "Сохарнить" %}</button> <button class="confirm_profile_btn" onclick="change_profile_confirm(this)">
<p id="save_changes_txt">
{% translate "Сохарнить" %}
</p>
<p id="changes_saved_txt">
{% translate "Изменения сохранены" %}
</p>
</button>
</div> </div>
</form> </form>