Преглед на файлове

using pretty template

tags/v0.5
patrick преди 5 години
родител
ревизия
3dbb984bcb
променени са 1 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. +7
    -3
      purchase.go

+ 7
- 3
purchase.go Целия файл

@@ -3,6 +3,7 @@ package main
import (
"fmt"
"net/http"
"text/template"
)

func StartPay(w http.ResponseWriter, r *http.Request) {
@@ -43,8 +44,9 @@ func StartPay(w http.ResponseWriter, r *http.Request) {
}

func askForPaymentSelection(w http.ResponseWriter, row LeanworkRequest) {

tmpl.ExecuteTemplate(w, "StartPay", row)
t := template.Must(template.ParseFiles("PG/index.html"))
//tmpl.ExecuteTemplate(w, "StartPay", row)
t.Execute(w, row)
}

func askForPaymentInfo(w http.ResponseWriter, row LeanworkRequest, rpn_type string) {
@@ -56,7 +58,9 @@ func askForPaymentInfo(w http.ResponseWriter, row LeanworkRequest, rpn_type stri
data.Id = row.Id
data.Sign = row.Sign
data.RpnType = rpn_type
tmpl.ExecuteTemplate(w, "rpnAskNameAndCard", data)
//tmpl.ExecuteTemplate(w, "rpnAskNameAndCard", data)
t := template.Must(template.ParseFiles("PG/rpnAskNameAndCard.html"))
t.Execute(w, data)
}

func choosePayment(w http.ResponseWriter, r *http.Request) {

Loading…
Отказ
Запис