convert the mini-doc-viewer modal to $modal form