Skip to content

Commit

Permalink
Merge pull request #2617 from department-of-veterans-affairs/vapo
Browse files Browse the repository at this point in the history
Vapo
  • Loading branch information
Pelentan authored Dec 11, 2024
2 parents 34af15b + 5262965 commit a8ede2b
Show file tree
Hide file tree
Showing 29 changed files with 655 additions and 331 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ name: CodeQL
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
schedule:
- cron: 1 21 * * 2
workflow_dispatch: null
Expand Down
3 changes: 3 additions & 0 deletions LEAF_Nexus/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
Date: September 11, 2007
*/
/*
* test comment for 4583
*/

use App\Leaf\XSSHelpers;

Expand Down
1 change: 1 addition & 0 deletions LEAF_Request_Portal/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function hasDevConsoleAccess($login, $oc_db)
$main->assign('logo', '<img src="../images/VA_icon_small.png" alt="VA seal, U.S. Department of Veterans Affairs" />');

$t_login->assign('name', $login->getName());
$main->assign('display_name', $login->getName());

$qrcodeURL = "https://" . HTTP_HOST . $_SERVER['REQUEST_URI'];
$main->assign('qrcodeURL', urlencode($qrcodeURL));
Expand Down
5 changes: 4 additions & 1 deletion LEAF_Request_Portal/admin/templates/main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
{/if}

<header id="header" class="usa-header site-header">
<div class="usa-navbar site-header-navbar">
<div class="usa-navbar site-header-navbar" style="position:relative;">
<div class="usa-logo site-logo" id="logo">
<em class="usa-logo__text">
<a tabindex="0" onclick="window.location='./'" title="Admin Home" class="leaf-cursor-pointer">
Expand All @@ -78,6 +78,9 @@
<div><img class="print nodisplay" style="width: 72px" src="{$abs_portal_path}/qrcode/?encode={$qrcodeURL}" alt="QR code" /></div>
{/if}
</div>
<div style="position:absolute;right:0;top:0;padding:0 0.75rem;font-size:14px;">
Welcome, <b>{$display_name|sanitize}</b>! | <a href="../?a=logout" style="color:#00bde3">Sign out</a>
</div>
<div class="leaf-header-right">
{$emergency}<!--{$login}-->
<nav aria-label="main menu" id="nav">{$menu}</nav>
Expand Down
33 changes: 0 additions & 33 deletions LEAF_Request_Portal/admin/templates/menu.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,6 @@

</li>

<li class="leaf-width-4rem leaf-mob-menu lev2">
<a href="javascript:void(0);" aria-label="user account menu" aria-expanded="false" role="button"
aria-controls="user_account_menu"><i class='fas fa-user-circle leaf-usericon'></i></a>
<ul class="leaf-usernavmenu" id="user_account_menu">
<li tabindex="0" style="padding-left:0.4rem;">User:<br/><span class="leaf-user-menu-name">{$name}</span></li>
<li tabindex="0" style="padding-left:0.4rem;">Primary Admin:<br/><span id="primary-admin" class="leaf-user-menu-name"></span></li>
<li><a href="../?a=logout">Sign Out</a></li>
</ul>
</li>

</ul>

<script>
Expand Down Expand Up @@ -221,26 +211,3 @@ $('li:has(ul)').on('mouseover click mouseleave focusout', function(e) {
});
</script>

