Browse Source

set border color for account deletion request and rename heading

also, fix caught Exception type and message (missed to push earlier)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
tags/v1.0.0
Arthur Schiwon 2 years ago
parent
commit
64c1c5becc
No known key found for this signature in database GPG Key ID: 7424F1874854DF23
4 changed files with 14 additions and 10 deletions
  1. +0
    -3
      css/style.css
  2. +7
    -0
      css/style.scss
  3. +4
    -4
      lib/Controller/DataRequestController.php
  4. +3
    -3
      templates/Settings/personal.php

+ 0
- 3
css/style.css View File

@@ -1,3 +0,0 @@
#data-request * button {
min-width: 225px;
}

+ 7
- 0
css/style.scss View File

@@ -0,0 +1,7 @@
#data-request * button {
min-width: 225px;
}

#data-request-deletion {
border-color: $color-error;
}

+ 4
- 4
lib/Controller/DataRequestController.php View File

@@ -23,7 +23,7 @@

namespace OCA\DataRequest\Controller;

use OC\HintException;
use OCA\DataRequest\Exceptions\HintedRuntime;
use OCA\DataRequest\Services\Request;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
@@ -55,9 +55,9 @@ class DataRequestController extends OCSController {
try {
$this->dataRequest->sendExportRequest();
return new DataResponse();
} catch(\RuntimeException $e) {
} catch(HintedRuntime $e) {
return new DataResponse(
['error' => $e->getMessage()],
['error' => $e->getHint()],
Http::STATUS_INTERNAL_SERVER_ERROR
);
}
@@ -71,7 +71,7 @@ class DataRequestController extends OCSController {
try {
$this->dataRequest->sendDeleteRequest();
return new DataResponse();
} catch(HintException $e) {
} catch(HintedRuntime $e) {
return new DataResponse(
['error' => $e->getHint()],
Http::STATUS_INTERNAL_SERVER_ERROR


+ 3
- 3
templates/Settings/personal.php View File

@@ -28,11 +28,11 @@ script('data_request', ['init', 'app']);
?>

<div id="data-request" class="section">
<h2><?php p($l->t('Personal data requests')); ?></h2>
<h2><?php p($l->t('Account')); ?></h2>
<div>
<button id="data-request-export" data-request="export" class="button"><?php p($l->t('Request data export')); ?></button>
<button id="data-request-export" data-request="export" class="button"><?php p($l->t('Request data export')); ?></button><span class="warning hidden"></span>
</div>
<div>
<button id="data-request-deletion" data-request="deletion" class="button"><?php p($l->t('Request account deletion')); ?></button>
<button id="data-request-deletion" data-request="deletion" class="button"><?php p($l->t('Request account deletion')); ?></button><span class="warning hidden"></span>
</div>
</div>

Loading…
Cancel
Save