Skip to content

Commit

Permalink
Add the word “Include” before the extra consideration checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
RobKraft committed Dec 20, 2023
1 parent bae8c3e commit fbe756e
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 86 deletions.
Binary file added assets/images/find-us-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/reusefull-logo-sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/views/donate.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const app = new Vue({
this.errorCharity = false

if (!this.donate.pickup && !this.donate.dropoff) {
this.errorPickup = true
this.hasError = true
this.donate.pickup = true
this.donate.dropoff = true
}

if (this.donate.itemTypes.length == 0) {
Expand Down
118 changes: 59 additions & 59 deletions geo.go
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
package main

import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)

type Location struct {
Title string `json:"title"`
ID string `json:"id"`
ResultType string `json:"resultType"`
Position struct {
Lat float32
Lng float32
}
}

func Geocode(address string) (*Location, error) {
if len(hereToken) == 0 {
return nil, fmt.Errorf("here token not found")
}

req, err := http.NewRequest("GET", "https://geocode.search.hereapi.com/v1/geocode", nil)
if err != nil {
return nil, err
}

q := req.URL.Query()
q.Add("q", address)
q.Add("apiKey", hereToken)
req.URL.RawQuery = q.Encode()

resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
log.Println(resp.StatusCode)
if resp.StatusCode != 200 {
return nil, fmt.Errorf("non 200 return code %d", resp.StatusCode)
}

out, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}

output := struct {
Items []Location
}{}
err = json.Unmarshal(out, &output)
if err != nil {
return nil, err
}

return &output.Items[0], nil
}
package main

import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)

type Location struct {
Title string `json:"title"`
ID string `json:"id"`
ResultType string `json:"resultType"`
Position struct {
Lat float32
Lng float32
}
}

func Geocode(address string) (*Location, error) {
if len(hereToken) == 0 {
return nil, fmt.Errorf("here token not found")
}

req, err := http.NewRequest("GET", "https://geocode.search.hereapi.com/v1/geocode", nil)
if err != nil {
return nil, err
}

q := req.URL.Query()
q.Add("q", address)
q.Add("apiKey", hereToken)
req.URL.RawQuery = q.Encode()

resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
log.Println(resp.StatusCode)
if resp.StatusCode != 200 {
return nil, fmt.Errorf("Geocode non 200 return code %d", resp.StatusCode)
}

out, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, err
}

output := struct {
Items []Location
}{}
err = json.Unmarshal(out, &output)
if err != nil {
return nil, err
}

return &output.Items[0], nil
}
46 changes: 23 additions & 23 deletions templates/charitySignUpThanks.tmpl
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<!DOCTYPE html>
<html lang="en">
{{ template "header" . }}
<title>ReUseFull</title>
</head>
<body>
{{ template "nav" . }}
<main>
<div class="container">
<div class="row">
<div class="col text-center">
<h5 class="mb-3">Thank you for signing up with Re.Use.Full! You will recieve an email shortly asking you to confirm your email address
and a welcome email from our founder!</h5>
<a href="https://app.reusefull.org/donate">
<img src="https://reusefullimages.s3.us-east-2.amazonaws.com/find-us-on.png" width=100></a>
</div>
</div>
</div>
</main>
<footer></footer>
{{ template "footerScripts" .}}
</body>
</html>
<!DOCTYPE html>
<html lang="en">
{{ template "header" . }}
<title>ReUseFull</title>
</head>
<body>
{{ template "nav" . }}
<main>
<div class="container">
<div class="row">
<div class="col text-center">
<h5 class="mb-3">Thank you for signing up with Re.Use.Full! You will receive an email shortly asking you to confirm your email address
and a welcome email from our founder!</h5>
<a href="https://app.reusefull.org/donate">
<img src="https://reusefullimages.s3.us-east-2.amazonaws.com/find-us-on.png" width=100></a>
</div>
</div>
</div>
</main>
<footer></footer>
{{ template "footerScripts" .}}
</body>
</html>
4 changes: 2 additions & 2 deletions templates/donate.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
<div class="col-md-10">
<div class="form-check form-check-inline">
<input class="form-check-input" v-model="donate.resell" type="checkbox" name="resell">
<label class="form-check-label" for="resell">Organizations that resell items</label>
<label class="form-check-label" for="resell">Include organizations that resell items</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" v-model="donate.faith" type="checkbox" name="faith">
<label class="form-check-label" for="faith">Faith-based organizations</label>
<label class="form-check-label" for="faith">Include faith-based organizations</label>
</div>
</div>
</div>
Expand Down

0 comments on commit fbe756e

Please sign in to comment.