Make publish modal functional