forked from x/ContextOS
mac add web.login
This commit is contained in:
parent
ec0b608aa4
commit
885b787b3d
@ -2311,7 +2311,7 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
|
|||||||
"right": &Command{
|
"right": &Command{
|
||||||
Name: "right [share|add|del group [cache|config|command item]]",
|
Name: "right [share|add|del group [cache|config|command item]]",
|
||||||
Help: "用户组管理,查看、添加、删除用户组或是接口",
|
Help: "用户组管理,查看、添加、删除用户组或是接口",
|
||||||
Formats: map[string]int{"add": 0, "del": 0, "cache": 0, "config": 0, "command": 0},
|
Formats: map[string]int{"check": 0, "add": 0, "del": 0, "cache": 0, "config": 0, "command": 0},
|
||||||
Hand: func(m *Message, c *Context, key string, arg ...string) {
|
Hand: func(m *Message, c *Context, key string, arg ...string) {
|
||||||
index := m.Target().Index // {{{
|
index := m.Target().Index // {{{
|
||||||
if index == nil {
|
if index == nil {
|
||||||
@ -2356,6 +2356,33 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
case m.Has("check"):
|
||||||
|
if group != nil {
|
||||||
|
switch {
|
||||||
|
case m.Has("cache"):
|
||||||
|
if _, ok := group.Caches[item]; ok {
|
||||||
|
m.Echo("ok")
|
||||||
|
}
|
||||||
|
case m.Has("config"):
|
||||||
|
if _, ok := group.Configs[item]; ok {
|
||||||
|
m.Echo("ok")
|
||||||
|
}
|
||||||
|
case m.Has("command"):
|
||||||
|
if x, ok := group.Commands[item]; ok {
|
||||||
|
if len(arg) > 2 {
|
||||||
|
if len(x.Options) > 0 {
|
||||||
|
for i := 2; i < len(arg)-1; i += 2 {
|
||||||
|
if x, ok := x.Options[arg[i]]; !ok || x != arg[i+1] {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.Echo("ok")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
case m.Has("add"):
|
case m.Has("add"):
|
||||||
if group == nil {
|
if group == nil {
|
||||||
if _, ok := index[arg[0]]; ok {
|
if _, ok := index[arg[0]]; ok {
|
||||||
@ -2380,11 +2407,18 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
|
|||||||
group.Configs[item] = x
|
group.Configs[item] = x
|
||||||
}
|
}
|
||||||
case m.Has("command"):
|
case m.Has("command"):
|
||||||
if x, ok := current.Commands[item]; ok {
|
if _, ok := current.Commands[item]; ok {
|
||||||
if group.Commands == nil {
|
if group.Commands == nil {
|
||||||
group.Commands = map[string]*Command{}
|
group.Commands = map[string]*Command{}
|
||||||
}
|
}
|
||||||
group.Commands[item] = x
|
// group.Commands[item] = x
|
||||||
|
options := map[string]string{}
|
||||||
|
for i := 2; i < len(arg)-1; i += 2 {
|
||||||
|
options[arg[i]] = arg[i+1]
|
||||||
|
}
|
||||||
|
group.Commands[item] = &Command{
|
||||||
|
Options: options,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,8 +370,9 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
"query": &ctx.Config{Name: "query", Value: "", Help: "主机参数"},
|
"query": &ctx.Config{Name: "query", Value: "", Help: "主机参数"},
|
||||||
"output": &ctx.Config{Name: "output", Value: "stdout", Help: "响应输出"},
|
"output": &ctx.Config{Name: "output", Value: "stdout", Help: "响应输出"},
|
||||||
"editor": &ctx.Config{Name: "editor", Value: "vim", Help: "响应编辑器"},
|
"editor": &ctx.Config{Name: "editor", Value: "vim", Help: "响应编辑器"},
|
||||||
"upload_tpl": &ctx.Config{Name: "upload_tpl", Value: "usr/template/upload.html", Help: "上传文件路径"},
|
"upload_tpl": &ctx.Config{Name: "upload_tpl", Value: "upload.html", Help: "上传文件路径"},
|
||||||
"travel_tpl": &ctx.Config{Name: "travel_tpl", Value: "usr/template/travel.html", Help: "上传文件路径"},
|
"travel_tpl": &ctx.Config{Name: "travel_tpl", Value: "travel.html", Help: "上传文件路径"},
|
||||||
|
"template_dir": &ctx.Config{Name: "template_dir", Value: "usr/template/", Help: "上传文件路径"},
|
||||||
},
|
},
|
||||||
Commands: map[string]*ctx.Command{
|
Commands: map[string]*ctx.Command{
|
||||||
"serve": &ctx.Command{Name: "serve [directory [address [protocol]]]", Help: "开启应用服务", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
"serve": &ctx.Command{Name: "serve [directory [address [protocol]]]", Help: "开启应用服务", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
@ -606,8 +607,38 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
}
|
}
|
||||||
dir := m.Option("file")
|
dir := m.Option("file")
|
||||||
|
|
||||||
|
if !m.Options("username") {
|
||||||
|
m.Option("username", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
m.Option("right", "")
|
||||||
|
if !m.Options("sessid") {
|
||||||
|
m.Option("sessid", "")
|
||||||
|
m.Option("message", "please login")
|
||||||
|
} else {
|
||||||
|
msg := m.Find("aaa").Cmd("login", m.Option("sessid"))
|
||||||
|
if msg.Result(0) == "error: " {
|
||||||
|
m.Option("sessid", "")
|
||||||
|
m.Option("message", "login failure")
|
||||||
|
} else {
|
||||||
|
m.Option("username", msg.Result(0))
|
||||||
|
msg = m.Spawn(m.Target())
|
||||||
|
msg.Cmd("right", "check", msg.Cap("group"), "command", "/upload", "file", dir)
|
||||||
|
if msg.Result(0) == "ok" {
|
||||||
|
m.Option("right", "ok")
|
||||||
|
} else {
|
||||||
|
m.Option("message", "your do not have the right of", dir)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if m.Option("method") == "POST" {
|
if m.Option("method") == "POST" {
|
||||||
if m.Options("content") {
|
if m.Options("shareto") {
|
||||||
|
msg := m.Spawn(m.Target())
|
||||||
|
msg.Cmd("right", "add", m.Option("shareto"), "command", "/upload", "file", m.Option("sharefile"))
|
||||||
|
m.Append("link", "hello")
|
||||||
|
return
|
||||||
|
} else if m.Options("content") {
|
||||||
name := path.Join(dir, m.Option("filename"))
|
name := path.Join(dir, m.Option("filename"))
|
||||||
if _, e := os.Stat(name); e != nil {
|
if _, e := os.Stat(name); e != nil {
|
||||||
f, e := os.Create(name)
|
f, e := os.Create(name)
|
||||||
@ -639,14 +670,6 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch m.Option("cmd") {
|
|
||||||
case "git":
|
|
||||||
branch := m.Find("nfs").Cmd("git", "-C", dir, "branch")
|
|
||||||
m.Option("branch", branch.Result(0))
|
|
||||||
status := m.Find("nfs").Cmd("git", "-C", dir, "status")
|
|
||||||
m.Option("status", status.Result(0))
|
|
||||||
}
|
|
||||||
|
|
||||||
file := m.Option("file")
|
file := m.Option("file")
|
||||||
s, e := os.Stat(file)
|
s, e := os.Stat(file)
|
||||||
if m.Assert(e); !s.IsDir() {
|
if m.Assert(e); !s.IsDir() {
|
||||||
@ -707,7 +730,54 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Add("Content-Type", "text/html")
|
w.Header().Add("Content-Type", "text/html")
|
||||||
m.Assert(template.Must(template.ParseGlob(m.Conf("upload_tpl"))).Execute(w, m.Meta))
|
tmpl := template.Must(template.Must(template.ParseGlob(m.Conf("template_dir") + "/common/*.html")).ParseGlob(m.Conf("template_dir") + "upload.html"))
|
||||||
|
m.Assert(tmpl)
|
||||||
|
|
||||||
|
tmpl.ExecuteTemplate(w, "head", m.Meta)
|
||||||
|
if m.Options("right") {
|
||||||
|
tmpl.ExecuteTemplate(w, "userinfo", m.Meta)
|
||||||
|
|
||||||
|
msg := m.Spawn(m.Target())
|
||||||
|
|
||||||
|
for k, v := range msg.Target().Index {
|
||||||
|
for i, j := range v.Commands {
|
||||||
|
for v, n := range j.Options {
|
||||||
|
if n == dir {
|
||||||
|
msg.Add("append", "group", k)
|
||||||
|
msg.Add("append", "command", i)
|
||||||
|
msg.Add("append", "argument", v)
|
||||||
|
msg.Add("append", "value", n)
|
||||||
|
m.Log("fuck", nil, "why %v", msg.Meta)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpl.ExecuteTemplate(w, "share", msg.Meta)
|
||||||
|
|
||||||
|
tmpl.ExecuteTemplate(w, "upload", m.Meta)
|
||||||
|
} else {
|
||||||
|
tmpl.ExecuteTemplate(w, "login", m.Meta)
|
||||||
|
}
|
||||||
|
|
||||||
|
switch m.Option("cmd") {
|
||||||
|
case "git":
|
||||||
|
branch := m.Find("nfs").Cmd("git", "-C", dir, "branch")
|
||||||
|
m.Option("branch", branch.Result(0))
|
||||||
|
status := m.Find("nfs").Cmd("git", "-C", dir, "status")
|
||||||
|
m.Option("status", status.Result(0))
|
||||||
|
tmpl.ExecuteTemplate(w, "git", m.Meta)
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Options("message") {
|
||||||
|
tmpl.ExecuteTemplate(w, "message", m.Meta)
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpl.ExecuteTemplate(w, "list", m.Meta)
|
||||||
|
if m.Options("right") {
|
||||||
|
tmpl.ExecuteTemplate(w, "create", m.Meta)
|
||||||
|
}
|
||||||
|
tmpl.ExecuteTemplate(w, "tail", m.Meta)
|
||||||
delete(m.Meta, "result")
|
delete(m.Meta, "result")
|
||||||
delete(m.Meta, "append")
|
delete(m.Meta, "append")
|
||||||
// }}}
|
// }}}
|
||||||
@ -770,7 +840,10 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Add("Content-Type", "text/html")
|
w.Header().Add("Content-Type", "text/html")
|
||||||
m.Assert(template.Must(template.ParseGlob(m.Conf("travel_tpl"))).ExecuteTemplate(w, "head", m.Meta))
|
tmpl := template.Must(template.Must(template.ParseGlob(m.Conf("template_dir") + "/common/*.html")).ParseGlob(m.Conf("template_dir") + "travel.html"))
|
||||||
|
m.Assert(tmpl)
|
||||||
|
|
||||||
|
m.Assert(tmpl.ExecuteTemplate(w, "head", m.Meta))
|
||||||
|
|
||||||
if msg := m.Find(module, true); msg != nil {
|
if msg := m.Find(module, true); msg != nil {
|
||||||
for _, v := range []string{"cache", "config", "command", "module", "domain"} {
|
for _, v := range []string{"cache", "config", "command", "module", "domain"} {
|
||||||
@ -789,17 +862,21 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
if len(msg.Meta["append"]) > 0 {
|
if len(msg.Meta["append"]) > 0 {
|
||||||
msg.Option("current_module", module)
|
msg.Option("current_module", module)
|
||||||
msg.Option("current_domain", m.Option("domain"))
|
msg.Option("current_domain", m.Option("domain"))
|
||||||
m.Log("fuck", nil, "fuck %v", msg.Meta)
|
m.Assert(tmpl.ExecuteTemplate(w, v, msg.Meta))
|
||||||
m.Assert(template.Must(template.ParseGlob(m.Conf("travel_tpl"))).ExecuteTemplate(w, v, msg.Meta))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m.Assert(template.Must(template.ParseGlob(m.Conf("travel_tpl"))).ExecuteTemplate(w, "tail", m.Meta))
|
m.Assert(tmpl.ExecuteTemplate(w, "tail", m.Meta))
|
||||||
delete(m.Meta, "result")
|
delete(m.Meta, "result")
|
||||||
delete(m.Meta, "append")
|
delete(m.Meta, "append")
|
||||||
// }}}
|
// }}}
|
||||||
}},
|
}},
|
||||||
|
"/login": &ctx.Command{Name: "/login", Help: "文件上传", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
|
w := m.Data["response"].(http.ResponseWriter)
|
||||||
|
msg := m.Find("aaa").Cmd("login", m.Option("username"), m.Option("password"))
|
||||||
|
http.SetCookie(w, &http.Cookie{Name: "sessid", Value: msg.Result(0)})
|
||||||
|
}},
|
||||||
"temp": &ctx.Command{Name: "temp", Help: "应用示例", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
"temp": &ctx.Command{Name: "temp", Help: "应用示例", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
msg := m.Spawn(m.Target())
|
msg := m.Spawn(m.Target())
|
||||||
question := []string{}
|
question := []string{}
|
||||||
|
@ -30,7 +30,7 @@ ctx = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (value == undefined) {
|
} else if (value == undefined) {
|
||||||
return args[key];
|
return args[key] || "";
|
||||||
} else {
|
} else {
|
||||||
args[key] = value;
|
args[key] = value;
|
||||||
}
|
}
|
||||||
@ -77,6 +77,9 @@ ctx = {
|
|||||||
console.log("POST: "+url+"?"+arg);
|
console.log("POST: "+url+"?"+arg);
|
||||||
xhr.send(arg);
|
xhr.send(arg);
|
||||||
},//}}}
|
},//}}}
|
||||||
|
Refresh: function() {//{{{
|
||||||
|
location.assign(location.href);
|
||||||
|
},//}}}
|
||||||
|
|
||||||
Cap: function(cap, cb) {//{{{
|
Cap: function(cap, cb) {//{{{
|
||||||
if (typeof cap == "function") {
|
if (typeof cap == "function") {
|
||||||
|
85
usr/template/common/login.html
Normal file
85
usr/template/common/login.html
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{{define "login"}}
|
||||||
|
<fieldset><legend>login</legend>
|
||||||
|
<form method="POST" action="/login" onsubmit="return login(event)">
|
||||||
|
<label>username:</label><input type="text" name="username" value="{{index .username 0}}" required autofocus>
|
||||||
|
<label>password:</label><input type="password" name="password" required>
|
||||||
|
<input type="submit">
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
<script>
|
||||||
|
function login(event) {
|
||||||
|
var fields = event.target.elements;
|
||||||
|
ctx.POST("/login", {
|
||||||
|
username: fields["username"].value,
|
||||||
|
password: fields["password"].value
|
||||||
|
}, function(msg) {
|
||||||
|
if (ctx.Cookie("sessid")) {
|
||||||
|
ctx.Refresh()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "userinfo"}}
|
||||||
|
<fieldset><legend>userinfo</legend>
|
||||||
|
welcome {{index .username 0}}
|
||||||
|
<button onclick="return logout(event)">logout</button>
|
||||||
|
</fieldset>
|
||||||
|
<script>
|
||||||
|
function logout(event) {
|
||||||
|
ctx.Cookie("sessid", "");
|
||||||
|
ctx.Refresh();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "share"}}
|
||||||
|
<fieldset><legend>share</legend>
|
||||||
|
<form method="POST" onsubmit="return share(event)">
|
||||||
|
<label>share to:</label><input type="text" name="shareto" required>
|
||||||
|
<input type="submit">
|
||||||
|
</form>
|
||||||
|
<table>
|
||||||
|
<colgroup>
|
||||||
|
{{range .append}}
|
||||||
|
<col class="{{.}}">
|
||||||
|
{{end}}
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
{{range .append}}
|
||||||
|
<th class="{{.}}">{{.}}</th>
|
||||||
|
{{end}}
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{{$meta := .}}
|
||||||
|
{{if .append}}
|
||||||
|
{{$first := index .append 0}}
|
||||||
|
{{range $i, $k := index . $first}}
|
||||||
|
<tr>
|
||||||
|
{{range $key := index $meta "append"}}
|
||||||
|
<td class="{{$key}}">
|
||||||
|
<code>{{index $meta $key $i}}</code>
|
||||||
|
</td>
|
||||||
|
{{end}}
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
<script>
|
||||||
|
function share(event) {
|
||||||
|
var fields = event.target.elements;
|
||||||
|
var shareto = fields["shareto"].value
|
||||||
|
ctx.POST("/upload", {
|
||||||
|
shareto: shareto,
|
||||||
|
sharefile: file,
|
||||||
|
}, function(msg) {
|
||||||
|
ctx.Refresh();
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{end}}
|
@ -1,3 +1,4 @@
|
|||||||
|
{{define "head"}}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@ -35,42 +36,41 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{if index . "cmd"}}
|
{{define "git"}}
|
||||||
{{$cmd := index . "cmd" 0}}
|
<fieldset><legend>branch</legend>
|
||||||
{{if eq $cmd "git"}}
|
|
||||||
<fieldset><legend>branch</legend>
|
|
||||||
<pre>{{index . "branch"}}</pre>
|
<pre>{{index . "branch"}}</pre>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<fieldset><legend>status</legend>
|
||||||
<fieldset><legend>status</legend>
|
|
||||||
<pre>{{index . "status"}}</pre>
|
<pre>{{index . "status"}}</pre>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<fieldset><legend>upload</legend>
|
{{define "upload"}}
|
||||||
|
<fieldset><legend>upload</legend>
|
||||||
<form method="POST" action="/upload" enctype="multipart/form-data">
|
<form method="POST" action="/upload" enctype="multipart/form-data">
|
||||||
<input type="file" name="file"><input type="submit">
|
<input type="file" name="file"><input type="submit">
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{if index . "message" 0}}
|
{{define "message"}}
|
||||||
<fieldset class="message"><legend>message</legend>
|
<fieldset class="message"><legend>message</legend>
|
||||||
<pre>{{index . "message"}}</pre>
|
<pre>{{index . "message"}}</pre>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<fieldset><legend><input type="text" id="dir" value="{{index .file 0}}" onkeydown="return Change(event)"></legend>
|
{{define "list"}}
|
||||||
<table>
|
<fieldset><legend><input type="text" id="dir" value="{{index .file 0}}" onkeydown="return Change(event)"></legend>
|
||||||
<colgroup>
|
<table>
|
||||||
|
<colgroup>
|
||||||
{{range .append}}
|
{{range .append}}
|
||||||
<col class="{{.}}">
|
<col class="{{.}}">
|
||||||
{{end}}
|
{{end}}
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
{{$sort := index . "sort" 0}}
|
{{$sort := index . "sort" 0}}
|
||||||
{{$reverse := index . "reverse" 0}}
|
{{$reverse := index . "reverse" 0}}
|
||||||
{{range .append}}
|
{{range .append}}
|
||||||
@ -83,13 +83,16 @@
|
|||||||
<th class="{{.}}" onclick="list('{{.}}')">{{.}}</th>
|
<th class="{{.}}" onclick="list('{{.}}')">{{.}}</th>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</tr>
|
</tr>
|
||||||
|
<script>
|
||||||
|
var file = '{{index .file 0}}';
|
||||||
|
</script>
|
||||||
|
|
||||||
{{$meta := .}}
|
{{$meta := .}}
|
||||||
{{if .append}}
|
{{if .append}}
|
||||||
{{$first := index .append 0}}
|
{{$first := index .append 0}}
|
||||||
{{range $i, $k := index . $first}}
|
{{range $i, $k := index . $first}}
|
||||||
<tr>
|
<tr>
|
||||||
{{range $key := index $meta "append"}}
|
{{range $key := index $meta "append"}}
|
||||||
{{if eq $key "name"}}
|
{{if eq $key "name"}}
|
||||||
<td class="{{$key}}">
|
<td class="{{$key}}">
|
||||||
@ -102,12 +105,14 @@
|
|||||||
</td>
|
</td>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</tr>
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
|
{{define "create"}}
|
||||||
<fieldset><legend>create</legend>
|
<fieldset><legend>create</legend>
|
||||||
<form method="POST" action="/upload">
|
<form method="POST" action="/upload">
|
||||||
<table>
|
<table>
|
||||||
@ -116,7 +121,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{define "tail"}}
|
||||||
<script src="library/context.js"></script>
|
<script src="library/context.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function Change(event) {
|
function Change(event) {
|
||||||
@ -132,3 +139,4 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
{{end}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user