mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-16 09:55:00 +08:00
Added delete button to restore default
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
This commit is contained in:
parent
1a06b5cd9b
commit
c86e4f87b5
3 changed files with 11 additions and 0 deletions
|
@ -143,6 +143,7 @@ class TranslationController extends ApiController {
|
|||
'pick.icon.search' => $this->trans->t('Search icons'),
|
||||
'pick.icon.custom.label' => $this->trans->t('Upload a custom icon:'),
|
||||
'use.icon' => $this->trans->t('Use this icon'),
|
||||
'use.icon.delete' => $this->trans->t('Delete current icon'),
|
||||
'selected.icon' => $this->trans->t('Selected icon'),
|
||||
|
||||
// templates/views/partials/edit_credential/custom_fields.html
|
||||
|
|
|
@ -108,6 +108,13 @@
|
|||
fr.readAsDataURL(f);
|
||||
});
|
||||
|
||||
scope.deleteIcon = function() {
|
||||
delete scope.credential.icon.type;
|
||||
delete scope.credential.icon.content;
|
||||
delete scope.credential.icon;
|
||||
$('#iconPicker').dialog('close');
|
||||
};
|
||||
|
||||
scope.useIcon = function() {
|
||||
|
||||
if(scope.customIcon){
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
<br />
|
||||
<button ng-click="useIcon()">{{ 'use.icon' | translate}}</button>
|
||||
</div>
|
||||
<div ng-if="credential.icon">
|
||||
<button ng-click="deleteIcon()">{{ 'use.icon.delete' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue