diff options
Diffstat (limited to 'templates/instances/edit.html')
| -rw-r--r-- | templates/instances/edit.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/templates/instances/edit.html b/templates/instances/edit.html new file mode 100644 index 0000000..356c7cd --- /dev/null +++ b/templates/instances/edit.html | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | {% extends "base.html" %} | ||
| 2 | {% block content %} | ||
| 3 | <h1>Edit: {{ instance.name }}</h1> | ||
| 4 | |||
| 5 | <div class="card card-muted"> | ||
| 6 | <div class="meta"> | ||
| 7 | <span><strong>Version:</strong> {{ instance.version }}</span> | ||
| 8 | <span><strong>Type:</strong> {{ instance.server_type }}</span> | ||
| 9 | <span><strong>World:</strong> {{ instance.world_source }}</span> | ||
| 10 | {% if let Some(seed) = instance.world_seed %} | ||
| 11 | <span><strong>Seed:</strong> {{ seed }}</span> | ||
| 12 | {% endif %} | ||
| 13 | {% if instance.has_modpack %} | ||
| 14 | <span><strong>Modpack:</strong> Installed</span> | ||
| 15 | {% endif %} | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | |||
| 19 | <form action="/instances/{{ instance.id }}/edit" method="post" class="form-col"> | ||
| 20 | <fieldset> | ||
| 21 | <legend>Server Properties</legend> | ||
| 22 | <label> | ||
| 23 | Memory (MB) | ||
| 24 | <input type="number" name="memory_mb" value="{{ instance.memory_mb }}" min="512" max="{{ max_memory_mb }}" required> | ||
| 25 | </label> | ||
| 26 | <label> | ||
| 27 | Difficulty | ||
| 28 | <select name="difficulty"> | ||
| 29 | <option value="0" {% if instance.difficulty == 0 %}selected{% endif %}>Peaceful</option> | ||
| 30 | <option value="1" {% if instance.difficulty == 1 %}selected{% endif %}>Easy</option> | ||
| 31 | <option value="2" {% if instance.difficulty == 2 %}selected{% endif %}>Normal</option> | ||
| 32 | <option value="3" {% if instance.difficulty == 3 %}selected{% endif %}>Hard</option> | ||
| 33 | </select> | ||
| 34 | </label> | ||
| 35 | <label> | ||
| 36 | Gamemode | ||
| 37 | <select name="gamemode"> | ||
| 38 | <option value="0" {% if instance.gamemode == 0 %}selected{% endif %}>Survival</option> | ||
| 39 | <option value="1" {% if instance.gamemode == 1 %}selected{% endif %}>Creative</option> | ||
| 40 | <option value="2" {% if instance.gamemode == 2 %}selected{% endif %}>Adventure</option> | ||
| 41 | <option value="3" {% if instance.gamemode == 3 %}selected{% endif %}>Spectator</option> | ||
| 42 | </select> | ||
| 43 | </label> | ||
| 44 | <label> | ||
| 45 | Max Players | ||
| 46 | <input type="number" name="max_players" value="{{ instance.max_players }}" min="1" max="100"> | ||
| 47 | </label> | ||
| 48 | <label> | ||
| 49 | <input type="checkbox" name="pvp" {% if instance.pvp %}checked{% endif %}> PvP enabled | ||
| 50 | </label> | ||
| 51 | <label> | ||
| 52 | MOTD | ||
| 53 | <input type="text" name="motd" value="{{ instance.motd }}" maxlength="59"> | ||
| 54 | </label> | ||
| 55 | </fieldset> | ||
| 56 | |||
| 57 | <div class="actions"> | ||
| 58 | <button type="submit" class="btn-ok">Save Changes</button> | ||
| 59 | <a href="/instances" class="btn">Cancel</a> | ||
| 60 | </div> | ||
| 61 | </form> | ||
| 62 | {% endblock %} | ||
