1
0
Fork 0

add unit on frequency fields on transmitter modal

Signed-off-by: Julien Flawinne <jf.satnogs at protonmail dot com>
spacecruft
deckbsd 2020-07-30 10:10:02 +02:00 committed by deck
parent f9baf45aa1
commit faa38e3960
3 changed files with 18 additions and 8 deletions

View File

@ -298,7 +298,8 @@ class TransmitterEntry(models.Model):
validators=[
MinValueValidator(MIN_FREQ, message=MIN_FREQ_MSG),
MaxValueValidator(MAX_FREQ, message=MAX_FREQ_MSG)
]
],
help_text="Hz"
)
uplink_high = models.BigIntegerField(
blank=True,
@ -306,11 +307,14 @@ class TransmitterEntry(models.Model):
validators=[
MinValueValidator(MIN_FREQ, message=MIN_FREQ_MSG),
MaxValueValidator(MAX_FREQ, message=MAX_FREQ_MSG)
]
],
help_text="Hz"
)
uplink_drift = models.IntegerField(
blank=True, null=True, validators=[MinValueValidator(-99999),
MaxValueValidator(99999)]
blank=True,
null=True,
validators=[MinValueValidator(-99999), MaxValueValidator(99999)],
help_text="Hz"
)
downlink_low = models.BigIntegerField(
blank=True,
@ -318,7 +322,8 @@ class TransmitterEntry(models.Model):
validators=[
MinValueValidator(MIN_FREQ, message=MIN_FREQ_MSG),
MaxValueValidator(MAX_FREQ, message=MAX_FREQ_MSG)
]
],
help_text="Hz"
)
downlink_high = models.BigIntegerField(
blank=True,
@ -326,11 +331,14 @@ class TransmitterEntry(models.Model):
validators=[
MinValueValidator(MIN_FREQ, message=MIN_FREQ_MSG),
MaxValueValidator(MAX_FREQ, message=MAX_FREQ_MSG)
]
],
help_text="Hz"
)
downlink_drift = models.IntegerField(
blank=True, null=True, validators=[MinValueValidator(-99999),
MaxValueValidator(99999)]
blank=True,
null=True,
validators=[MinValueValidator(-99999), MaxValueValidator(99999)],
help_text="Hz"
)
downlink_mode = models.ForeignKey(
Mode,

View File

@ -21,6 +21,7 @@
<div class="input-group my-1">
<label class="input-group-prepend input-group-text" for="{{ field.id_for_label }}">{{ field.label }}</label>
{% render_field field class="form-control" placeholder=field.label %}
{{ field.help_text }}
<div class="{% if field.errors %} invalid{% endif %}">
{% for error in field.errors %}
<p class="help-block">{{ error }}</p>

View File

@ -21,6 +21,7 @@
<div class="input-group my-1">
<label class="input-group-prepend input-group-text" for="{{ field.id_for_label }}">{{ field.label }}</label>
{% render_field field class="form-control" placeholder=field.label %}
{{ field.help_text }}
<div class="{% if field.errors %} invalid{% endif %}">
{% for error in field.errors %}
<p class="help-block">{{ error }}</p>