<script type="text/javascript">
$.ajax({
url: "../api/system/primaryadmin",
dataType: "json",
success: function(response) {
const emailString = response['Email'] != '' ? ' - <br><a href="mailto:' + response['Email'] + '" style="padding:0">' + response['Email'] + '</a>' : '';
if(response["Fname"] !== undefined)
{
$('#primary-admin').html(response['Fname'] + " " + response['Lname'] + emailString);
}
else if(response["userName"] !== undefined)
{
$('#primary-admin').html(response['userName']);
}
else
{
$('#primary-admin').html('Not Set');
}
}
});
</script>
19 changes: 14 additions & 5 deletions LEAF_Request_Portal/admin/templates/mod_workflow.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2087,11 +2087,11 @@
routes = res;
if (endPoints[-1] == undefined) {
endPoints[-1] = jsPlumb.addEndpoint('step_-1', {anchor: 'Continuous'}, endpointOptions);
jsPlumb.draggable('step_-1');
jsPlumb.draggable('step_-1', { allowNegative: false });
}
if (endPoints[0] == undefined) {
endPoints[0] = jsPlumb.addEndpoint('step_0', {anchor: 'Continuous'}, endpointOptions);
jsPlumb.draggable('step_0');
jsPlumb.draggable('step_0', { allowNegative: false });
}
// draw connector
Expand Down Expand Up @@ -2249,14 +2249,22 @@
type: 'GET',
url: '../api/workflow/' + workflowID,
success: function(res) {
var minY = 80;
var maxY = 80;
const minY = 80;
const minX = 0;
let maxY = 80;
let posY = 0;
let posX = 0;
for (let i in res) {
steps[res[i].stepID] = res[i];
posY = parseFloat(res[i].posY);
posX = parseFloat(res[i].posX);
if (posY < minY) {
posY = minY;
}
if (posX < minX) {
posX = minX;
}
let emailNotificationIcon = '';
if (typeof res[i].stepData == 'string' && isJSON(res[i].stepData)) {
Expand All @@ -2279,14 +2287,15 @@
);
$('#step_' + res[i].stepID).css({
'left': parseFloat(res[i].posX) + 'px',
'left': posX + 'px',
'top': posY + 'px',
'background-color': res[i].stepBgColor
});
if (endPoints[res[i].stepID] == undefined) {
endPoints[res[i].stepID] = jsPlumb.addEndpoint('step_' + res[i].stepID, {anchor: 'Continuous'}, endpointOptions);
jsPlumb.draggable('step_' + res[i].stepID, {
allowNegative: false,
// save position of the box when moved
stop: function(stepID) {
return function() {
Expand Down
12 changes: 11 additions & 1 deletion LEAF_Request_Portal/css/printer.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ table#tform td {

.printmainform {
border: 1px solid black;
clear: both;
}

.printformblock {
Expand All @@ -207,7 +208,7 @@ table#tform td {
margin-right: 4px;
font-size: 24px;
font-weight: bold;
background-color: black;
background-color: transparent;
color: white;
float: left;
}
Expand Down Expand Up @@ -334,6 +335,11 @@ img {
visibility: collapse;
}

.printResponse img{
display: initial;
visibility: initial;
}

div#tabcontainer_tablist {
display: none;
visibility: hidden;
Expand Down Expand Up @@ -380,3 +386,7 @@ table.table {
float: right;
font-size: 12px;
}

#nav-skip-link{
display: none;
}
3 changes: 3 additions & 0 deletions LEAF_Request_Portal/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/*
* As a work of the United States government, this project is in the public domain within the United States.
*/
/*
* test comment for 4583
*/

use App\Leaf\XSSHelpers;

Expand Down
2 changes: 1 addition & 1 deletion LEAF_Request_Portal/sources/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function initNexusDB(): void
private function getHeaders(): string
{
$header = 'MIME-Version: 1.0';
$header .= "\r\nContent-type: text/html; charset=iso-8859-1";
$header .= "\r\nContent-type: text/html; charset=utf-8";
if ($this->emailSender == '') {
$header .= "\r\nFrom: {$this->emailFrom}";
} else {
Expand Down
2 changes: 1 addition & 1 deletion LEAF_Request_Portal/sources/FormWorkflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ private function getFields(): array
default:
break;
}
$data = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $data);

$formattedFields["content"][$field['indicatorID']] = $data !== "" ? $data : $field["default"];
$formattedFields["to_cc_content"][$field['indicatorID']] = $emailValue;
}
Expand Down
8 changes: 5 additions & 3 deletions LEAF_Request_Portal/sources/Workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,12 @@ public function setEditorPosition($stepID, $x, $y)
return 'Restricted command.';
}

$vars = array(':workflowID' => $this->workflowID,
$vars = array(
':workflowID' => $this->workflowID,
':stepID' => $stepID,
':x' => $x,
':y' => $y, );
':x' => max(0, $x),
':y' => max(0, $y),
);
$res = $this->db->prepared_query('UPDATE workflow_steps
SET posX=:x, posY=:y
WHERE workflowID=:workflowID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ async function getDataBuildCharts(categoryID, customSearch) {
activeFilters += `<li>${param.id} ${param.operator} ${param.match}</li>`;
}
else {
query.addDataTerm(param.indicatorID, param.id, param.operator, param.match);
query.addDataTerm(param.id, param.indicatorID, param.operator, param.match);
activeFilters += `<li>${param.id}${param.indicatorID} ${param.operator} ${param.match}</li>`;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/libs/css/leaf.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*! #__NO_SIDE_EFFECTS__ */

/**
* @vue/runtime-core v3.5.9
* @vue/runtime-core v3.5.12
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/

/**
* @vue/runtime-dom v3.5.9
* @vue/runtime-dom v3.5.12
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/

/**
* @vue/shared v3.5.9
* @vue/shared v3.5.12
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
2 changes: 1 addition & 1 deletion app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js

Large diffs are not rendered by default.

Loading

0 comments on commit a8ede2b

Please sign in to comment.