diff --git a/uber/templates/registration/attendee_data.html b/uber/templates/registration/attendee_data.html index 7db1bf766..54047c772 100644 --- a/uber/templates/registration/attendee_data.html +++ b/uber/templates/registration/attendee_data.html @@ -145,11 +145,17 @@ x-init="$watch('badge_ribbons', (ribbons) => { - if (Alpine.raw(ribbons).includes({{ c.VOLUNTEER_RIBBON }})) { staffing = true } + console.log(Alpine.raw(ribbons)) + if (Alpine.raw(ribbons).includes({{ c.VOLUNTEER_RIBBON }})) { staffing=true } }); $watch('badge_type', (btype) => { - if( btype == {{ c.STAFF_BADGE }} || btype == {{ c.CONTRACTOR_BADGE }}){ staffing = true } + console.log(btype); + if( btype == {{ c.STAFF_BADGE }} || btype == {{ c.CONTRACTOR_BADGE }}){ + staffing = true; + //This does trigger the above watcher, but that's alright. + badge_ribbons = badge_ribbons.filter( ribbon => ribbon != {{ c.VOLUNTEER_RIBBON }} ); + } })" > {{ csrf_token() }} diff --git a/uber/templates/registration/form.html b/uber/templates/registration/form.html index b8c8f5f30..2d7b81eb2 100644 --- a/uber/templates/registration/form.html +++ b/uber/templates/registration/form.html @@ -188,7 +188,11 @@