[webui] change last place of button_to_function usage