diff options
author | brantje <brantje@gmail.com> | 2016-10-04 13:57:41 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-10-04 13:57:41 +0300 |
commit | e71a82218ee5b8f470e324e7361d65b7cabe57b1 (patch) | |
tree | 8c2c74805386191bb9d44b1018837b285766a507 | |
parent | 04a89a3ea3785e17437c4e69d3308d358177be73 (diff) |
Fix for unsharing password
-rw-r--r-- | controller/credentialcontroller.php | 2 | ||||
-rw-r--r-- | js/templates.js | 2 | ||||
-rw-r--r-- | lib/Db/CredentialMapper.php | 1 | ||||
-rw-r--r-- | templates/views/partials/forms/share_credential/link_sharing.html | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/controller/credentialcontroller.php b/controller/credentialcontroller.php index d88aa144..8c2bdf71 100644 --- a/controller/credentialcontroller.php +++ b/controller/credentialcontroller.php @@ -127,7 +127,7 @@ class CredentialController extends ApiController { 'delete_time' => $delete_time, 'hidden' => $hidden, 'otp' => $otp, - 'shared_key' => $shared_key, + 'shared_key' => ($shared_key === NULL) ? '' : $shared_key, ); diff --git a/js/templates.js b/js/templates.js index dd6f6d14..f8f9662a 100644 --- a/js/templates.js +++ b/js/templates.js @@ -89,7 +89,7 @@ angular.module('views/partials/forms/share_credential/basics.html', []).run(['$t angular.module('views/partials/forms/share_credential/link_sharing.html', []).run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('views/partials/forms/share_credential/link_sharing.html', - '<div class="row"><div class="col-xs-12 col-md-6"><input type="checkbox" ng-model="share_settings.linkSharing.enabled"> Enable link sharing.<br><input type="text" ng-model="share_link" select-on-click ng-if="share_settings.linkSharing.enabled"><div ng-show="share_settings.linkSharing.enabled">Share until date <span datetime-picker ng-model="share_settings.linkSharing.settings.expire_time" class="link" future-only close-on-select="false">No expire date set</span></div><div ng-show="share_settings.linkSharing.enabled">Share until views <input type="number" ng-model="share_settings.linkSharing.settings.expire_views"></div><div ng-if="share_settings.linkSharing.enabled"><table><tr><td><input type="checkbox" ng-click="setPermission(share_settings.linkSharing.settings.acl, default_permissions.permissions.FILES)" ng-checked="hasPermission(share_settings.linkSharing.settings.acl, default_permissions.permissions.FILES)"></td><td>Show files</td></tr></table></div></div></div>'); + '<div class="row"><div class="col-xs-12 col-md-6"><input type="checkbox" ng-model="share_settings.linkSharing.enabled"> Enable link sharing.<br><input type="text" ng-model="share_link" select-on-click placeholder="Click share first!" ng-if="share_settings.linkSharing.enabled"><div ng-show="share_settings.linkSharing.enabled">Share until date <span datetime-picker ng-model="share_settings.linkSharing.settings.expire_time" class="link" future-only close-on-select="false">No expire date set</span></div><div ng-show="share_settings.linkSharing.enabled">Share until views <input type="number" ng-model="share_settings.linkSharing.settings.expire_views"></div><div ng-if="share_settings.linkSharing.enabled"><table><tr><td><input type="checkbox" ng-click="setPermission(share_settings.linkSharing.settings.acl, default_permissions.permissions.FILES)" ng-checked="hasPermission(share_settings.linkSharing.settings.acl, default_permissions.permissions.FILES)"></td><td>Show files</td></tr></table></div></div></div>'); }]); angular.module('views/partials/password-meter.html', []).run(['$templateCache', function($templateCache) { diff --git a/lib/Db/CredentialMapper.php b/lib/Db/CredentialMapper.php index 1302f54a..601827fd 100644 --- a/lib/Db/CredentialMapper.php +++ b/lib/Db/CredentialMapper.php @@ -124,7 +124,6 @@ class CredentialMapper extends Mapper { $credential->setHidden($raw_credential['hidden']); $credential->setDeleteTime($raw_credential['delete_time']); $credential->setSharedKey($raw_credential['shared_key']); - var_dump($credential); return parent::update($credential); } diff --git a/templates/views/partials/forms/share_credential/link_sharing.html b/templates/views/partials/forms/share_credential/link_sharing.html index c4c2bf3f..2fa8516c 100644 --- a/templates/views/partials/forms/share_credential/link_sharing.html +++ b/templates/views/partials/forms/share_credential/link_sharing.html @@ -2,7 +2,7 @@ <div class="col-xs-12 col-md-6"> <input type="checkbox" ng-model="share_settings.linkSharing.enabled"> Enable link sharing.<br/> - <input type="text" ng-model="share_link" select-on-click + <input type="text" ng-model="share_link" select-on-click placeholder="Click share first!" ng-if="share_settings.linkSharing.enabled"> <div ng-show="share_settings.linkSharing.enabled"> Share until date |