Added web ui with templates
This commit is contained in:
parent
d2cb5b3031
commit
90b02eef79
24 changed files with 1403 additions and 78 deletions
36
templates/rules_new.html
Normal file
36
templates/rules_new.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Create rule{% endblock title %}
|
||||
{% block body %}
|
||||
<form action="/rules/new" method="post" class="flex flex-col">
|
||||
<label class="grow">
|
||||
Description
|
||||
<input type="text" name="description" />
|
||||
</label>
|
||||
<label class="grow">
|
||||
Regex
|
||||
<input type="text" name="regex" />
|
||||
</label>
|
||||
<label class="grow">
|
||||
Category
|
||||
<select name="category">
|
||||
<option></option>
|
||||
{% for cat in categories %}
|
||||
<option value={{cat.category_id}}>{{cat.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
<style>
|
||||
label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
border: 1px solid black;
|
||||
border-radius: 3px;
|
||||
padding: 0.25rem;
|
||||
margin: 0.25rem;
|
||||
}
|
||||
{% endblock body %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue