def html_create_data(self, read_only: bool = False) -> dict: """returns the data for html""" name = ConfigObjString( "disc_name", "", "Disc Name", "Enter the name of the Disc here", ) name.value = self.name if read_only: name.input_attributes = InputAttributes("readonly") info = ConfigObjString( "disc_info", "", "Disc Info", "Enter some information for the disc here", ) info.value = self.info if read_only: info.input_attributes = InputAttributes("readonly") language = ConfigObjOptionsSelect( "disc_language", Languages.config_option(ConfigObjOption), "en", "Disc Language", "Enter the language of the Disc here", ) language.value = self.language if read_only: language.input_attributes = InputAttributes("readonly") return { "search": False, "disc_type": self.disc_type, "disc_items": [ { "type": "hidden", "var_name": "disc_type", "value": self.disc_type, }, name.html_dict(""), info.html_dict(""), language.html_dict(""), ], }
def html_create_data(self, track_id: int, read_only: bool = False) -> dict: """returns the data for html""" name = ConfigObjString(f"track_{track_id}_name", "", "Extra Name", "Enter the name") if read_only: name.input_attributes = InputAttributes("readonly") name.value = self.name return { "disc_items": [ { "type": "hidden", "var_name": f"track_{track_id}_type", "value": self.track_type, }, name.html_dict(""), ], }
def html_create_data(self, track_id: int, read_only: bool = False) -> dict: """returns the data for html""" reason = ConfigObjString( f"track_{track_id}_reason", "", "Reason", "Enter the reason to not rip this at all here") if read_only: reason.input_attributes = InputAttributes("readonly") reason.value = self.reason return { "disc_items": [ { "type": "hidden", "var_name": f"track_{track_id}_type", "value": self.track_type, }, reason.html_dict(""), ], }