浏览代码

fix AddLinkForm widget complaining about missing template var class

Nick Sweeting 4 年之前
父节点
当前提交
c28ad8bd1b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      archivebox/core/forms.py

+ 1 - 1
archivebox/core/forms.py

@@ -20,7 +20,7 @@ ARCHIVE_METHODS = [
 
 
 class AddLinkForm(forms.Form):
 class AddLinkForm(forms.Form):
     url = forms.RegexField(label="URLs (one per line)", regex=URL_REGEX, min_length='6', strip=True, widget=forms.Textarea, required=True)
     url = forms.RegexField(label="URLs (one per line)", regex=URL_REGEX, min_length='6', strip=True, widget=forms.Textarea, required=True)
-    depth = forms.ChoiceField(label="Archive depth", choices=CHOICES, widget=forms.RadioSelect, initial='0')
+    depth = forms.ChoiceField(label="Archive depth", choices=CHOICES, initial='0', widget=forms.RadioSelect(attrs={"class": "depth-selection"}))
     archive_methods = forms.MultipleChoiceField(
     archive_methods = forms.MultipleChoiceField(
         label="Archive methods (select at least 1, otherwise all will be used by default)",
         label="Archive methods (select at least 1, otherwise all will be used by default)",
         required=False,
         required=False,