openwebrx-clone/owrx/form/gfx.py

32 lines
1.0 KiB
Python
Raw Normal View History

2021-02-08 19:30:12 +00:00
from owrx.form import Input
class AvatarInput(Input):
def render_input(self, value):
return """
<div class="imageupload">
<input type="hidden" id="{id}" name="{id}">
<div class="image-container">
<img class="webrx-rx-avatar" src="static/gfx/openwebrx-avatar.png" alt="Receiver avatar"/>
</div>
<button class="btn btn-primary">Upload new image...</button>
</div>
""".format(
id=self.id
)
2021-02-08 19:30:12 +00:00
class TopPhotoInput(Input):
2021-02-08 22:29:24 +00:00
def render_input(self, value):
return """
<div class="imageupload">
<input type="hidden" id="{id}" name="{id}">
<div class="image-container">
<img class="webrx-top-photo" src="static/gfx/openwebrx-top-photo.jpg" alt="Receiver Panorama"/>
</div>
2021-02-08 22:29:24 +00:00
<button class="btn btn-primary">Upload new image...</button>
</div>
""".format(
id=self.id
)