                     </div>
                     <div class=\"#{widget.widgetName}-metadata\">
                         <label for=\"caption\">Caption</label><input type=\"text\" id=\"caption\" />
-                        <input type=\"submit\" />
+                        <button>Add Image</button>
                     </div>
                 </div>
                 <div id=\"#{@options.uuid}-tab-search-content\" class=\"#{widget.widgetName}-tab #{widget.widgetName}-tab-search\">SEARCH</div>

            # Update active Image
            jQuery("##{@options.uuid}-#{@widgetName}-activeImage").attr "src", jQuery(".#{@widgetName}-imageThumbnailActive").first().attr "src"

            xposition = jQuery(@options.editable.element).offset().left + jQuery(@options.editable.element).outerWidth()
            yposition = jQuery(@options.toolbar).offset().top - jQuery(document).scrollTop() - 30

            @options.dialog.dialog("option", "position", [xposition, yposition])
            @options.dialog.dialog("open")



            insertImage = () ->
                #This may need to insert an image that does not have the same URL as the preview image, since it may be a different size

                # Check if we have a selection and fall back to @lastSelection otherwise
                try
                    if not widget.options.editable.getSelection()
                        throw new Error "SelectionNotSet"
                catch error
                    widget.options.editable.restoreSelection(widget.lastSelection)

                document.execCommand "insertImage", null, $(this).attr('src')
                img = document.getSelection().anchorNode.firstChild
                jQuery(img).attr "alt", jQuery(".caption").value
                widget._closeDialog()

            @options.dialog.find(".halloimage-activeImage").click insertImage
