summaryrefslogtreecommitdiffstats
path: root/core/js/sharedialogexpirationview.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-01-22 17:30:18 +0100
committerVincent Petry <pvince81@owncloud.com>2016-01-28 15:25:34 +0100
commitb063ddb05b71988d92fe140ca003ad58301cfcc8 (patch)
treefebf5d75ec2f5c4d4759d0ab2ad12523ea66a0a6 /core/js/sharedialogexpirationview.js
parent476720ada9f0997bdef7407f8ef15c2c50866011 (diff)
downloadnextcloud-server-b063ddb05b71988d92fe140ca003ad58301cfcc8.tar.gz
nextcloud-server-b063ddb05b71988d92fe140ca003ad58301cfcc8.zip
Share dialog use OCS API
Diffstat (limited to 'core/js/sharedialogexpirationview.js')
-rw-r--r--core/js/sharedialogexpirationview.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/js/sharedialogexpirationview.js b/core/js/sharedialogexpirationview.js
index eef440c9af5..fa5c0c00986 100644
--- a/core/js/sharedialogexpirationview.js
+++ b/core/js/sharedialogexpirationview.js
@@ -93,8 +93,9 @@
this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
if (!state) {
// discard expiration date
- this.model.setExpirationDate('');
- this.model.saveLinkShare();
+ this.model.saveLinkShare({
+ expireDate: ''
+ });
}
},
@@ -103,8 +104,9 @@
$target.tooltip('hide');
$target.removeClass('error');
- this.model.setExpirationDate($target.val());
- this.model.saveLinkShare(null, {
+ this.model.saveLinkShare({
+ expiration: moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD')
+ }, {
error: function(model, message) {
if (!message) {
$target.attr('title', t('core', 'Error setting expiration date'));