|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * @package panopticon |
| 4 | + * @copyright Copyright (c)2023-2026 Nicholas K. Dionysopoulos / Akeeba Ltd |
| 5 | + * @license https://www.gnu.org/licenses/agpl-3.0.txt GNU Affero General Public License, version 3 or later |
| 6 | + */ |
| 7 | +
|
| 8 | +defined('AKEEBA') || die; |
| 9 | +
|
| 10 | +/** @var \Akeeba\Panopticon\View\Userconsent\Html $this */ |
| 11 | +
|
| 12 | +$token = $this->container->session->getCsrfToken()->getValue(); |
| 13 | +
|
| 14 | +?> |
| 15 | + |
| 16 | +<div class="container my-4"> |
| 17 | + {{-- Header --}} |
| 18 | + <div class="alert alert-info"> |
| 19 | + <h4 class="alert-heading"> |
| 20 | + <span class="fa fa-handshake me-2" aria-hidden="true"></span> |
| 21 | + @lang('PANOPTICON_USERCONSENT_HEAD_REQUIRED') |
| 22 | + </h4> |
| 23 | + <p class="mb-0"> |
| 24 | + @lang('PANOPTICON_USERCONSENT_LBL_EXPLANATION') |
| 25 | + </p> |
| 26 | + </div> |
| 27 | + |
| 28 | + {{-- Terms of Service --}} |
| 29 | + <div class="accordion mb-3" id="policyAccordion"> |
| 30 | + <div class="accordion-item"> |
| 31 | + <h2 class="accordion-header" id="headingTos"> |
| 32 | + <button class="accordion-button collapsed" type="button" |
| 33 | + data-bs-toggle="collapse" data-bs-target="#collapseTos" |
| 34 | + aria-expanded="false" aria-controls="collapseTos"> |
| 35 | + <span class="fa fa-file-contract me-2" aria-hidden="true"></span> |
| 36 | + @lang('PANOPTICON_POLICIES_TITLE_TOS') |
| 37 | + </button> |
| 38 | + </h2> |
| 39 | + <div id="collapseTos" class="accordion-collapse collapse" aria-labelledby="headingTos" |
| 40 | + data-bs-parent="#policyAccordion"> |
| 41 | + <div class="accordion-body" style="max-height: 400px; overflow-y: auto;"> |
| 42 | + {!! $this->tosContent !!} |
| 43 | + </div> |
| 44 | + <div class="accordion-footer p-2 text-end border-top"> |
| 45 | + <a href="@route('index.php?view=policies&task=tos')" target="_blank" class="btn btn-sm btn-outline-secondary"> |
| 46 | + <span class="fa fa-external-link me-1" aria-hidden="true"></span> |
| 47 | + @lang('PANOPTICON_USERCONSENT_LBL_VIEW_FULL') |
| 48 | + </a> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + |
| 53 | + <div class="accordion-item"> |
| 54 | + <h2 class="accordion-header" id="headingPrivacy"> |
| 55 | + <button class="accordion-button collapsed" type="button" |
| 56 | + data-bs-toggle="collapse" data-bs-target="#collapsePrivacy" |
| 57 | + aria-expanded="false" aria-controls="collapsePrivacy"> |
| 58 | + <span class="fa fa-shield-halved me-2" aria-hidden="true"></span> |
| 59 | + @lang('PANOPTICON_POLICIES_TITLE_PRIVACY') |
| 60 | + </button> |
| 61 | + </h2> |
| 62 | + <div id="collapsePrivacy" class="accordion-collapse collapse" aria-labelledby="headingPrivacy" |
| 63 | + data-bs-parent="#policyAccordion"> |
| 64 | + <div class="accordion-body" style="max-height: 400px; overflow-y: auto;"> |
| 65 | + {!! $this->privacyContent !!} |
| 66 | + </div> |
| 67 | + <div class="accordion-footer p-2 text-end border-top"> |
| 68 | + <a href="@route('index.php?view=policies&task=privacy')" target="_blank" class="btn btn-sm btn-outline-secondary"> |
| 69 | + <span class="fa fa-external-link me-1" aria-hidden="true"></span> |
| 70 | + @lang('PANOPTICON_USERCONSENT_LBL_VIEW_FULL') |
| 71 | + </a> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + |
| 77 | + {{-- Consent Buttons --}} |
| 78 | + <div class="card mb-3"> |
| 79 | + <div class="card-body text-center"> |
| 80 | + <p class="mb-3"> |
| 81 | + @lang('PANOPTICON_USERCONSENT_LBL_AGREE_PROMPT') |
| 82 | + </p> |
| 83 | + <div class="d-flex flex-row gap-3 justify-content-center"> |
| 84 | + <form action="@route('index.php?view=userconsent&task=agree')" method="post" class="d-inline"> |
| 85 | + <input type="hidden" name="{{ $token }}" value="1"> |
| 86 | + <button type="submit" class="btn btn-primary btn-lg"> |
| 87 | + <span class="fa fa-check me-1" aria-hidden="true"></span> |
| 88 | + @lang('PANOPTICON_USERCONSENT_BTN_AGREE') |
| 89 | + </button> |
| 90 | + </form> |
| 91 | + <a href="@route('index.php?view=userconsent&task=decline')" class="btn btn-outline-secondary btn-lg"> |
| 92 | + <span class="fa fa-xmark me-1" aria-hidden="true"></span> |
| 93 | + @lang('PANOPTICON_USERCONSENT_BTN_DECLINE') |
| 94 | + </a> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | + </div> |
| 98 | + |
| 99 | + {{-- Data Export --}} |
| 100 | + <div class="card mb-3"> |
| 101 | + <div class="card-header"> |
| 102 | + <h5 class="card-title m-0"> |
| 103 | + <span class="fa fa-download me-2" aria-hidden="true"></span> |
| 104 | + @lang('PANOPTICON_USERCONSENT_HEAD_EXPORT') |
| 105 | + </h5> |
| 106 | + </div> |
| 107 | + <div class="card-body"> |
| 108 | + <p> |
| 109 | + @lang('PANOPTICON_USERCONSENT_LBL_EXPORT_DESC') |
| 110 | + </p> |
| 111 | + <a href="@route('index.php?view=userconsent&task=export')" class="btn btn-outline-primary"> |
| 112 | + <span class="fa fa-file-export me-1" aria-hidden="true"></span> |
| 113 | + @lang('PANOPTICON_USERCONSENT_BTN_EXPORT') |
| 114 | + </a> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + |
| 118 | + {{-- Account Deletion --}} |
| 119 | + <div class="card mb-3 border-danger"> |
| 120 | + <div class="card-header bg-danger text-white"> |
| 121 | + <h5 class="card-title m-0"> |
| 122 | + <span class="fa fa-triangle-exclamation me-2" aria-hidden="true"></span> |
| 123 | + @lang('PANOPTICON_USERCONSENT_HEAD_DELETE') |
| 124 | + </h5> |
| 125 | + </div> |
| 126 | + <div class="card-body"> |
| 127 | + <div class="alert alert-warning"> |
| 128 | + <span class="fa fa-exclamation-circle me-1" aria-hidden="true"></span> |
| 129 | + @lang('PANOPTICON_USERCONSENT_LBL_DELETE_WARNING') |
| 130 | + </div> |
| 131 | + |
| 132 | + @if (!$this->canSelfDelete) |
| 133 | + <div class="alert alert-danger"> |
| 134 | + <span class="fa fa-ban me-1" aria-hidden="true"></span> |
| 135 | + @lang('PANOPTICON_USERCONSENT_LBL_DELETE_SOLE_ADMIN') |
| 136 | + </div> |
| 137 | + @else |
| 138 | + <form action="@route('index.php?view=userconsent&task=deleteaccount')" method="post" |
| 139 | + onsubmit="return confirm('{{{ $this->getLanguage()->text('PANOPTICON_USERCONSENT_LBL_DELETE_CONFIRM') }}}')"> |
| 140 | + <input type="hidden" name="{{ $token }}" value="1"> |
| 141 | + |
| 142 | + <div class="mb-3"> |
| 143 | + <label for="confirm_username" class="form-label"> |
| 144 | + @lang('PANOPTICON_USERCONSENT_LBL_DELETE_TYPE_USERNAME') |
| 145 | + </label> |
| 146 | + <input type="text" name="confirm_username" id="confirm_username" |
| 147 | + class="form-control" required |
| 148 | + autocomplete="off" |
| 149 | + placeholder="{{{ $this->username }}}"> |
| 150 | + </div> |
| 151 | + |
| 152 | + <button type="submit" class="btn btn-danger"> |
| 153 | + <span class="fa fa-trash me-1" aria-hidden="true"></span> |
| 154 | + @lang('PANOPTICON_USERCONSENT_BTN_DELETE') |
| 155 | + </button> |
| 156 | + </form> |
| 157 | + @endif |
| 158 | + </div> |
| 159 | + </div> |
| 160 | +</div> |
0 commit comments