mirror of
https://github.com/ae-utbm/sith.git
synced 2025-08-24 09:51:07 +00:00
Create an NFC button for browser supporting NFC API
This commit is contained in:
@@ -66,7 +66,7 @@ class SelectDate(DateInput):
|
||||
|
||||
|
||||
class MarkdownInput(Textarea):
|
||||
template_name = "core/markdown_textarea.jinja"
|
||||
template_name = "core/widgets/markdown_textarea.jinja"
|
||||
|
||||
def get_context(self, name, value, attrs):
|
||||
context = super().get_context(name, value, attrs)
|
||||
@@ -100,6 +100,15 @@ class MarkdownInput(Textarea):
|
||||
return context
|
||||
|
||||
|
||||
class NFCTextInput(TextInput):
|
||||
template_name = "core/widgets/nfc.jinja"
|
||||
|
||||
def get_context(self, name, value, attrs):
|
||||
context = super().get_context(name, value, attrs)
|
||||
context["translations"] = {"unsupported": _("Unsupported NFC card")}
|
||||
return context
|
||||
|
||||
|
||||
class SelectFile(TextInput):
|
||||
def render(self, name, value, attrs=None, renderer=None):
|
||||
if attrs:
|
||||
|
Reference in New Issue
Block a user