2021-02-08 19:30:12 +00:00
|
|
|
from owrx.form import Input
|
|
|
|
|
|
|
|
|
|
|
|
class AvatarInput(Input):
|
2021-02-08 23:12:53 +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-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
|
|
|
|
2021-02-08 23:12:53 +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}">
|
2021-02-08 23:12:53 +00:00
|
|
|
<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
|
|
|
|
)
|