Add support for all types in new poi form
This commit is contained in:
parent
0f8259fe43
commit
072ef1d43e
|
@ -45,7 +45,6 @@ html, body {
|
||||||
form.form input, form.form textarea, form.form input[type=radio]:checked+label, #locale {
|
form.form input, form.form textarea, form.form input[type=radio]:checked+label, #locale {
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
border-bottom: 2px solid #ccc;
|
border-bottom: 2px solid #ccc;
|
||||||
display: block;
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +81,7 @@ form.form h1 {
|
||||||
|
|
||||||
form.form input[type=submit] {
|
form.form input[type=submit] {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
display: block;
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
border-bottom: 2px solid blue;
|
border-bottom: 2px solid blue;
|
||||||
}
|
}
|
||||||
|
@ -103,26 +103,41 @@ form.form input[type=radio]+label img {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.form .threecb:before {
|
#specific_form .threecb:after {
|
||||||
font-family: "Font Awesome 5 Free";
|
font-family: "Font Awesome 5 Free";
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 3px 8px 2px 4px;
|
padding: 3px 8px 2px 4px;
|
||||||
margin: 5px 10px 5px 0;
|
margin: 2px 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 21px;
|
width: 21px;
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
form.form .threecb.check:before {
|
#specific_form .threecb.check:after {
|
||||||
content: "\f058"; /* check */
|
content: "\f058"; /* check */
|
||||||
}
|
}
|
||||||
form.form .threecb.uncheck:before {
|
#specific_form .threecb.uncheck:after {
|
||||||
content: "\f057"; /* cross */
|
content: "\f057"; /* cross */
|
||||||
}
|
}
|
||||||
form.form .threecb.intermediate:before {
|
#specific_form .threecb.intermediate:after {
|
||||||
content: "\f059"; /* question */
|
content: "\f059"; /* question */
|
||||||
}
|
}
|
||||||
|
#specific_form input {
|
||||||
|
margin: 2px 10px;
|
||||||
|
}
|
||||||
|
#specific_form textarea {
|
||||||
|
margin: 5px 0;
|
||||||
|
display: block;
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
#specific_form .flex_line {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#specific_form .flex_line input {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
#abstract {
|
#abstract {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -74,13 +74,16 @@
|
||||||
$.each(this[type+'_jsonform'],function(index, value){
|
$.each(this[type+'_jsonform'],function(index, value){
|
||||||
switch(index.charAt(0)) {
|
switch(index.charAt(0)) {
|
||||||
case 'b':
|
case 'b':
|
||||||
html_form+='<label class="threecb intermediate" for="'+index+'" onclick="update3State(\''+index+'\')" >'+value+'</label><input value="1" type="hidden" name="'+index+'" id="'+index+'"><br>'
|
html_form+='<label class="threecb intermediate" for="'+index+'" onclick="update3State(\''+index+'\')">'+value+'</label><input value="1" type="hidden" name="'+index+'" id="'+index+'"><br>'
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
|
html_form+='<div class="flex_line"><label for="'+index+'">'+value+'</label><input min="0" max="100" type="number" name="'+index+'" id="'+index+'"></div>'
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
|
html_form+='<textarea name="'+index+'" id="'+index+'" placeholder="'+value+'"></textarea>'
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
|
html_form+='<div class="flex_line"><label for="'+index+'">'+value+'</label><input placeholder="https://" type="url" name="'+index+'" id="'+index+'"></div>'
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("ERROR: "+index+"'s type is not known");
|
console.log("ERROR: "+index+"'s type is not known");
|
||||||
|
|
Loading…
Reference in New Issue