Initial commit for LaunchPad app
This commit is contained in:
42
templates/app_form.html
Normal file
42
templates/app_form.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ 'Edit App' if data else 'Add App' }} – LaunchPad Admin{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{{ 'Edit App' if data else 'Add App' }}</h1>
|
||||
<form method="post" class="form" enctype="multipart/form-data">
|
||||
<label>Name
|
||||
<input type="text" name="name" value="{{ (data.name if data else '') | default('') }}" required />
|
||||
</label>
|
||||
|
||||
<label>Image URL (https) – optional if you upload a file
|
||||
<input type="url" name="image" value="{{ (data.image if data else '') | default('') }}" />
|
||||
</label>
|
||||
|
||||
<label>Or upload image
|
||||
<input type="file" name="image_file" accept="image/*" />
|
||||
</label>
|
||||
|
||||
{% if data and data.image %}
|
||||
<div>
|
||||
<small>Current image:</small><br>
|
||||
<img src="{{ data.image }}" alt="{{ data.name }}" class="icon" style="width:64px;height:64px;object-fit:cover;border-radius:8px;"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<label>App URL (https)
|
||||
<input type="url" name="url" value="{{ (data.url if data else '') | default('') }}" required />
|
||||
</label>
|
||||
|
||||
<label>Priority
|
||||
<input type="number" name="priority" value="{{ (data.priority if data else 0) | default(0) }}" />
|
||||
</label>
|
||||
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="enabled" {% if not data or data.enabled %}checked{% endif %}/> Enabled
|
||||
</label>
|
||||
|
||||
<div class="form-actions">
|
||||
<a class="btn" href="{{ url_for('apps_list') }}">Cancel</a>
|
||||
<button class="btn primary" type="submit">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user