mirror of https://github.com/itflow-org/itflow
Migrated admin modals to modals/ENTITY removed ajax_ and _modal prefixes from file names and use new ajax-modal syntax
This commit is contained in:
parent
91b0080428
commit
41f957ea3b
|
|
@ -59,11 +59,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark text-bold" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_ai_model_edit.php"
|
||||
data-ajax-id="<?php echo $model_id; ?>"
|
||||
>
|
||||
<a class="text-dark text-bold ajax-modal" href="#"
|
||||
data-modal-url="modals/ai/ai_model_edit.php?id=<?= $model_id ?>">
|
||||
<?php echo $model_name; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -76,11 +73,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_ai_model_edit.php"
|
||||
data-ajax-id="<?php echo $model_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/ai/ai_model_edit.php?id=<?= $model_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -110,5 +104,5 @@ $num_rows = mysqli_num_rows($sql);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_ai_model_add_modal.php";
|
||||
require_once "modals/ai/ai_model_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -60,11 +60,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark text-bold" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_ai_provider_edit.php"
|
||||
data-ajax-id="<?php echo $provider_id; ?>"
|
||||
>
|
||||
<a class="text-dark text-bold ajax-modal" href="#"
|
||||
data-modal-url="modals/ai/ai_provider_edit.php?id=<?= $provider_id ?>">
|
||||
<?php echo $provider_name; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -77,11 +74,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_ai_provider_edit.php"
|
||||
data-ajax-id="<?php echo $provider_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/ai/ai_provider_edit.php?id=<?= $provider_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -111,5 +105,5 @@ $num_rows = mysqli_num_rows($sql);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_ai_provider_add_modal.php";
|
||||
require_once "modals/ai/ai_provider_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -1,153 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
|
||||
$role_id = intval($_GET['id']);
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM user_roles WHERE role_id = $role_id LIMIT 1");
|
||||
|
||||
$row = mysqli_fetch_array($sql);
|
||||
$role_name = nullable_htmlentities($row['role_name']);
|
||||
$role_description = nullable_htmlentities($row['role_description']);
|
||||
$role_admin = intval($row['role_is_admin']);
|
||||
|
||||
// Count number of users that have each role
|
||||
$sql_role_user_count = mysqli_query($mysqli, "SELECT COUNT(user_id) FROM users WHERE user_role_id = $role_id AND user_archived_at IS NULL");
|
||||
$role_user_count = mysqli_fetch_row($sql_role_user_count)[0];
|
||||
|
||||
$sql_users = mysqli_query($mysqli, "SELECT * FROM users WHERE user_role_id = $role_id AND user_archived_at IS NULL");
|
||||
// Initialize an empty array to hold user names
|
||||
$user_names = [];
|
||||
|
||||
// Fetch each row and store the user_name in the array
|
||||
while($row = mysqli_fetch_assoc($sql_users)) {
|
||||
$user_names[] = nullable_htmlentities($row['user_name']);
|
||||
}
|
||||
|
||||
// Convert the array of user names to a comma-separated string
|
||||
$user_names_string = implode(",", $user_names) ;
|
||||
|
||||
if (empty($user_names_string)) {
|
||||
$user_names_string = "-";
|
||||
}
|
||||
|
||||
|
||||
// Generate the HTML form content using output buffering.
|
||||
ob_start();
|
||||
?>
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-user-shield mr-2"></i>Editing role:
|
||||
<strong><?php echo $role_name; ?></strong></h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="role_id" value="<?php echo $role_id; ?>">
|
||||
<div class="modal-body">
|
||||
|
||||
<ul class="nav nav-pills nav-justified mb-3">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="pill" href="#pills-role-details<?php echo $role_id; ?>">Details</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-role-access<?php echo $role_id; ?>">Access</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade show active" id="pills-role-details<?php echo $role_id; ?>">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-shield"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="role_name" placeholder="Role Name" maxlength="200" value="<?php echo $role_name; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-chevron-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="role_description" placeholder="Role Description" maxlength="200" value="<?php echo $role_description; ?>" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>Admin Access <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tools"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="role_is_admin" required>
|
||||
<option value="1" <?php if ($role_admin) { echo 'selected'; } ?> >Yes - this role should have full admin access</option>
|
||||
<option value="0" <?php if (!$role_admin) { echo 'selected'; } ?>>No - use permissions on the next tab</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-role-access<?php echo $role_id; ?>">
|
||||
|
||||
<?php if ($role_admin) { ?>
|
||||
<div class="alert alert-warning"><strong>Module permissions do not apply to Admins.</strong></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
|
||||
// Enumerate modules
|
||||
$sql_modules = mysqli_query($mysqli, "SELECT * FROM modules");
|
||||
while ($row_modules = mysqli_fetch_array($sql_modules)) {
|
||||
$module_id = intval($row_modules['module_id']);
|
||||
$module_name = nullable_htmlentities($row_modules['module_name']);
|
||||
$module_name_display = ucfirst(str_replace("module_","",$module_name));
|
||||
$module_description = nullable_htmlentities($row_modules['module_description']);
|
||||
|
||||
// Get permission level for module
|
||||
$module_permission_row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT user_role_permission_level FROM user_role_permissions WHERE module_id = $module_id AND user_role_id = $role_id LIMIT 1"));
|
||||
$module_permission = 0;
|
||||
if ($module_permission_row) {
|
||||
$module_permission = $module_permission_row['user_role_permission_level'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="form-group">
|
||||
<label> <?php echo $module_name_display ?> <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<select class="form-control select2" name="<?php echo "$module_id##$module_name" ?>" required>
|
||||
<option value="0" <?php if ($module_permission == 0) { echo 'selected'; } ?> >None</option>
|
||||
<option value="1" <?php if ($module_permission == 1) { echo 'selected'; } ?> >Read</option>
|
||||
<option value="2" <?php if ($module_permission == 2) { echo 'selected'; } ?>>Modify (Read, Edit, Archive)</option>
|
||||
<option value="3" <?php if ($module_permission == 3) { echo 'selected'; } ?>>Full (Read, Edit, Archive, Delete)</option>
|
||||
</select>
|
||||
</div>
|
||||
<small class="form-text text-muted"><?php echo $module_description ?></small>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } // End while ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="edit_role" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
|
|
@ -170,7 +170,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<script src="../js/bulk_actions.js"></script>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_api_key_add_modal.php";
|
||||
require_once "modals/api/api_key_add.php";
|
||||
|
||||
require_once "../includes/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -119,11 +119,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_category_edit.php"
|
||||
data-ajax-id="<?php echo $category_id; ?>"
|
||||
>
|
||||
<a class="text-dark ajax-modal" href="#"
|
||||
data-modal-url="modals/category/category_edit.php?id=<?= $category_id ?>">
|
||||
<?php echo $category_name; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -148,11 +145,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_category_edit.php"
|
||||
data-ajax-id="<?php echo $category_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/category/category_edit.php?id=<?= $category_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<a class="dropdown-item text-danger confirm-link"
|
||||
|
|
@ -182,5 +176,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_category_add_modal.php";
|
||||
require_once "modals/category/category_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -101,11 +101,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_custom_link_edit.php"
|
||||
data-ajax-id="<?php echo $custom_link_id; ?>"
|
||||
>
|
||||
<a class="ajax-modal" href="#"
|
||||
data-modal-url="modals/custom_link/custom_link_edit.php?id=<?= $custom_link_id ?>">
|
||||
<i class="fa fa-fw fa-<?php echo $custom_link_icon; ?> mr-2"></i><?php echo $custom_link_name;?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -118,7 +115,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="ajax-modal" data-ajax-url="ajax/ajax_custom_link_edit.php" data-ajax-id="<?php echo $custom_link_id; ?>">
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/custom_link/custom_link_edit.php?id=<?= $custom_link_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -144,5 +141,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_custom_link_add_modal.php";
|
||||
require_once "modals/custom_link/custom_link_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -93,12 +93,9 @@
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-size="xl"
|
||||
data-ajax-url="ajax/ajax_document_template_edit.php"
|
||||
data-ajax-id="<?php echo $document_template_id; ?>"
|
||||
>
|
||||
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -124,7 +121,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once "modals/admin_document_template_add_modal.php"; ?>
|
||||
<?php require_once "modals/document_template/document_template_add.php"; ?>
|
||||
<?php require_once "../includes/footer.php"; ?>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -46,12 +46,9 @@ $document_template_updated_at = nullable_htmlentities($row['document_template_up
|
|||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-file mr-2"></i><?php echo $document_template_name; ?></h3>
|
||||
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-primary"
|
||||
data-toggle="ajax-modal"
|
||||
<button type="button" class="btn btn-primary ajax-modal"
|
||||
data-modal-size="xl"
|
||||
data-ajax-url="ajax/ajax_document_template_edit.php"
|
||||
data-ajax-id="<?php echo $document_template_id; ?>"
|
||||
>
|
||||
data-modal-url="modals/document_template/document_template_edit.php?id=<?= $document_template_id ?>">
|
||||
<i class="fas fa-edit mr-2"></i>Edit
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -174,12 +174,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<td><?php echo $email_status_display; ?></td>
|
||||
<td><?php echo $email_attempts; ?></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-sm btn-secondary" href="#"
|
||||
data-toggle = "ajax-modal"
|
||||
data-modal-size = "lg"
|
||||
data-ajax-url = "ajax/ajax_mail_queue_message_view.php"
|
||||
data-ajax-id = "<?php echo $email_id; ?>"
|
||||
>
|
||||
<a class="btn btn-sm btn-secondary ajax-modal" href="#"
|
||||
data-modal-size="lg"
|
||||
data-modal-url="modals/mail_queue/mail_queue_message_view.php?id=<?= $email_id ?>">
|
||||
<i class="fas fa-fw fa-eye"></i>
|
||||
</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
<div class="modal" id="addRoleModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-user-shield mr-2"></i>Add new role</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<div class="modal-body">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-shield"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="role_name" placeholder="Role Name" maxlength="200" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Description <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-chevron-right"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="role_description" placeholder="Role Description" maxlength="200" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Admin Access <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-tools"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="role_is_admin" required>
|
||||
<option value="0">No - edit after creation to set permissions</option>
|
||||
<option value="1">Yes - this role should have full admin access</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="add_role" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
<div class="modal" id="addUserModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-user-plus mr-2"></i>New User</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<div class="modal-body">
|
||||
|
||||
<ul class="nav nav-pills nav-justified mb-3">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="pill" href="#pills-user-details">Details</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="pill" href="#pills-user-access">Restrict Access</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade show active" id="pills-user-details">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Name <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="name" placeholder="Full Name" maxlength="200" required autofocus>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
</div>
|
||||
<input type="email" class="form-control" name="email" placeholder="Email Address" maxlength="200" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Password <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" data-toggle="password" name="password" id="password" placeholder="Enter a Password" autocomplete="new-password" minlength="8" required>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<span class="btn btn-default"><i class="fa fa-fw fa-question" onclick="generatePassword()"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Role <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-shield"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="role" required>
|
||||
<option value="">- Role -</option>
|
||||
<?php
|
||||
$sql_user_roles = mysqli_query($mysqli, "SELECT * FROM user_roles WHERE role_archived_at IS NULL");
|
||||
while ($row = mysqli_fetch_array($sql_user_roles)) {
|
||||
$role_id = intval($row['role_id']);
|
||||
$role_name = nullable_htmlentities($row['role_name']);
|
||||
|
||||
?>
|
||||
<option value="<?php echo $role_id; ?>"><?php echo $role_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Avatar</label>
|
||||
<input type="file" class="form-control-file" accept="image/*" name="file">
|
||||
</div>
|
||||
|
||||
<div class="form-group" <?php if(empty($config_smtp_host)) { echo "hidden"; } ?>>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" type="checkbox" id="sendEmailCheckBox" name="send_email" value="" checked>
|
||||
<label for="sendEmailCheckBox" class="custom-control-label">
|
||||
Send user e-mail with login details?
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" type="checkbox" id="forceMFACheckBox" name="force_mfa" value=1>
|
||||
<label for="forceMFACheckBox" class="custom-control-label">
|
||||
Force MFA
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-user-access">
|
||||
|
||||
<div class="alert alert-info">
|
||||
Check boxes to authorize user client access. No boxes grant full client access. Admin users are unaffected.
|
||||
</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item bg-dark">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" onclick="this.closest('.tab-pane').querySelectorAll('.client-checkbox').forEach(checkbox => checkbox.checked = this.checked);">
|
||||
<label class="form-check-label ml-3"><strong>Restrict Access to Clients</strong></label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
|
||||
$sql_client_select = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_client_select)) {
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']);
|
||||
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input client-checkbox" name="clients[]" value="<?php echo $client_id; ?>">
|
||||
<label class="form-check-label ml-3"><?php echo $client_name; ?></label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="add_user" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
<div class="modal" id="resetAllUserPassModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="mb-4" style="text-align: center;">
|
||||
<i class="far fas fa-10x fa-skull-crossbones text-danger mb-3 mt-3"></i>
|
||||
<h2>Incident Response: Agent Password Reset</h2>
|
||||
<br>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<b>This is a potentially destructive function.<br>It is intended to be used as part of a potential security incident.</b>
|
||||
</div>
|
||||
<h6 class="mb-4 text-secondary"><b>All ITFlow agent passwords will be reset and shown to you </b><i>(except yours - change yours first!)</i>.<br/><br/>You should communicate temporary passwords to agents out of band (e.g. via a phone call) and require they are changed ASAP.</h6>
|
||||
<form action="post.php" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<div class="row col-7 offset-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<input type="password" class="form-control" placeholder="Enter your account password to continue" name="admin_password" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<button class="btn btn-danger" type="submit" name="ir_reset_user_password"><i class="fas fa-fw fa-key mr-2"></i>Reset passwords</button>
|
||||
</form>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-secondary btn-lg px-5 mr-4" data-dismiss="modal">Cancel</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<div class="modal" id="archiveUserModal<?php echo $user_id; ?>" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="mb-4" style="text-align: center;">
|
||||
<i class="far fa-10x fa-times-circle text-danger mb-3 mt-3"></i>
|
||||
<h2>Are you sure?</h2>
|
||||
<h6 class="mb-4 text-secondary">Do you really want to <b>archive <?php echo $user_name; ?></b>? This process cannot be undone.</h6>
|
||||
<h6 class="mb-4 text-secondary"><?php echo $user_name ?> will no longer be able to log in or use ITFlow, but all associated content will remain accessible.</h6>
|
||||
<button type="button" class="btn btn-outline-secondary btn-lg px-5 mr-4" data-dismiss="modal">Cancel</button>
|
||||
<a class="btn btn-danger btn-lg px-5" href="post.php?archive_user=<?php echo $user_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token'] ?>">Yes, archive!</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<div class="modal" id="exportUserModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-download mr-2"></i>Export Users to CSV</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<div class="modal-body">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="export_users_csv" class="btn btn-primary text-bold"><i class="fas fa-fw fa-download mr-2"></i>Download CSV</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fas fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<div class="modal" id="userInviteModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-user-plus"></i>Invite User</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Email <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
</div>
|
||||
<input type="email" class="form-control" name="email" placeholder="Email Address" maxlength="200" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Role <strong class="text-danger">*</strong></label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user-shield"></i></span>
|
||||
</div>
|
||||
<select class="form-control select2" name="role" required>
|
||||
<option value="">- Role -</option>
|
||||
<!-- //TODO: Pull from roles -->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" name="invite_user" class="btn btn-primary text-bold"><i class="fas fa-paper-plane mr-2"></i>Send Invite</button>
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$model_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -87,4 +87,4 @@ ob_start();
|
|||
|
||||
<?php
|
||||
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$provider_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -66,4 +66,4 @@ ob_start();
|
|||
|
||||
<?php
|
||||
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$category_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -53,4 +53,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$custom_link_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -96,4 +96,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$document_template_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -44,4 +44,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
if (!isset($session_is_admin) || !$session_is_admin) {
|
||||
exit(WORDING_ROLECHECK_FAILED . "<br>Tell your admin: Your role does not have admin access.");
|
||||
|
|
@ -9,7 +9,7 @@ if (!isset($session_is_admin) || !$session_is_admin) {
|
|||
$email_id = intval($_GET['id']);
|
||||
|
||||
//Initialize the HTML Purifier to prevent XSS
|
||||
require "../../plugins/htmlpurifier/HTMLPurifier.standalone.php";
|
||||
require "../../../plugins/htmlpurifier/HTMLPurifier.standalone.php";
|
||||
|
||||
$purifier_config = HTMLPurifier_Config::createDefault();
|
||||
$purifier_config->set('Cache.DefinitionImpl', null); // Disable cache by setting a non-existent directory or an invalid one
|
||||
|
|
@ -76,4 +76,4 @@ ob_start();
|
|||
<script src="../../js/pretty_content.js"></script>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$payment_method_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -48,4 +48,4 @@ ob_start();
|
|||
|
||||
<?php
|
||||
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$provider_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -105,4 +105,4 @@ ob_start();
|
|||
|
||||
<?php
|
||||
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/ajax_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$role_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -150,4 +150,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once "../../includes/ajax_footer.php";
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$software_template_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -96,4 +96,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$tag_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -79,4 +79,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="modal" id="addTaxModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header text-white">
|
||||
<div class="modal-header bg-dark">
|
||||
<h5 class="modal-title"><i class="fas fa-fw fa-balance-scale mr-2"></i>New Tax</h5>
|
||||
<button type="button" class="close text-white" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$tax_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -43,4 +43,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$ticket_status_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -76,4 +76,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$task_template_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -59,4 +59,4 @@ ob_start();
|
|||
|
||||
<?php
|
||||
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$user_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -201,4 +201,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once "../../includes/modal_footer.php";
|
||||
require_once "../../../includes/modal_footer_new.php";
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once '../../includes/modal_header.php';
|
||||
require_once '../../../includes/modal_header_new.php';
|
||||
|
||||
$vendor_template_id = intval($_GET['id']);
|
||||
|
||||
|
|
@ -251,4 +251,4 @@ ob_start();
|
|||
</form>
|
||||
|
||||
<?php
|
||||
require_once '../../includes/modal_footer.php';
|
||||
require_once '../../../includes/modal_footer_new.php';
|
||||
|
|
@ -54,11 +54,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark text-bold" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_payment_method_edit.php"
|
||||
data-ajax-id="<?php echo $payment_method_id; ?>"
|
||||
>
|
||||
<a class="text-dark text-bold ajax-modal" href="#"
|
||||
data-modal-url="modals/payment_method/payment_method_edit.php?id=<?= $payment_method_id ?>">
|
||||
<?php echo $payment_method_name; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -70,11 +67,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_payment_method_edit.php"
|
||||
data-ajax-id="<?php echo $payment_method_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/payment_method/payment_method_edit.php?id=<?= $payment_method_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -104,5 +98,5 @@ $num_rows = mysqli_num_rows($sql);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_payment_method_add_modal.php";
|
||||
require_once "modals/payment_method/payment_method_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -82,11 +82,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark text-bold" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_payment_provider_edit.php"
|
||||
data-ajax-id="<?php echo $provider_id; ?>"
|
||||
>
|
||||
<a class="text-dark text-bold ajax-modal" href="#"
|
||||
data-modal-url="modals/payment_provider/payment_provider_edit.php?id=<?= $provider_id ?>">
|
||||
<?php echo $provider_name; ?>
|
||||
</a>
|
||||
<span class="text-secondary"><?php echo $provider_description; ?></span>
|
||||
|
|
@ -103,11 +100,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_payment_provider_edit.php"
|
||||
data-ajax-id="<?php echo $provider_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/payment_provider/payment_provider_edit.php?id=<?= $provider_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -137,5 +131,5 @@ $num_rows = mysqli_num_rows($sql);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_payment_provider_add_modal.php";
|
||||
require_once "modals/payment_provider/payment_provider_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
require "modals/admin_project_template_edit_modal.php";
|
||||
require "modals/project_template/project_template_edit.php";
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -140,6 +140,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_project_template_add_modal.php";
|
||||
require_once "modals/project_template/project_template_add.php";
|
||||
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ if (isset($_GET['project_template_id'])) {
|
|||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<a href="admin_ticket_template_details.php?ticket_template_id=<?php echo $ticket_template_id; ?>">
|
||||
<a href="ticket_template_details.php?ticket_template_id=<?php echo $ticket_template_id; ?>">
|
||||
<?php echo $ticket_template_name; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -222,8 +222,8 @@ if (isset($_GET['project_template_id'])) {
|
|||
|
||||
<?php
|
||||
|
||||
require_once "modals/admin_project_template_edit_modal.php";
|
||||
require_once "modals/admin_project_template_ticket_template_add_modal.php";
|
||||
require_once "modals/project_template/project_template_edit.php";
|
||||
require_once "modals/project_template/project_template_ticket_template_add.php";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark text-bold" href="#" <?php if ($role_id !== 3) { ?> data-toggle="ajax-modal" data-ajax-url="ajax/ajax_role_edit.php" data-ajax-id="<?php echo $role_id; ?>" <?php } ?>>
|
||||
<?php echo $role_name; ?>
|
||||
<a href="#" <?php if ($role_id !== 3) { ?> class="ajax-modal" data-modal-url="modals/role/role_edit.php?id=<?= $role_id ?>" <?php } ?>>
|
||||
<strong class="text-dark"><?php echo $role_name; ?></strong>
|
||||
</a>
|
||||
<div class="text-secondary"><?php echo $role_description; ?></div>
|
||||
</td>
|
||||
|
|
@ -110,11 +110,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</button>
|
||||
<div class="dropdown-menu">
|
||||
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_role_edit.php"
|
||||
data-ajax-id="<?php echo $role_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/role/role_edit.php?id=<?= $role_id ?>">
|
||||
<i class="fas fa-fw fa-user-edit mr-2"></i>Edit
|
||||
</a>
|
||||
|
||||
|
|
@ -147,5 +144,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
require_once "modals/role_add.php";
|
||||
require_once "modals/role/role_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark" href="#" data-toggle="ajax-modal" data-ajax-url="ajax/ajax_software_template_edit.php" data-ajax-id="<?php echo $software_template_id; ?>">
|
||||
<a class="text-dark ajax-modal" href="#" data-modal-url="modals/software_template/software_template_edit.php?id=<?= $software_template_id ?>">
|
||||
<div class="media">
|
||||
<i class="fa fa-fw fa-2x fa-cube mr-3"></i>
|
||||
<div class="media-body">
|
||||
|
|
@ -98,7 +98,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="ajax-modal" data-ajax-url="ajax/ajax_software_template_edit.php" data-ajax-id="<?php echo $software_template_id; ?>">
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/software_template/software_template_edit.php?id=<?= $software_template_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<?php if($session_user_role == 3) { ?>
|
||||
|
|
@ -127,5 +127,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_software_template_add_modal.php";
|
||||
require_once "modals/software_template/software_template_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -83,11 +83,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_tag_edit.php"
|
||||
data-ajax-id="<?php echo $tag_id; ?>"
|
||||
>
|
||||
<a class="ajax-modal" href="#"
|
||||
data-modal-url="modals/tag/tag_edit.php?id=<?= $tag_id ?>">
|
||||
<span class='badge text-light p-2 mr-1' style="background-color: <?php echo $tag_color; ?>"><i class="fa fa-fw fa-<?php echo $tag_icon; ?> mr-2"></i><?php echo $tag_name; ?></span>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -98,11 +95,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_tag_edit.php"
|
||||
data-ajax-id="<?php echo $tag_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/tag/tag_edit.php?id=<?= $tag_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -129,7 +123,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_tag_add_modal.php";
|
||||
require_once "modals/tag/tag_add.php";
|
||||
|
||||
require_once "../includes/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -53,11 +53,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="text-dark text-bold" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_tax_edit.php"
|
||||
data-ajax-id="<?php echo $tax_id; ?>"
|
||||
>
|
||||
<a class="text-dark text-bold ajax-modal" href="#"
|
||||
data-modal-url="modals/tax/tax_edit.php?id=<?= $tax_id ?>">
|
||||
<?php echo $tax_name; ?>
|
||||
</a>
|
||||
</td>
|
||||
|
|
@ -68,11 +65,8 @@ $num_rows = mysqli_num_rows($sql);
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_tax_edit.php"
|
||||
data-ajax-id="<?php echo $tax_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/tax/tax_edit.php?id=<?= $tax_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -102,7 +96,5 @@ $num_rows = mysqli_num_rows($sql);
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_tax_add_modal.php";
|
||||
|
||||
require_once "modals/tax/tax_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<td>
|
||||
<a href="#"
|
||||
<?php if ( $ticket_status_id > 5 ) { ?>
|
||||
data-toggle="ajax-modal" data-ajax-url="ajax/ajax_custom_ticket_status_edit.php" data-ajax-id="<?php echo $ticket_status_id; ?>"
|
||||
class="ajax-modal" data-modal-url="modals/ticket_status/ticket_status_edit.php?id=<?= $ticket_status_id ?>"
|
||||
<?php } ?>
|
||||
>
|
||||
<?php echo $ticket_status_name; ?>
|
||||
|
|
@ -98,7 +98,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-toggle="ajax-modal" data-ajax-url="ajax/ajax_custom_ticket_status_edit.php" data-ajax-id="<?php echo $ticket_status_id; ?>">
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/ticket_status/ticket_status_edit.php?id=<?= $ticket_status_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<?php if (!$ticket_status_active) { ?>
|
||||
|
|
@ -126,7 +126,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_ticket_status_add_modal.php";
|
||||
require_once "modals/ticket_status/ticket_status_add.php";
|
||||
|
||||
require_once "../includes/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -110,6 +110,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_ticket_template_add_modal.php";
|
||||
require_once "modals/ticket_template/ticket_template_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
||||
|
|
|
|||
|
|
@ -110,11 +110,8 @@ $sql_task_templates = mysqli_query($mysqli, "SELECT * FROM task_templates WHERE
|
|||
<i class="fas fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle = "ajax-modal"
|
||||
data-ajax-url = "ajax/ajax_ticket_template_task_edit.php"
|
||||
data-ajax-id = "<?php echo $task_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/ticket_template/ticket_template_task_edit.php?id=<?= $task_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
@ -162,5 +159,5 @@ new Sortable(document.querySelector('table#tasks tbody'), {
|
|||
|
||||
<?php
|
||||
|
||||
require_once "modals/admin_ticket_template_edit_modal.php";
|
||||
require_once "modals/ticket_template/ticket_template_edit.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
|
|
@ -148,11 +148,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<a class="text-dark" href="#"
|
||||
<a href="#"
|
||||
<?php if ($user_id !== $session_user_id) { // Prevent modifying self ?>
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="modals/user_edit.php"
|
||||
data-ajax-id="<?php echo $user_id; ?>"
|
||||
class="ajax-modal"
|
||||
data-modal-url="modals/user/user_edit.php?id=<?= $user_id ?>"
|
||||
<?php } ?>
|
||||
>
|
||||
<?php if (!empty($user_avatar)) { ?>
|
||||
|
|
@ -180,11 +179,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="modals/user_edit.php"
|
||||
data-ajax-id="<?php echo $user_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/user/user_edit.php?id=<?= $user_id ?>">
|
||||
<i class="fas fa-fw fa-user-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<?php if ($remember_token_count > 0) { ?>
|
||||
|
|
@ -212,7 +208,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
|
||||
<?php
|
||||
|
||||
require "modals/user_archive.php";
|
||||
require "modals/user/user_archive.php";
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -232,8 +228,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</script>
|
||||
|
||||
<?php
|
||||
require_once "modals/user_add.php";
|
||||
require_once "modals/user_invite.php";
|
||||
require_once "modals/user_export.php";
|
||||
require_once "modals/user_all_reset_password.php";
|
||||
require_once "modals/user/user_add.php";
|
||||
require_once "modals/user/user_invite.php";
|
||||
require_once "modals/user/user_export.php";
|
||||
require_once "modals/user/user_all_reset_password.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
@ -92,11 +92,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
?>
|
||||
<tr>
|
||||
<th>
|
||||
<a class="text-dark" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_vendor_template_edit.php"
|
||||
data-ajax-id="<?php echo $vendor_template_id; ?>"
|
||||
>
|
||||
<a class="text-dark ajax-modal" href="#"
|
||||
data-modal-url="modals/vendor_template/vendor_template_edit.php?id=<?= $vendor_template_id ?>">
|
||||
<i class="fa fa-fw fa-building text-secondary mr-2"></i><?php echo $vendor_template_name; ?>
|
||||
</a>
|
||||
<?php
|
||||
|
|
@ -137,11 +134,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#"
|
||||
data-toggle="ajax-modal"
|
||||
data-ajax-url="ajax/ajax_vendor_template_edit.php"
|
||||
data-ajax-id="<?php echo $vendor_template_id; ?>"
|
||||
>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/vendor_template/vendor_template_edit.php?id=<?= $vendor_template_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
</a>
|
||||
<?php if ($session_user_role == 3) { ?>
|
||||
|
|
@ -170,5 +164,5 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
|
||||
<?php
|
||||
require_once "modals/admin_vendor_template_add_modal.php";
|
||||
require_once "modals/vendor_template/vendor_template_add.php";
|
||||
require_once "../includes/footer.php";
|
||||
|
|
|
|||
Loading…
Reference in New Issue