Skip to content
Snippets Groups Projects
Commit 073b3db9 authored by Peter Rotich's avatar Peter Rotich Committed by Jared Hancock
Browse files

Add quick action confirmation support

parent 1f5e5639
No related branches found
No related tags found
No related merge requests found
...@@ -9,10 +9,14 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($user)) die('Invalid path' ...@@ -9,10 +9,14 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($user)) die('Invalid path'
title="Reload"><i class="icon-refresh"></i> <?php echo $user->getName(); ?></a></h2> title="Reload"><i class="icon-refresh"></i> <?php echo $user->getName(); ?></a></h2>
</td> </td>
<td width="50%" class="right_align has_bottom_border"> <td width="50%" class="right_align has_bottom_border">
<?php
if ($user->getAccount()) { ?>
<span class="action-button" data-dropdown="#action-dropdown-more"> <span class="action-button" data-dropdown="#action-dropdown-more">
<span ><i class="icon-cog"></i> More</span> <span ><i class="icon-cog"></i> More</span>
<i class="icon-caret-down"></i> <i class="icon-caret-down"></i>
</span> </span>
<?php
} ?>
<a id="user-delete" class="action-button user-action" <a id="user-delete" class="action-button user-action"
href="#users/<?php echo $user->getId(); ?>/delete"><i class="icon-trash"></i> Delete User</a> href="#users/<?php echo $user->getId(); ?>/delete"><i class="icon-trash"></i> Delete User</a>
<?php <?php
...@@ -27,12 +31,13 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($user)) die('Invalid path' ...@@ -27,12 +31,13 @@ if(!defined('OSTSCPINC') || !$thisstaff || !is_object($user)) die('Invalid path'
} ?> } ?>
<div id="action-dropdown-more" class="action-dropdown anchor-right"> <div id="action-dropdown-more" class="action-dropdown anchor-right">
<ul> <ul>
<li><a class="confirm-action" href="#confirmlink"><i
class="icon-lock"></i> Send Confirmation Link</a></li>
<li><a class="confirm-action" href="#pwreset"><i
class="icon-lock"></i> Send Password Reset Link</a></li>
<li><a class="user-action" <li><a class="user-action"
href="#users/<?php echo $user->getId(); ?>/manage/access"><i href="#users/<?php echo $user->getId(); ?>/manage/access"><i
class="icon-lock"></i> Manage Account Access</a></li> class="icon-lock"></i> Manage Account Access</a></li>
<li><a class="user-action"
href="#users/<?php echo $user->getId(); ?>/manage/access"><i
class="icon-lock"></i> Change Account Password</a></li>
</ul> </ul>
</div> </div>
</td> </td>
...@@ -244,6 +249,39 @@ if ($results) { ?> ...@@ -244,6 +249,39 @@ if ($results) { ?>
} ?> } ?>
</div> </div>
<div style="display:none;" class="dialog" id="confirm-action">
<h3>Please Confirm</h3>
<a class="close" href=""><i class="icon-remove-circle"></i></a>
<hr/>
<p class="confirm-action" style="display:none;" id="banemail-confirm">
Are you sure want to <b>ban</b> <?php echo $user->getEmail(); ?>? <br><br>
New tickets from the email address will be auto-rejected.
</p>
<p class="confirm-action" style="display:none;" id="confirmlink-confirm">
Are you sure want to send <b>Account Activation Link</b> to <em><?php echo $user->getEmail()?></em>?
</p>
<p class="confirm-action" style="display:none;" id="pwreset-confirm">
Are you sure want to send <b>Password Reset Link</b> to <em><?php echo $user->getEmail()?></em>?
</p>
<div>Please confirm to continue.</div>
<form action="users.php?id=<?php echo $user->getId(); ?>" method="post" id="confirm-form" name="confirm-form">
<?php csrf_token(); ?>
<input type="hidden" name="id" value="<?php echo $user->getId(); ?>">
<input type="hidden" name="a" value="process">
<input type="hidden" name="do" id="action" value="">
<hr style="margin-top:1em"/>
<p class="full-width">
<span class="buttons" style="float:left">
<input type="button" value="Cancel" class="close">
</span>
<span class="buttons" style="float:right">
<input type="submit" value="OK">
</span>
</p>
</form>
<div class="clear"></div>
</div>
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
$(document).on('click', 'a.user-action', function(e) { $(document).on('click', 'a.user-action', function(e) {
......
...@@ -41,6 +41,12 @@ if ($_POST) { ...@@ -41,6 +41,12 @@ if ($_POST) {
$errors['err'] = 'Unable to add user. Correct any error(s) below and try again.'; $errors['err'] = 'Unable to add user. Correct any error(s) below and try again.';
} }
break; break;
case 'confirmlink':
$errors['err'] = "Send Confirmation Link: Coming soon!";
break;
case 'pwreset':
$errors['err'] = "Send Password Reset Link: Coming soon!";
break;
case 'mass_process': case 'mass_process':
if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) { if (!$_POST['ids'] || !is_array($_POST['ids']) || !count($_POST['ids'])) {
$errors['err'] = 'You must select at least one user member.'; $errors['err'] = 'You must select at least one user member.';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment