Skip to content

Instantly share code, notes, and snippets.

@hyg

hyg/caseinfo

Created Jul 20, 2014
Embed
What would you like to do?
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
You can’t perform that action at this time.