瀏覽代碼

HUE-2020 [hbase] upload an image sometimes produces an error

POST data isn't being sent with images and application mime types.
We should disable the save button in this case.
Abraham Elmahrek 11 年之前
父節點
當前提交
49bbfc8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/hbase/src/hbase/templates/app.mako

+ 1 - 1
apps/hbase/src/hbase/templates/app.mako

@@ -374,7 +374,7 @@ ${ commonheader(None, "hbase", user) | n,unicode }
         % if user.is_superuser:
           <button class="btn" data-dismiss="modal" aria-hidden="true">${_('Cancel')}</button>
           <a id="file-upload-btn" class="btn fileChooserBtn" aria-hidden="true"><i class="fa fa-upload"></i> ${_('Upload')}</a>
-          <input type="submit" class="btn btn-primary" value="${_('Save')}">
+          <input data-bind="visible: mime.split('/')[0].toLowerCase() != 'application' && mime.split('/')[0].toLowerCase() != 'image'" type="submit" class="btn btn-primary" value="${_('Save')}">
         % else:
           <button class="btn" data-dismiss="modal" aria-hidden="true">${_('OK')}</button>
         % endif