def put(name=None, origin=None): put_input(name="AddAlas_name", label=t("Gui.AddAlas.NewName"), value=name or get_unused_name(), scope=s), put_select(name="AddAlas_copyfrom", label=t("Gui.AddAlas.CopyFrom"), options=['template'] + alas_instance(), value=origin or 'template', scope=s), put_button(label=t("Gui.AddAlas.Confirm"), onclick=add, scope=s)
def put_select_( name: str, title: str, help: str = None, options: List[str] = None, **other_html_attrs, ): if options is None: options = [] if help: left = put_column( [ put_text(title).style("--arg-title--"), put_text(help).style("--arg-help--"), ], size="auto 1fr", ) else: left = put_text(title).style("--arg-title--") return put_row([ left, put_select(name, options=options, **other_html_attrs).style("--input--"), ]).style("container-args-row")