mirror of
https://gitlab.com/niansa/discordlistforbots.git
synced 2025-03-06 20:49:22 +01:00
37 lines
1.8 KiB
Text
37 lines
1.8 KiB
Text
<%inc#include "controllers/views.h" %>
|
|
<%c++ auto sessionData = @@.get<SessionDataPtr>("sessionData");%>
|
|
<%c++ auto error = @@.get<std::string>("error");%>
|
|
<%layout global_layout%>
|
|
|
|
<title>Registering a bot - DFB</title>
|
|
|
|
<div class="container">
|
|
<form action="register" method="POST">
|
|
<p class="title text-center">Registering a bot</p>
|
|
<i style="color:red;">{%error%}</i>
|
|
<p>Client ID</p><input tyep="number" class="special-input maxwidth" name="app_id" maxlength="19" minlength="17" pattern="^[0-9]+$" onclick="dontLoose()" required>
|
|
<p>Short description</p><input class="special-input maxwidth" name="short_description" maxlength="80" onclick="dontLoose()" required>
|
|
<p>Long description</p><textarea class="special-input maxwidth" name="long_description" style="height:200px;" onclick="dontLoose()" required></textarea>
|
|
<p>Prefix</p><input class="special-input maxwidth" name="prefix" maxlength="6" onclick="dontLoose()" required>
|
|
<p>Permanent support server invite code</p><input class="special-input maxwidth" name="support_server" maxlength="15" minlength="5" onclick="dontLoose()" required>
|
|
<p>Owner</p><input class="special-input maxwidth" value="{%sessionData->discord_fullname()%}" autocomplete="off" onclick="dontLoose()" disabled>
|
|
<br><br><br>
|
|
<input type="submit" class="special-button" style="margin:0px;" onclick="window.onbeforeunload = null;" value="Submit">
|
|
</form>
|
|
<script>
|
|
function dontLoose() {
|
|
window.onbeforeunload = function (e) {
|
|
e = e || window.event;
|
|
let txt = "YOU MIGHT LOOSE DATA WHEN CONTINUING";
|
|
|
|
// For IE and Firefox prior to version 4
|
|
if (e) {
|
|
e.returnValue = txt;
|
|
}
|
|
|
|
// For Safari
|
|
return txt;
|
|
};
|
|
}
|
|
</script>
|
|
</div>
|