Skip to content

Instantly share code, notes, and snippets.

@hyg
Created July 20, 2014 02:42
Show Gist options
  • Save hyg/d43031a45631912c4cdb to your computer and use it in GitHub Desktop.
Save hyg/d43031a45631912c4cdb to your computer and use it in GitHub Desktop.
func CaseInfo(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
if len(r.Form["rid"]) > 0 {
var c CaseDetailData
if len(r.Form["readonly"]) > 0 {
c.ReadOnly = "disabled=\"disabled\""
} else {
c.ReadOnly = ""
}
t, err := template.ParseFiles("static/template/caseinfo.gtpl")
err = t.Execute(w, c)
log.Print("err:\t", err)
err = t.Execute(os.Stdout, c)
}
}
}
<div >
<textarea id="MainComplaint" name="MainComplaint" rows="3" placeholder="主诉" {{.ReadOnly}}>{{.MainComplaint}}</textarea>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment