[Rt-commit] rt branch, 5.0/fix-anonymize-user-modal, created. rt-5.0.0beta1-2-g3f025eba45
Craig Kaiser
craig at bestpractical.com
Tue Jun 2 10:46:33 EDT 2020
The branch, 5.0/fix-anonymize-user-modal has been created
at 3f025eba4558c546e99cd4f2fe6de71b08d85c28 (commit)
- Log -----------------------------------------------------------------
commit b209df7f9ea2a29461fe250bbeb4d5a874c4a569
Author: craig kaiser <craig at bestpractical.com>
Date: Tue Jun 2 09:43:22 2020 -0400
Remove modal mason component
This is no longer needed as we have the Bootstrap modal.
diff --git a/share/html/Elements/Modal b/share/html/Elements/Modal
deleted file mode 100644
index f749305d11..0000000000
--- a/share/html/Elements/Modal
+++ /dev/null
@@ -1,71 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2020 Best Practical Solutions, LLC
-%# <sales at bestpractical.com>
-%#
-%# (Except where explicitly superseded by other copyright notices)
-%#
-%#
-%# LICENSE:
-%#
-%# This work is made available to you under the terms of Version 2 of
-%# the GNU General Public License. A copy of that license should have
-%# been provided with this software, but in any event can be snarfed
-%# from www.gnu.org.
-%#
-%# This work is distributed in the hope that it will be useful, but
-%# WITHOUT ANY WARRANTY; without even the implied warranty of
-%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%# General Public License for more details.
-%#
-%# You should have received a copy of the GNU General Public License
-%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-%# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-%#
-%#
-%# CONTRIBUTION SUBMISSION POLICY:
-%#
-%# (The following paragraph is not intended to limit the rights granted
-%# to you to modify and distribute this software under the terms of
-%# the GNU General Public License and is only of importance to you if
-%# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
-%#
-%# By intentionally submitting any modifications, corrections or
-%# derivatives to this work, or any other work intended for use with
-%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-%# you are the copyright holder for those contributions and you grant
-%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-%# royalty-free, perpetual, license to use, copy, create derivative
-%# works based on those contributions, and sublicense and distribute
-%# those contributions and any derivatives thereof.
-%#
-%# END BPS TAGGED BLOCK }}}
-<div id="<% $ModalId %>" class="<% $Class %>" align="center">
- <form action="<% $Action %>" method="<% $Method %>" id="<% $ModalId %>" name="<% $Name %>" >
-% foreach my $field (@Fields) {
- <p><% $field->{'Label'} %>
-% if ( $field->{'Input'} ) {
- <input type="<% $field->{'Input'} %>" class="<% $field->{'Class'} %>" name="<% $field->{'Name'} %>" value="<% $field->{'Value'} %>">
-% }
- </p>
-% }
- <a href="#" rel="modal:close" class="button"><% $Cancel %></a>
- <button type="Submit" class="button"><% $Accept %></button>
- </form>
-</div>
-
-<%ARGS>
- at Fields => ()
-$Name => ''
-$ModalId => ''
-$Class => 'modal'
-$Action => ''
-$Method => 'GET'
-$Accept => loc('OK')
-$Cancel => loc('Cancel')
-</%ARGS>
commit 3f025eba4558c546e99cd4f2fe6de71b08d85c28
Author: craig kaiser <craig at bestpractical.com>
Date: Tue Jun 2 10:14:10 2020 -0400
Use Bootstrap4 modal for Anonymize User button
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index 5d690c71a4..07826dfe02 100644
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -321,19 +321,33 @@
</form>
% if ( $UserObj->Id ) {
- <& /Elements/Modal, ModalId => "user-info-modal", Method => 'POST', Action => RT->Config->Get('WebPath') . '/Admin/Users/Modify.html', Fields => [
- { Label => loc("Are you sure you want to anonymize user: [_1]?", $UserObj->Name) },
- { Input => 'Hidden', Value => $UserObj->Id, Name => 'id' },
- { Input => 'Hidden', Value => 1, Name => 'Anonymize' },
- {
- Label => loc("Check to clear user custom fields") . ":",
- Input => 'checkbox',
- Class => 'checkbox',
- Name => 'clear_customfields',
- Value => 'On',
- },
-]
-&>
+<div id="user-info-modal" class="modal">
+ <div class="modal-dialog modal-dialog-centered">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h5 class="modal-title"><&|/l&>Anonymize User</&></h5>
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <span aria-hidden="true">×</span>
+ </button>
+ </div>
+ <div class="modal-body">
+ <form action="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html" method="POST">
+ <input type="hidden" name="id" value="<% $UserObj->Id %>" />
+ <input type="hidden" name="Anonymize" value="1" />
+
+ <div class="custom-control custom-checkbox">
+ <input class="custom-control-input" type="checkbox" id="clear_customfields" name="clear_customfields" />
+ <label class="custom-control-label" for="clear_customfields"><&|/l&>Check to clear user custom fields</&></label>
+ </div>
+
+ <div class="modal-footer">
+ <button type="Submit" class="button"><&|/l&>Anonymize</&></button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
% }
<%INIT>
diff --git a/share/html/User/Elements/RelatedData b/share/html/User/Elements/RelatedData
index 20b47f54e1..88a7d5c060 100644
--- a/share/html/User/Elements/RelatedData
+++ b/share/html/User/Elements/RelatedData
@@ -71,7 +71,7 @@
<div class="title"><&|/l&>Remove User Information</&></div>
<div class="inline-row form-row">
<div class="inline-cell col-4">
- <a class="button btn btn-primary" href="#user-info-modal" rel="modal:open" name="anonymize_user"><&|/l&>Anonymize User</&></a>
+ <a href="javascript:void(0)" class="button btn btn-primary" data-toggle="modal" data-target="#user-info-modal" name="anonymize_user"><&|/l&>Anonymize User</&></a>
<i class="label"><&|/l&>Clear core user data, set anonymous username</&></i>
</div>
% if ( $session{'CurrentUser'}->HasRight( Object => RT->System, Right => 'SuperUser' ) ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list