remove the label attribute from the checkboxes

This commit is contained in:
Jakob Ketterl 2021-02-22 00:57:02 +01:00
parent 770fd749cd
commit 9beb3b9168
9 changed files with 16 additions and 27 deletions

View File

@ -12,8 +12,7 @@ class BackgroundDecodingController(SettingsFormController):
"Background decoding", "Background decoding",
CheckboxInput( CheckboxInput(
"services_enabled", "services_enabled",
"Service", "Enable background decoding services",
checkboxText="Enable background decoding services",
), ),
ServicesCheckboxInput("services_decoders", "Enabled services"), ServicesCheckboxInput("services_decoders", "Enabled services"),
), ),

View File

@ -37,14 +37,13 @@ class DecodingSettingsController(SettingsFormController):
), ),
CheckboxInput( CheckboxInput(
"digital_voice_dmr_id_lookup", "digital_voice_dmr_id_lookup",
"DMR id lookup", 'Enable lookup of DMR ids in the <a href="https://www.radioid.net/" target="_blank">'
checkboxText='Enable lookup of DMR ids in the <a href="https://www.radioid.net/" target="_blank">'
+ "radioid</a> database to show callsigns and names", + "radioid</a> database to show callsigns and names",
), ),
), ),
Section( Section(
"Digimodes", "Digimodes",
CheckboxInput("digimodes_enable", "", checkboxText="Enable Digimodes"), CheckboxInput("digimodes_enable", "Enable Digimodes"),
NumberInput("digimodes_fft_size", "Digimodes FFT size", append="bins"), NumberInput("digimodes_fft_size", "Digimodes FFT size", append="bins"),
), ),
Section( Section(

View File

@ -14,8 +14,7 @@ class ReportingController(SettingsFormController):
"APRS-IS reporting", "APRS-IS reporting",
CheckboxInput( CheckboxInput(
"aprs_igate_enabled", "aprs_igate_enabled",
"APRS I-Gate", "Send received APRS data to APRS-IS",
checkboxText="Send received APRS data to APRS-IS",
), ),
TextInput( TextInput(
"aprs_callsign", "aprs_callsign",
@ -26,8 +25,7 @@ class ReportingController(SettingsFormController):
TextInput("aprs_igate_password", "APRS-IS network password"), TextInput("aprs_igate_password", "APRS-IS network password"),
CheckboxInput( CheckboxInput(
"aprs_igate_beacon", "aprs_igate_beacon",
"APRS beacon", "Send the receiver position to the APRS-IS network",
checkboxText="Send the receiver position to the APRS-IS network",
infotext="Please check that your receiver location is setup correctly before enabling the beacon", infotext="Please check that your receiver location is setup correctly before enabling the beacon",
), ),
DropdownInput( DropdownInput(
@ -60,8 +58,7 @@ class ReportingController(SettingsFormController):
"pskreporter settings", "pskreporter settings",
CheckboxInput( CheckboxInput(
"pskreporter_enabled", "pskreporter_enabled",
"Reporting", "Enable sending spots to pskreporter.info",
checkboxText="Enable sending spots to pskreporter.info",
), ),
TextInput( TextInput(
"pskreporter_callsign", "pskreporter_callsign",
@ -79,8 +76,7 @@ class ReportingController(SettingsFormController):
"WSPRnet settings", "WSPRnet settings",
CheckboxInput( CheckboxInput(
"wsprnet_enabled", "wsprnet_enabled",
"Reporting", "Enable sending spots to wsprnet.org",
checkboxText="Enable sending spots to wsprnet.org",
), ),
TextInput( TextInput(
"wsprnet_callsign", "wsprnet_callsign",

View File

@ -139,8 +139,8 @@ class TextAreaInput(Input):
class CheckboxInput(Input): class CheckboxInput(Input):
def __init__(self, id, label, checkboxText, infotext=None, converter: Converter = None): def __init__(self, id, checkboxText, infotext=None, converter: Converter = None):
super().__init__(id, label, infotext=infotext, converter=converter) super().__init__(id, "", infotext=infotext, converter=converter)
self.checkboxText = checkboxText self.checkboxText = checkboxText
def render_input(self, value): def render_input(self, value):

View File

@ -124,7 +124,7 @@ class GainInput(Input):
class BiasTeeInput(CheckboxInput): class BiasTeeInput(CheckboxInput):
def __init__(self): def __init__(self):
super().__init__( super().__init__(
"bias_tee", "", "Enable Bias-Tee power supply", converter=OptionalConverter(defaultFormValue=False) "bias_tee", "Enable Bias-Tee power supply", converter=OptionalConverter(defaultFormValue=False)
) )

View File

@ -392,7 +392,7 @@ class SdrDeviceDescription(object):
def getInputs(self) -> List[Input]: def getInputs(self) -> List[Input]:
return [ return [
TextInput("name", "Device name"), TextInput("name", "Device name"),
CheckboxInput("enabled", "", "Enable this device", converter=OptionalConverter(defaultFormValue=True)), CheckboxInput("enabled", "Enable this device", converter=OptionalConverter(defaultFormValue=True)),
NumberInput( NumberInput(
"ppm", "ppm",
"Frequency correction", "Frequency correction",
@ -401,8 +401,7 @@ class SdrDeviceDescription(object):
), ),
CheckboxInput( CheckboxInput(
"always-on", "always-on",
"", "Keep device running at all times",
checkboxText="Keep device running at all times",
infotext="Prevents shutdown of the device when idle. Useful for devices with unreliable startup.", infotext="Prevents shutdown of the device when idle. Useful for devices with unreliable startup.",
converter=OptionalConverter(defaultFormValue=False), converter=OptionalConverter(defaultFormValue=False),
), ),

View File

@ -26,8 +26,7 @@ class AirspyDeviceDescription(SoapyConnectorDeviceDescription):
BiasTeeInput(), BiasTeeInput(),
CheckboxInput( CheckboxInput(
"bitpack", "bitpack",
"", "Enable bit-packing",
checkboxText="Enable bit-packing",
infotext="Packs two 12-bit samples into 3 bytes." infotext="Packs two 12-bit samples into 3 bytes."
+ " Lowers USB bandwidth consumption, increases CPU load", + " Lowers USB bandwidth consumption, increases CPU load",
converter=OptionalConverter(defaultFormValue=False), converter=OptionalConverter(defaultFormValue=False),

View File

@ -87,8 +87,7 @@ class ConnectorDeviceDescription(SdrDeviceDescription):
), ),
CheckboxInput( CheckboxInput(
"iqswap", "iqswap",
"", "Swap I and Q channels",
checkboxText="Swap I and Q channels",
infotext="Swapping inverts the spectrum, so this is useful in combination with an inverting mixer", infotext="Swapping inverts the spectrum, so this is useful in combination with an inverting mixer",
converter=OptionalConverter(defaultFormValue=False), converter=OptionalConverter(defaultFormValue=False),
), ),

View File

@ -42,14 +42,12 @@ class SdrplayDeviceDescription(SoapyConnectorDeviceDescription):
BiasTeeInput(), BiasTeeInput(),
CheckboxInput( CheckboxInput(
"rf_notch", "rf_notch",
"", "Enable RF notch filter",
checkboxText="Enable RF notch filter",
converter=OptionalConverter(defaultFormValue=True), converter=OptionalConverter(defaultFormValue=True),
), ),
CheckboxInput( CheckboxInput(
"dab_notch", "dab_notch",
"", "Enable DAB notch filter",
checkboxText="Enable DAB notch filter",
converter=OptionalConverter(defaultFormValue=True), converter=OptionalConverter(defaultFormValue=True),
), ),
DropdownInput( DropdownInput(