]> source.dussan.org Git - nextcloud-server.git/commitdiff
[stable9.1] In cases where the server dictates the link share expiration the date... 966/head
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 11 Aug 2016 08:11:24 +0000 (10:11 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Fri, 19 Aug 2016 08:28:22 +0000 (10:28 +0200)
core/js/sharedialogexpirationview.js

index 1770bdd5a7b7fbe147ca11c73b6865c266bedd80..d1b326a56bcab89d90d00c59c93ef25a78f778cd 100644 (file)
@@ -93,6 +93,7 @@
                        this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
                        if (!state) {
                                // discard expiration date
+                               this.model.get('linkShare').expiration = '';
                                this.model.saveLinkShare({
                                        expireDate: ''
                                });
                        $target.tooltip('hide');
                        $target.removeClass('error');
 
+                       expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
+                       this.model.get('linkShare').expiration = expiration;
                        this.model.saveLinkShare({
-                               expiration: moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD')
+                               expiration: expiration
                        }, {
                                error: function(model, message) {
                                        if (!message) {