made the class selector work
This commit is contained in:
parent
6baec85d3e
commit
77cc6f6d8d
18
create.php
18
create.php
@ -108,15 +108,13 @@
|
||||
<option value="" disabled> Choose your option </option>
|
||||
<?php
|
||||
$files = glob("roles/en/*.php");
|
||||
$count = 1;
|
||||
|
||||
foreach ($files as $filename) {
|
||||
include $filename;
|
||||
|
||||
$shortname = substr($filename, 9);
|
||||
$shortname = substr($shortname, 0, -4);
|
||||
echo "<option value=".$count.">".ucfirst($shortname)."</option>";
|
||||
$count++;
|
||||
echo "<option value=".ucfirst($shortname).">".ucfirst($shortname)."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -231,10 +229,16 @@
|
||||
}
|
||||
|
||||
function updateGoodRoles() {
|
||||
let selected = document.querySelectorAll('#tplaysbestwith option:checked');
|
||||
let goodRoles = Array.from(selected).map(el => el.value);
|
||||
goodroles.forEach(element => console.log(element));
|
||||
// goodRoles.forEach((element) => document.getElementById("tplaysbestwith").appendchild(document.createElement("LI").appendchild(document.createTextNode(element))));
|
||||
document.getElementById("tplaysbestwith").innerHTML = "";
|
||||
|
||||
var values = $('#goodRoles').val();
|
||||
for (let index = 0; index < values.length; ++index) {
|
||||
const element = values[index];
|
||||
var ul = document.getElementById("tplaysbestwith");
|
||||
var li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode(element));
|
||||
ul.appendChild(li);
|
||||
}
|
||||
}
|
||||
|
||||
function updateDescription() {
|
||||
|
Loading…
Reference in New Issue
Block a user