Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
49bbfc8
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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