]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix deletion of ssl root certificates
authorBjörn Schießle <schiessle@owncloud.com>
Thu, 23 May 2013 14:13:48 +0000 (16:13 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Thu, 23 May 2013 14:13:48 +0000 (16:13 +0200)
apps/files_external/js/settings.js
apps/files_external/templates/settings.php

index ac408786ff6271a4088530927f2141075e495e63..73d872439acba2ffab989599b33a9fc53dc67c7e 100644 (file)
@@ -247,15 +247,19 @@ $(document).ready(function() {
                OC.MountConfig.saveStorage($(this).parent().parent());
        });
 
+       $('#sslCertificate').on('click', 'td.remove>img', function() {
+               console.log("remove!");
+               var tr = $(this).parent().parent();
+               console.log("remove cert!");
+               var row=this.parentNode.parentNode;
+               $.post(OC.filePath('files_external', 'ajax', 'removeRootCertificate.php'), { cert: row.id  });
+               $(tr).remove();
+               return true;
+       });
+
        $('#externalStorage').on('click', 'td.remove>img', function() {
                var tr = $(this).parent().parent();
                var mountPoint = $(tr).find('.mountPoint input').val();
-               if ( ! mountPoint) {
-                       var row=this.parentNode.parentNode;
-                       $.post(OC.filePath('files_external', 'ajax', 'removeRootCertificate.php'), { cert: row.id  });
-                       $(tr).remove();
-                       return true;
-               }
                if ($('#externalStorage').data('admin') === true) {
                        var isPersonal = false;
                        var multiselect = $(tr).find('.chzn-select').val();
index e628315c897e299e807816374575f75c8c7ced1c..ab01eb5386a3ca6161377477dd1513475001e6be 100644 (file)
                        </tbody>
                </table>
                <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>">
-               <input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;">
+               <input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="submit" name="cert_import" value="<?php p($l->t('Import Root Certificate')); ?>" />
 </fieldset>
 </form>