Skip to content

Commit

Permalink
Merge pull request #131 from eth-educators/job-board-fixes-3
Browse files Browse the repository at this point in the history
fix submission id bug
  • Loading branch information
hanniabu authored Nov 27, 2024
2 parents 8351a16 + 7bd331d commit c749769
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
9 changes: 8 additions & 1 deletion _includes/partials/content/forms/job-listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,14 @@

dataToPost.append("entry.1890204600", document.getElementById("{{context}}PaymentLink").value);
dataToPost.append("entry.437560064", document.getElementById("{{context}}Contact").value);
dataToPost.append("entry.1379727291", MD5Hash(dataToPost));

// create post id
let dataString = "";
for (const pair of dataToPost.entries()) {
dataString += pair[1];
}
dataToPost.append("entry.1379727291", MD5Hash(dataString));
console.log(MD5Hash(dataString));

fetch(url,{
method: "POST",
Expand Down
10 changes: 8 additions & 2 deletions _includes/partials/content/forms/seeking-employment-listing.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,14 @@

let email = document.getElementById("{{context}}Email").value.replaceAll("@", "[at]").replaceAll(".", "[dot]");
dataToPost.append("entry.1798662318", email);
let entryId = MD5Hash(dataToPost);
dataToPost.append("entry.2139827320", entryId);

// create post id
let dataString = "";
for (const pair of dataToPost.entries()) {
dataString += pair[1];
}
dataToPost.append("entry.2139827320", MD5Hash(dataString));
console.log(MD5Hash(dataString));


fetch(url,{
Expand Down
7 changes: 5 additions & 2 deletions _includes/partials/content/jobs/job-listings.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#jobListings .location {
text-transform: capitalize;
}
#jobListings .overview {
text-transform: capitalize;
}
</style>

<div id="jobs" class="row row-cols-1">
Expand Down Expand Up @@ -73,7 +76,7 @@
<small>2h</small>
</div>
<h5 class="card-title">{{listing.title}}</h5>
<small class="text-muted">
<small class="overview text-muted">
{{listing.type}}
<span class="mx-2">|</span>
{{listing.location | strip}}
Expand Down Expand Up @@ -184,7 +187,7 @@ <h5 class="card-title">{{listing.title}}</h5>
<small>${listingAge}</small>
</div>
<h5 class="card-title">${listing.position.trim()}</h5>
<small class="text-muted">
<small class="overview text-muted">
${listing.type.trim()}
<span class="mx-2">|</span>
${listing.location.trim()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#forHires .location {
text-transform: capitalize;
}
#forHires .overview {
text-transform: capitalize;
}
</style>


Expand Down Expand Up @@ -174,7 +177,7 @@ <h5 class="card-title">{{listing.title}}</h5>
<small>${listingAge}</small>
</div>
<h5 class="card-title">${listing.position.trim()}</h5>
<small class="text-muted">
<small class="overview text-muted">
${listing.type.trim()}
<span class="mx-2">|</span>
${listing.work_location.trim()}
Expand Down

0 comments on commit c749769

Please sign in to comment.