Skip to content

Commit

Permalink
show email on registration
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jan 18, 2024
1 parent aa65157 commit 7e976eb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 25 deletions.
20 changes: 10 additions & 10 deletions apps/labeling/labelReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ function setDownloadModalProgress(num) {
}

function labelInfoToHtml(label) {
let text = "<div class='labelHtml'>";
let text = '<div class=\'labelHtml\'>';
// top level fields

if (false && label.alias) {
Expand Down Expand Up @@ -782,7 +782,7 @@ function labelInfoToHtml(label) {
text += label.task;
text += '<br/>';
}
let skip_props = ['style']
let skip_props = ['style'];

Check failure on line 785 in apps/labeling/labelReview.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Identifier 'skip_props' is not in camel case

Check failure on line 785 in apps/labeling/labelReview.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Identifier 'skip_props' is not in camel case
// now go through properties
for (let propkey in label.properties) {
if (skip_props.indexOf(propkey) == -1) {
Expand All @@ -799,20 +799,20 @@ function labelInfoToHtml(label) {
text += '<br/>';
}
}
text += "</div>"
text += '</div>';
return text;
}

function labelAnnotToHtml(annot){
let text = "<div class='annotHtml'>";
function labelAnnotToHtml(annot) {
let text = '<div class=\'annotHtml\'>';
// top level fields

if (annot.create_date) {
text += '<b>Create Date/Time:</b> ';
text += annot.create_date;
text += '<br/>';
}
let skip_props = ['style']
let skip_props = ['style'];

Check failure on line 815 in apps/labeling/labelReview.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Identifier 'skip_props' is not in camel case

Check failure on line 815 in apps/labeling/labelReview.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Identifier 'skip_props' is not in camel case
// now go through properties
for (let propkey in annot.properties) {
if (skip_props.indexOf(propkey) == -1) {
Expand All @@ -829,7 +829,7 @@ function labelAnnotToHtml(annot){
text += '<br/>';
}
}
text += "</div>"
text += '</div>';
return text;
}

Expand All @@ -850,9 +850,9 @@ function getLabelInfo(e) {
let texts = matched_labels.map(labelInfoToHtml);
document.getElementById('label_review').innerHTML = texts.join('<br/><hr/><br/>');
// render relevant annotations
document.getElementById('annot_review').innerHTML = "";
for (let label of matched_labels){
$CAMIC.store.findLabelingAnnotation({'creator': $USER, 'parent': label._id.$oid}).then(x=>{
document.getElementById('annot_review').innerHTML = '';
for (let label of matched_labels) {

Check failure on line 854 in apps/labeling/labelReview.js

View workflow job for this annotation

GitHub Actions / build (16.x)

Identifier 'matched_labels' is not in camel case

Check failure on line 854 in apps/labeling/labelReview.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Identifier 'matched_labels' is not in camel case
$CAMIC.store.findLabelingAnnotation({'creator': $USER, 'parent': label._id.$oid}).then((x)=>{
document.getElementById('annot_review').innerHTML += x.map(labelAnnotToHtml).join('<br/><hr><br/>');
});
}
Expand Down
26 changes: 13 additions & 13 deletions apps/labeling/roiSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ async function initialize() {
// add dbl click handler
$CAMIC.viewer.addHandler('canvas-double-click', addAnnot);
// alert and return if no mpp
if (!$CAMIC.slideData.mpp){
alert("This image doesn't have the microns per pixel (mpp) defined. Please resolve this issue before working with this image.");
if (!$CAMIC.slideData.mpp) {
alert('This image doesn\'t have the microns per pixel (mpp) defined. Please resolve this issue before working with this image.');
window.location = `./roiSelectTable.html?collectionId=${$D.params.collectionId}`;
}
}
Expand Down Expand Up @@ -840,9 +840,9 @@ function createTutorial() {
$UI.modalbox.elt.style.paddingTop='60px';
$UI.modalbox.body.style.padding = 0;
$UI.modalbox.body.style.display = 'block';
window.open('./RoiSelectTutorial.pdf', '_blank').focus()
window.open('./RoiSelectTutorial.pdf', '_blank').focus();
$UI.modalbox.body.innerHTML = `<embed src="./RoiSelectTutorial.pdf" width="100%" height="550" />`;
//$UI.modalbox.open();
// $UI.modalbox.open();
}

function getAnnotationDataFrom(data) {
Expand Down Expand Up @@ -1261,7 +1261,7 @@ function makeFormReactive() {
tt.addEventListener('change', function(e) {
disableITS();
disableTIL();
if (tt.dataset.showPitfalls){
if (tt.dataset.showPitfalls) {
enableSaveBtn();
// show pitfalls
document.getElementById('pitfalls_area').style.display = 'block';
Expand All @@ -1271,13 +1271,13 @@ function makeFormReactive() {
let checkboxes = document.querySelectorAll('#left_menu input[type=checkbox]');
for (let check of checkboxes) {
check.checked = false;
}
} else {
enableITS();
disableSaveBtn();
document.getElementById('sliders').style.display = 'block';
document.getElementById('pitfalls_area').style.display = 'none';
}
} else {
enableITS();
disableSaveBtn();
document.getElementById('sliders').style.display = 'block';
document.getElementById('pitfalls_area').style.display = 'none';
}
});
}
}
Expand Down Expand Up @@ -1319,7 +1319,7 @@ function resetForm() {
}
document.getElementById('pitfalls_area').style.display = 'none';
document.getElementById('save').style.display = 'none';
document.getElementById('comments').value = "";
document.getElementById('comments').value = '';
}


Expand All @@ -1331,7 +1331,7 @@ function addAnnot(e) {
let halfWidth = 1000;
let halfHeight = 1000;
// should be 500 microns; so half is 250 divided by microns per pixel, get width and height in pixels
if ($CAMIC.slideData.mpp){
if ($CAMIC.slideData.mpp) {
halfWidth = Math.floor(250/$CAMIC.slideData.mpp);
halfHeight = Math.floor(250/$CAMIC.slideData.mpp);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/registration/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ async function saveRegistration() {
if (kcRes.username){
console.log("successful user add")
await requestResetPassword(emailAddress)
window.location = "./registration_success.html";
window.location = "./registration_success.html?email=" + encodeURIComponent(emailAddress);
} else {
message.addError('Failed to add user to keycloak', 10000);
console.log(kcRes);
Expand Down
8 changes: 7 additions & 1 deletion apps/registration/registration_success.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<section id="main" class="wrapper" style="padding: 1em 3em 3em 3em;">
<h1>Welcome</h1>
<div>
<p> Welcome to the HTT project! You should receive an email at the address used in registration with instructions on how to set your password. <br /> Initially, this account will have limited "public" access. Then, an HTT administrator will assign you to an updated role and email you about next steps. <br />
<p> Welcome to the HTT project! Your login is your email<span id="email_address"></span>. You should receive an email at the address used in registration with instructions on how to set your password. <br /> Initially, this account will have limited "public" access. Then, an HTT administrator will assign you to an updated role and email you about next steps. <br />
<br /> Please <a href="mailto:[email protected];[email protected];[email protected]?subject=HTT Registration Question">contact the administrative team</a> with any questions. <br />
<br /> Thank you for registering.
</p>
Expand All @@ -43,5 +43,11 @@ <h1>Welcome</h1>
<script src="../landing/util.js"></script>
<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<script>
let urlParams = new URLSearchParams(window.location.search);
if (urlParams.get("email")) {
document.getElementById("email_address").innerHTML = " " + decodeURIComponent(urlParams.get("email"));
}
</script>
</body>
</html>

0 comments on commit 7e976eb

Please sign in to comment.