Update create.php
This commit is contained in:
parent
77cc6f6d8d
commit
4a7b238a1b
83
create.php
83
create.php
@ -121,20 +121,30 @@
|
||||
<label>Select good Roles that go with this role</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<textarea id="gconvars" onkeyup="updateCard()" class="materialize-textarea"></textarea>
|
||||
<label for="convars">Paste your general convars</label>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
<textarea id="cconvars" onkeyup="updateCard()" class="materialize-textarea"></textarea>
|
||||
<label for="convars">Paste your role specific convars</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<textarea id="credits" class="materialize-textarea"></textarea>
|
||||
<textarea id="credits" onkeyup="updateCard()" class="materialize-textarea"></textarea>
|
||||
<label for="credits">Drop your credits here!</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<textarea id="gconvars" class="materialize-textarea"></textarea>
|
||||
<label for="convars">Paste your general convars</label>
|
||||
<input id="steam" type="text" onkeyup="updateCard()">
|
||||
<label for="steam">Steamlink</label>
|
||||
</div>
|
||||
<div class="input-field col s6">
|
||||
<textarea id="cconvars" class="materialize-textarea"></textarea>
|
||||
<label for="convars">Paste your role specific convars</label>
|
||||
<input id="source" type="text" onkeyup="updateCard()">
|
||||
<label for="source">Sourcelink</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -188,7 +198,7 @@
|
||||
<div class="collapsible-body">
|
||||
<span>Main Creator: <a id="authorurl" href="{AUTHORURL}">{AUTHORNAME}</a>
|
||||
<br>
|
||||
<pre id="credits"></pre>
|
||||
<pre id="tcredits"></pre>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@ -215,36 +225,19 @@
|
||||
updateName();
|
||||
updateColor();
|
||||
updateDescription();
|
||||
updateHowToPlay();
|
||||
updateGoodRoles();
|
||||
updateHowToPlay();
|
||||
updateCredits();
|
||||
updateGCvars();
|
||||
updateCCvars();
|
||||
updateSteam();
|
||||
updateSource();
|
||||
}
|
||||
|
||||
|
||||
function updateName() {
|
||||
document.getElementById("cardname").innerHTML = document.getElementById("name").value;
|
||||
}
|
||||
|
||||
function updateHowToPlay() {
|
||||
document.getElementById("thowtoplay").innerHTML = document.getElementById("howtoplay").value;
|
||||
}
|
||||
|
||||
function updateGoodRoles() {
|
||||
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() {
|
||||
document.getElementById("carddescription").innerHTML = document.getElementById("description").value;
|
||||
}
|
||||
|
||||
function updateColor() {
|
||||
|
||||
let color = document.getElementById('rolecolor');
|
||||
@ -269,7 +262,39 @@
|
||||
}
|
||||
document.getElementById("rolecard").className = "card " + color.value + " " + modifier.value + "-" + strength.value + " " + textcolor.value;
|
||||
}
|
||||
function updateDescription() {
|
||||
document.getElementById("carddescription").innerHTML = document.getElementById("description").value;
|
||||
}
|
||||
function updateGoodRoles() {
|
||||
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 updateHowToPlay() {
|
||||
document.getElementById("thowtoplay").innerHTML = document.getElementById("howtoplay").value;
|
||||
}
|
||||
function updateCredits() {
|
||||
document.getElementById("tcredits").innerHTML = document.getElementById("credits").value;
|
||||
}
|
||||
function updateGCvars() {
|
||||
document.getElementById("cvars").innerHTML = document.getElementById("gconvars").value;
|
||||
}
|
||||
function updateCCvars() {
|
||||
document.getElementById("rcvars").innerHTML = document.getElementById("cconvars").value;
|
||||
}
|
||||
function updateSteam() {
|
||||
document.getElementById("steamurl").setAttribute(href, document.getElementById("steam").value);
|
||||
}
|
||||
function updateSource() {
|
||||
document.getElementById("githuburl").setAttribute(href, document.getElementById("source").value);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user