Starting mayor refactor
This commit is contained in:
@@ -1,60 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% set active_page = "drinks" %}
|
||||
{% block title %}Drinks{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<form class="needs-validation" novalidate action="/savedrink" method="post">
|
||||
<div class="form-group">
|
||||
<label for="id">ID</label>
|
||||
<input name="id"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="id"
|
||||
value="{{ model['id'] }}"
|
||||
readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Drink Name</label>
|
||||
<input name="name"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="name"
|
||||
placeholder="Drink name..."
|
||||
value="{{ model['name'] }}"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="drinkVol">Alcohol %</label>
|
||||
<input name="vol"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="drinkVol"
|
||||
placeholder="Drink volume..."
|
||||
value="{{ model['vol'] }}"
|
||||
required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
// Example starter JavaScript for disabling form submissions if there are invalid fields
|
||||
(function() {
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
let forms = document.getElementsByClassName('needs-validation');
|
||||
// Loop over them and prevent submission
|
||||
let validation = Array.prototype.filter.call(forms, function (form) {
|
||||
form.addEventListener('submit', function (event) {
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
form.classList.add('was-validated');
|
||||
}, false);
|
||||
});
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,76 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% set active_page = "enemies" %}
|
||||
{% block title %}Enemies{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<form class="needs-validation" novalidate action="/saveenemy" method="post">
|
||||
<div class="form-group">
|
||||
<label for="id">ID</label>
|
||||
<input name="id"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="id"
|
||||
value="{{ model['id'] }}"
|
||||
readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="season">Season</label>
|
||||
<select name="season"
|
||||
type="range"
|
||||
class="form-control"
|
||||
id="season">
|
||||
{% for id, display in model.seasons %}
|
||||
<option value="{{ id }}" {% if id == model.select_season %} selected {% endif %}>
|
||||
{{ display }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Enemy Name</label>
|
||||
<input name="name"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="name"
|
||||
placeholder="Enter name..."
|
||||
value="{{ model['game'] }}"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group form-check">
|
||||
<input name="boss"
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="boss"
|
||||
value="True"
|
||||
{% if model['boss'] %}
|
||||
checked
|
||||
{% endif %}>
|
||||
<label class="form-check-label" for="newPlayerAnon">This enemy is a boss</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button type="submit" class="btn btn-primary" name="continue" value="true">Submit and Continue</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
// Example starter JavaScript for disabling form submissions if there are invalid fields
|
||||
(function() {
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
let forms = document.getElementsByClassName('needs-validation');
|
||||
// Loop over them and prevent submission
|
||||
let validation = Array.prototype.filter.call(forms, function (form) {
|
||||
form.addEventListener('submit', function (event) {
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
form.classList.add('was-validated');
|
||||
}, false);
|
||||
});
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,79 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% set active_page = "players" %}
|
||||
{% block title %}Players{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<form class="needs-validation" novalidate action="/saveplayer" method="post">
|
||||
<div class="form-group">
|
||||
<label for="playerId">ID</label>
|
||||
<input name="id"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="playerId"
|
||||
value="{{ model['id'] }}"
|
||||
readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newPlayerRealName">Real Name</label>
|
||||
<input name="real_name"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="newPlayerRealName"
|
||||
placeholder="Enter name..."
|
||||
value="{{ model['real_name'] }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newPlayerAlias">Player Alias</label>
|
||||
<input name="alias"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="newPlayerAlias"
|
||||
placeholder="Enter alias..."
|
||||
value="{{ model['alias'] }}"
|
||||
required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="newPlayerHexID">Hex ID</label>
|
||||
<input name="hex_id"
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="newPlayerHexID"
|
||||
placeholder="Enter Hex ID..."
|
||||
value="{{ model['hex_id'] }}">
|
||||
</div>
|
||||
<div class="form-group form-check">
|
||||
<input name="anon"
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="newPlayerAnon"
|
||||
value="True"
|
||||
{% if model['anon'] %}
|
||||
checked
|
||||
{% endif %}>
|
||||
<label class="form-check-label" for="newPlayerAnon">Anonymize (Show only player alias)</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
// Example starter JavaScript for disabling form submissions if there are invalid fields
|
||||
(function() {
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
let forms = document.getElementsByClassName('needs-validation');
|
||||
// Loop over them and prevent submission
|
||||
let validation = Array.prototype.filter.call(forms, function (form) {
|
||||
form.addEventListener('submit', function (event) {
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
form.classList.add('was-validated');
|
||||
}, false);
|
||||
});
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
10
templates/episodelist.html
Normal file
10
templates/episodelist.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
10
templates/generic_form.html
Normal file
10
templates/generic_form.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user