Bladeren bron

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 jaren geleden
bovenliggende
commit
49bbfc8786
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  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