Initial commit with project setup
This commit is contained in:
33
templates/edit_environment.html
Normal file
33
templates/edit_environment.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "admin_base.html" %}
|
||||
|
||||
{% block title %}Edit Environment{% endblock %}
|
||||
|
||||
{% block admin_content %}
|
||||
<div class="max-w-xl mx-auto bg-white p-8 rounded-lg shadow-md">
|
||||
<h1 class="text-2xl font-bold mb-6">Edit Environment</h1>
|
||||
<form method="POST" class="space-y-4">
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700">Name</label>
|
||||
<input type="text" name="name" id="name" value="{{ environment.name }}" required
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
|
||||
</div>
|
||||
<div>
|
||||
<label for="description" class="block text-sm font-medium text-gray-700">Description</label>
|
||||
<textarea name="description" id="description" rows="3"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">{{ environment.description }}</textarea>
|
||||
</div>
|
||||
<div>
|
||||
<label for="icon" class="block text-sm font-medium text-gray-700">Icon (SVG)</label>
|
||||
<input type="file" name="icon" id="icon" accept=".svg" class="mt-1 block w-full text-sm text-gray-700">
|
||||
{% if environment.icon %}
|
||||
<img src="{{ url_for('static', filename='icons/' ~ environment.icon) }}" alt="Icon" class="w-8 h-8 mt-2">
|
||||
{% endif %}
|
||||
</div>
|
||||
<button type="submit"
|
||||
class="w-full bg-blue-500 text-white py-2 px-4 rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
||||
Save Changes
|
||||
</button>
|
||||
<a href="{{ url_for('manage_environments') }}" class="block text-center mt-4 text-gray-500 hover:text-gray-700">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user