0.0.35 forms
This commit is contained in:
@@ -20,10 +20,18 @@ function chooseRadioInput(el, callback){
|
||||
}
|
||||
|
||||
function generateRadioInput(data, selected){
|
||||
let title = data.title;
|
||||
if (title.includes('(')){
|
||||
title = title.replace(')', '')
|
||||
title = title.split('(')
|
||||
if (title.length > 1){
|
||||
title = `<div>${title[0]}</div><div class="annotation">(${title[1]})</div>`
|
||||
}
|
||||
}
|
||||
let html = `
|
||||
<div class="cw_w_radio_inputs_radio_input" data-name="${data.name}">
|
||||
<div class="radio${selected? ' checked' : ''}" onclick="chooseRadioInput(this, ${data.callback})"></div>
|
||||
<div class="radio_label" onclick="chooseRadioInput(this, ${data.callback})">${data.title}</div>
|
||||
<div class="radio_label" onclick="chooseRadioInput(this, ${data.callback})">${title}</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{% include 'v2/widgets/w_select_country.html' with name='from_city' placeholder=placeholder_for_city initial=form.initial.from_city %}
|
||||
{% if form.errors.from_city %}<div class="error_container">{{ form.errors.from_city.0 }}</div>{% endif %}
|
||||
</div>
|
||||
<div class="field_container" data-type="location" data-name="to_city">
|
||||
<div class="field_container" data-type="location" data-name="to_city" data-datepicker="arrival_DT">
|
||||
<label for="id_from_city"><div class="required_field_icon">*</div> {% trans "Куда доставить посылку" %}</label>
|
||||
{% include 'v2/widgets/w_select_country.html' with name='to_city' placeholder=placeholder_for_city initial=form.initial.to_city %}
|
||||
{% if form.errors.to_city %}<div class="error_container">{{ form.errors.to_city.0 }}</div>{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user