Development

This commit is contained in:
Matthew Grotke 2026-06-09 00:32:42 -04:00
parent 114da3cd1c
commit 20061872d7
6 changed files with 216 additions and 68 deletions

View file

@ -28,9 +28,9 @@
"field": "description"
},
{
"label": "Format",
"field": "format",
"class": "col-mono"
"label": "Type",
"field": "bl_type_label",
"class": "col-narrow"
},
{
"label": "Source URL",
@ -77,7 +77,8 @@
"name": "name",
"input_type": "text",
"validate": "VALIDATION_DASH_NAME",
"placeholder": "e.g. steven-black"
"placeholder": "e.g. steven-black",
"existing_ids": "%BLOCKLIST_EXISTING_NAMES_JS%"
},
{
"type": "field",
@ -86,12 +87,28 @@
"input_type": "text",
"placeholder": "e.g. Steven Black (ads, malware, trackers)"
},
{
"type": "raw_html",
"html": "<div id=\"type-row\">"
},
{
"type": "field",
"label": "Format",
"name": "format",
"label": "Type",
"name": "bl_type",
"input_type": "select",
"options": "%BLOCKLIST_FORMAT_OPTIONS%"
"options": [
{"value": "", "label": "-- Select Type --"},
{"value": "community", "label": "Community Blocklist"},
{"value": "local", "label": "Local Blocklist"}
]
},
{
"type": "raw_html",
"html": "</div>"
},
{
"type": "raw_html",
"html": "<div id=\"community-fields\" style=\"display:none\">"
},
{
"type": "field",
@ -99,16 +116,39 @@
"name": "url",
"input_type": "text",
"validate": "VALIDATION_URL",
"placeholder": "https://..."
"placeholder": "https://...",
"optional": true
},
{
"type": "raw_html",
"html": "</div>"
},
{
"type": "raw_html",
"html": "<div id=\"local-fields\" style=\"display:none\">"
},
{
"type": "field",
"label": "Domains",
"name": "local_entries",
"input_type": "textarea",
"rows": 8,
"placeholder": "One domain per line, e.g.:\nads.example.com\ntracker.example.net",
"hint": "One domain per line. Subdomains are automatically blocked.",
"optional": true
},
{
"type": "raw_html",
"html": "</div>"
},
{
"type": "button_row",
"items": [
{
"type": "button_primary",
"action": "/action/dnsblocking/addblocklist_add",
"method": "post",
"text": "Add Blocklist"
"class": "add-blocklist-btn",
"text": "Add Blocklist",
"disabled": "true"
},
{
"type": "button_cancel",