Skip to content

Commit

Permalink
Merge pull request #172 from cloudbees-days/cdro-workshop-compliance
Browse files Browse the repository at this point in the history
Cdro workshop compliance
  • Loading branch information
zvercodebender committed Sep 12, 2023
2 parents 6e20622 + f298ac6 commit 5cae32a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion labs/cloudbees-cdro-v2/content/labs/scripts/pre-reqs.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ async function initRollout() {
<label>Confirm password
<input type="password" required name="confirm_password" />
</label>
<label>Emmail
<input type="text" required name="email" />
</label>
<button type="submit" class="btn btn-default">Register</button>
</form>
<div id="errors" ></div>
Expand All @@ -51,6 +54,7 @@ async function initRollout() {
const username = formData.get("username")
const pw = formData.get("password")
const pw2 = formData.get("confirm_password")
const email = formData.get("email")
const errors = document.getElementById("errors")
if (pw !== pw2) {
errors.innerText = "The passwords you entered do not match. Please try again."
Expand All @@ -71,7 +75,8 @@ async function initRollout() {
method: "POST",
body: JSON.stringify({
"username": username,
"password": pw
"password": pw,
"email": email
}),
headers: {
"Content-Type": "application/json"
Expand Down

0 comments on commit 5cae32a

Please sign in to comment.