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>
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user