Browse Source

editing anonymouse user and New user, will change state to assigned.

master
Patrick Peng Sun 8 years ago
parent
commit
babfb6e1e8
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      spaEdit.go

+ 8
- 1
spaEdit.go View File

fmt.Println("key:", k) fmt.Println("key:", k)
fmt.Println("val:", strings.Join(v, "")) fmt.Println("val:", strings.Join(v, ""))
} }

lastname, lok := r.Form["lastname"] lastname, lok := r.Form["lastname"]
email, eok := r.Form["email"] email, eok := r.Form["email"]
phone, pok := r.Form["phone"] phone, pok := r.Form["phone"]
lead.EmailAddress = email[0] lead.EmailAddress = email[0]
lead.PhoneNumber = phone[0] lead.PhoneNumber = phone[0]
lead.Description = description[0] lead.Description = description[0]
if original.FirstName == "Anonymous" {
lead.FirstName = "\u0020" //a visible space
}
log.Println(original.Status)
if original.Status == "New" || original.Status == "Anonymous" {
log.Println("change status to Assigned")
lead.Status = "Assigned"
}


//check to see if there is file //check to see if there is file
file, handler, err := r.FormFile("avatar") file, handler, err := r.FormFile("avatar")

Loading…
Cancel
Save