You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
2.1 KiB
47 lines
2.1 KiB
<div id="roleRuleWrapper"class="roleRuleWrapper">
|
|
|
|
<i hx-get="/rolerulesdash/<%= role!='N/A'?role.gID:guild.extra.id %>" hx-target="#PopUpContainer" hx-trigger="click" class="close material-symbols-outlined" id="close_bt2">
|
|
cancel
|
|
</i>
|
|
<h1 id="roleRule" class="roleRule"> <%= role=='N/A'?'New Rule':role.name %></h1>
|
|
<form>
|
|
<p id="role" class="role"> Role:</p>
|
|
<p id='emoji' class="emoji">
|
|
<% if(role=='N/A'){ %>
|
|
<img id='emojiImg' src="images/favicon.ico"></img>
|
|
<%} else {%>
|
|
<img id='emojiImg' src="https://cdn.discordapp.com/emojis/<%= role.roleEmoji %>.webp" ></img>
|
|
<% } %>
|
|
Emoji:</p>
|
|
<p id="message" class="message" > Message ID:</p>
|
|
<input id ="messageID" name="messageid" class='message messageID' value="<%= role=='N/A'?'':role.mID %>"></input>
|
|
<select id ="roleID" name="roleid" class='role roleID'>
|
|
<% guild.roles.forEach((r)=>{%>
|
|
<option value="<%= r.id %>" <% if(role.roleID==r.id) {%> selected <% } %> ><%= r.name%></option>
|
|
<%}) %>
|
|
</select>
|
|
<select id = "emojiID" name="emojiid" class ="emoji emojiID">
|
|
<% guild.emojis.forEach((emoji)=>{%>
|
|
<option value="<%= emoji.id %>"<% if(role.roleEmoji==emoji.id) {%> selected <% } %>><%= emoji.name%></option>
|
|
<%}) %>
|
|
</select>
|
|
<input class="hidden" name="guildid" value=<%= role!='N/A'?role.gID:guild.extra.id %>></input>
|
|
<button id="change" class="bt"
|
|
hx-trigger="click"
|
|
hx-target="#PopUpContainer"
|
|
hx-put=<%= role!='N/A'?`/rolechange/${role._id}/${role.gID}`:"/newrule" %>
|
|
type="submit">
|
|
<%= role=='N/A'?"Add":"Change" %>
|
|
</button>
|
|
<button id="delete" class="bt"
|
|
<%if(role!='N/A'){%>
|
|
hx-delete=<%=`/rolechange/${role._id}/${role.gID}`%>
|
|
hx-trigger="click"
|
|
hx-target="#PopUpContainer"
|
|
<%}%>
|
|
type="submit">
|
|
Delete
|
|
</button>
|
|
</form>
|
|
</div>
|