0.0.31 forms
This commit is contained in:
@@ -117,4 +117,15 @@ function dataToFormData(data) {
|
|||||||
formData.append(key, data[key]);
|
formData.append(key, data[key]);
|
||||||
}
|
}
|
||||||
return formData;
|
return formData;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectInputWContainer (el, callback) {
|
||||||
|
if (!el) return;
|
||||||
|
let $field = el.closest('.field_container');
|
||||||
|
if (!$field) return;
|
||||||
|
|
||||||
|
let $input = $field.querySelector('input');
|
||||||
|
$input.focus()
|
||||||
|
|
||||||
|
if (callback) callback(el);
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="w_daterangepicker">
|
<div class="w_daterangepicker" onclick="selectInputWContainer(this)">
|
||||||
<div class="date_range_input_cont">
|
<div class="date_range_input_cont">
|
||||||
<input class="dropped" type="text" name="{{ name }}" id="id_{{ name }}" autocomplete="off"{% if initial %} value="{{ initial|date:'d.m.Y' }}"{% endif %}>
|
<input class="dropped" type="text" name="{{ name }}" id="id_{{ name }}" autocomplete="off"{% if initial %} value="{{ initial|date:'d.m.Y' }}"{% endif %}>
|
||||||
<img onclick="clickOnDateIconE(this)" src="{% static "v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg" %}" alt="">
|
<img onclick="clickOnDateIconE(this)" src="{% static "v2/icons/widgets/w_datarangepicker/datarangepicker_icon.svg" %}" alt="">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="w_select_country closed">
|
<div class="w_select_country closed">
|
||||||
<div class="w_select_country_header" onclick="openCountruSelectIfDataEnter(this)">
|
<div class="w_select_country_header" onclick="selectInputWContainer(this, openCountruSelectIfDataEnter)">
|
||||||
<div class="select_country_header_left_part">
|
<div class="select_country_header_left_part">
|
||||||
<div class="container_inf_about_country">
|
<div class="container_inf_about_country">
|
||||||
<img class="country_flag_img_container"{% if initial.country.flag %} src="{{ initial.country.flag.url }}"{% endif %}>
|
<img class="country_flag_img_container"{% if initial.country.flag %} src="{{ initial.country.flag.url }}"{% endif %}>
|
||||||
|
|||||||
Reference in New Issue
Block a user