app-editor.html
ASCII text
1{% extends "default.html" %} 2{% block title %}{{ app.name }} | Echo Tracker{% endblock %} 3{% block content %} 4<main> 5<h1>Editing {{ app.name }}</h1> 6<div id="endpoint-editor"> 7{% for endpoint in app.endpoints %} 8<form class="stacked-form" method="post" action="/app/{{ app.id }}/edit/{{ endpoint.id }}"> 9<input type="text" name="name" placeholder="Name" value="{{ endpoint.name }}"> 10<input type="url" name="url" placeholder="Ping address" value="{{ endpoint.address }}"> 11<textarea name="comment" placeholder="Comment" rows="4">{{ endpoint.comment }}</textarea> 12<div class="side-by-side"> 13<button type="submit">Apply changes</button> 14<button type="submit" name="delete" value="delete" class="danger-button">Delete</button> 15</div> 16</form> 17{% endfor %} 18</div> 19<h2>Add an endpoint</h2> 20<form class="stacked-form" method="post" action="/app/{{ app.id }}/add-endpoint"> 21<input type="text" name="name" placeholder="Name"> 22<input type="url" name="url" placeholder="Ping address"> 23<textarea name="comment" placeholder="Comment" rows="4"></textarea> 24<button type="submit">Add</button> 25</form> 26</main> 27{% endblock %}