Skip to content

Commit

Permalink
Merge branch 'main' into task/WP-724
Browse files Browse the repository at this point in the history
  • Loading branch information
rstijerina authored Dec 20, 2024
2 parents 86e16aa + 928dc75 commit 105f4a5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
17 changes: 16 additions & 1 deletion client/src/components/_common/Form/FileInputDropZone.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* FP-993: Allow use by DataFilesUploadModal */
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { useDropzone } from 'react-dropzone';
import { Button, InlineMessage } from '_common';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -45,6 +45,13 @@ function FileInputDropZone({
}
};

const removeRejectedFile = (i) => {
const newRejectedFiles = rejectedFiles.filter(
(file) => file !== rejectedFiles[i]
);
setRejectedFiles(newRejectedFiles);
};

const showFileList = (files && files.length > 0) || rejectedFiles.length > 0;

return (
Expand Down Expand Up @@ -74,6 +81,14 @@ function FileInputDropZone({
<InlineMessage type="error">
Exceeds File Size Limit
</InlineMessage>
<Button
type="link"
onClick={() => {
removeRejectedFile(i);
}}
>
Remove
</Button>
</div>
))}
{files &&
Expand Down
6 changes: 3 additions & 3 deletions server/conf/nginx/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="author" content="">
<title>Temporarily Unavailable</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<style>
/* Error Page Inline Styles */
body {
Expand Down Expand Up @@ -68,7 +68,7 @@
<!-- End Error Page Content -->
<!--Scripts-->
<!-- jQuery library -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions server/portal/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
{% include 'includes/footer.html' %}
{% block scripts %}{% endblock %}
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
</body>
</html>

0 comments on commit 105f4a5

Please sign in to comment.