forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit - added filter * 3076 added test * linting * move import to top * lint * 3076 correction * 3076 Fixed today filter * linting * 3076 applied a11y review changes * 3076 fix failing test * 3106 first draft * clean up * clean up * clean admin * clean admin * parsing command * delete unwanted imports * added modal form * added styling to confirmation page * changes * 3106 middle page works * 3106 can add files for reparsing * 3106 Correct linting * bypassing status check to get this deployed for testing * injected working js * remove some of the comments * revert changes * linting and corrections * lint * redirect to meta model * 3106 replying comments * move imports to the top * Update admin.py: renamed reparse command * 3106 removed unused function * 3106 fixed reparsing command issues * resolve merge conflict errors * move admin action to celery task * rm print * rm prints * lint * rm unused * unused imports * script styling * changed log message * change log for action --------- Co-authored-by: andrew-jameson <[email protected]> Co-authored-by: Andrew <[email protected]> Co-authored-by: Jan Timpe <[email protected]> Co-authored-by: Alex P. <[email protected]>
- Loading branch information
1 parent
7811e8d
commit 702f72f
Showing
4 changed files
with
128 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tdrs-backend/tdpservice/data_files/static/admin/js/admin/admin_datafile_model.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$(window).on('load', function() { | ||
console.log('loaded'); | ||
var submitBtn=document.querySelector('button[type=submit]'); // add the first listener | ||
var theForm = submitBtn.parentNode.parentNode; | ||
|
||
for (var i = 0; i < theForm.childNodes.length; i++) { | ||
if (theForm.childNodes[i].className == "actions") { | ||
form_header = theForm.childNodes[i]; | ||
|
||
for (var i = 0; i < form_header.childNodes.length; i++) { | ||
if (form_header.childNodes[i].className == "action-counter") { | ||
number_of_files = form_header.childNodes[i]; | ||
break; | ||
} | ||
} | ||
|
||
break; | ||
} | ||
} | ||
submitBtn.addEventListener('click', function(e) { | ||
e.preventDefault(); | ||
if (confirm("You are about to re-parse " + number_of_files.innerHTML.split(/(\s+)/)[0] + " files. Are you sure you want to continue?")) { | ||
console.log('submitting'); | ||
theForm.submit(); | ||
} else { | ||
console.log('not submitting'); | ||
}; | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters