From 070b034cd5b49eb5056a18b43f88aa223fec9e0b Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Thu, 10 Aug 2023 16:42:26 +0300 Subject: put infotext label for setting into OptionInfo definition rather than in a separate list --- modules/options.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/options.py') diff --git a/modules/options.py b/modules/options.py index 59cb75ec..db1fb157 100644 --- a/modules/options.py +++ b/modules/options.py @@ -8,7 +8,7 @@ from modules.shared_cmd_options import cmd_opts class OptionInfo: - def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None, comment_before='', comment_after=''): + def __init__(self, default=None, label="", component=None, component_args=None, onchange=None, section=None, refresh=None, comment_before='', comment_after='', infotext=None): self.default = default self.label = label self.component = component @@ -24,6 +24,8 @@ class OptionInfo: self.comment_after = comment_after """HTML text that will be added before label in UI""" + self.infotext = infotext + def link(self, label, url): self.comment_before += f"[{label}]" return self -- cgit v1.2.3