Shinobi/libs/fieldBuild.js

21 lines
711 B
JavaScript
Raw Permalink Normal View History

ejs upgrade 3.1.9 Changes done by @shermdog commit b0bb0227131eeb54a7b75663338c13b96b76c32a Author: Moe <github@m03.ca> Date: Sun Jan 7 15:26:39 2024 -0800 add latest dev changes to ejs-upgrade commit b45c902cf7a6ff73f9b54feeecccb96c6d45719b Author: Moe <github@m03.ca> Date: Sun Jan 7 11:01:59 2024 -0800 Update install_nodejs.sh commit 2f283f6d48cb016f17b82bd5bd78faefe0b9a41f Author: Moe <github@m03.ca> Date: Sun Jan 7 11:01:53 2024 -0800 make backblaze errors not return file buffer with error commit 5446948880e50afafffa881a642b8b1db2b7f442 Author: Moe <github@m03.ca> Date: Sun Jan 7 11:01:18 2024 -0800 attempt fixing docker pipeline for arm64v8 commit 0aa0bb77779a70027fd9094b5db47ed292d011ba Author: Moe <github@m03.ca> Date: Fri Jan 5 11:38:54 2024 -0800 discord bot reconnect when network reconnect commit c4749c8c3b98026b275913159d3f158d46c1f6f0 Author: Moe <github@m03.ca> Date: Tue Jan 2 10:04:58 2024 -0800 fix syntax error in childUtils.js+ commit 5fc5d32dff9d351b3bfc4993dfd5fc95a855437f Author: Moe <github@m03.ca> Date: Mon Jan 1 10:38:40 2024 -0800 fix syntax error in childUtils.js commit 56d1d22499db1a86fbb0e1cebc25e8865ca3de5a Merge: 0b6fe3c5 ba80ac8d Author: Moe <github@m03.ca> Date: Mon Jan 1 18:30:31 2024 +0000 Merge branch 'ejs_upgrade' into 'ejs-upgrade-shermdog' ejs upgrade 3.1.9 See merge request Shinobi-Systems/Shinobi!492 commit ba80ac8d2a1e890ee61a9eb579bd5ec4b31faf92 Author: Rick Sherman <rick@shermdog.com> Date: Thu Dec 28 15:52:33 2023 -0600 ejs upgrade 3.1.9 This commit upgrades ejs to the 3.x series
2024-02-27 03:15:11 +00:00
buildOptions = function(field,possiblities){
if(!field)console.error('field',field)
var fieldElement = ''
possiblities.forEach(function(option){
if(option.optgroup){
fieldElement += '<optgroup label="' + option.name + '">'
fieldElement += buildOptions(field,option.optgroup)
fieldElement += '</optgroup>'
}else{
var selected = ''
if(option.value === field.default){
selected = 'selected'
}
fieldElement += '<option value="' + option.value + '" ' + selected + '>' + option.name + '</option>'
}
})
return fieldElement
}
module.exports = {
buildOptions: buildOptions
}