1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-24 11:20:54 +00:00
Commit Graph

58 Commits

Author SHA1 Message Date
Ming Deng
882aa9b967 Deprecated old web module 2020-08-05 21:57:20 +08:00
Ming Deng
30eb889a91 Format code 2020-07-22 23:00:06 +08:00
oberontang
649c5c861d fix bugs of ParseForm about time in RFC3339 format 2019-05-31 15:52:19 +08:00
guanle
fa97488bdc
Update templatefunc.go 2019-04-21 10:27:35 +08:00
astaxie
3406d58797
Merge pull request #3503 from wtospit/develop
fix: when parse post form it didnt parse fields correctly
2019-02-04 11:23:23 +08:00
Iskander (Alex) Sharipov
6ca0978777
replace unchecked Compile calls with MustCompile
For constant patterns and especially when errors are ignored,
`regexp.MustCompile` is a better choice than `regexp.Compile`.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-01-26 14:13:53 +03:00
Witaya Tospitakkul
3bd7614ade refactoring code after discussion 2019-01-25 11:00:24 +07:00
Witaya Tospitakkul
12fdc04f1b fix: when parse post form it didnt parse fields which have same name but the first index is empty but another is not 2019-01-25 00:15:40 +07:00
JessonChan
0d54bbff02 make staticcheck happy 2019-01-22 19:09:57 +08:00
Ruben Cid
5c407ff2e3 Add map shortcut and ServeFormatted method in output 2018-08-20 22:55:50 +02:00
Openset
ad6c97ec1b Update: Htmlquote Htmlunquote 2018-06-13 15:43:01 +08:00
Guohua Ouyang
47e351e11d Support timeformat "2006-01-02T15:04:05"
Fixes #2649

Signed-off-by: Guohua Ouyang <guohuaouyang@gmail.com>
2017-05-19 09:22:27 +08:00
astaxie
69f0b94745 fix gosimple 2017-05-16 22:21:43 +08:00
astaxie
ea3d0690cf golint 2017-04-29 09:13:28 +08:00
astaxie
54b05377d9 Merge pull request #2466 from gouyang/gouyang/develop
Parse form time by its length
2017-03-29 10:01:03 +08:00
Guohua Ouyang
83d4385f1f Support time.RFC3339
Signed-off-by: Guohua Ouyang <guohuaouyang@gmail.com>
2017-03-25 07:52:43 +08:00
Sergey Lanzman
856fde28dc add unconverted support 2017-03-17 19:45:30 +02:00
Guohua Ouyang
49fffe3ebe Parse form time by its length
Fix #2451

Signed-off-by: Guohua Ouyang <guohuaouyang@gmail.com>
2017-02-27 14:43:16 +08:00
Zaaksam
7c2e563879 beego.ParseForm() improvement 2016-09-01 15:04:57 +08:00
Joshua Santos
e0393b721c Change meta to required, and refactor a bit to cover edge cases 2016-06-30 10:32:53 -07:00
Joshua Santos
84b6bef7d0 Required field useful for not only input 2016-06-28 16:39:09 -07:00
Joshua Santos
f9f92b4f61 Merge meta tag into parseFormField 2016-06-28 15:19:58 -07:00
Joshua Santos
0d3a806c23 Add meta fields with required flag 2016-06-15 17:17:50 -07:00
astaxie
f925bb9058 golint all the files 2016-01-18 00:18:21 +08:00
astaxie
90d1349665 fix typo 2016-01-17 23:48:17 +08:00
astaxie
4823a0f114 remove the dead code 2015-09-17 23:47:26 +08:00
astaxie
bcb1db256d golint templatefunc 2015-09-08 23:41:41 +08:00
astaxie
c11740b647 make golint happy router.go 2015-09-08 22:01:13 +08:00
astaxie
61570ac2f7 make golint happy with controller.go 2015-09-08 10:43:42 +08:00
astaxie
9038cdfaae Merge pull request #1343 from onealtang/oneal-dev
always use server's locale to parse date
2015-09-04 21:32:18 +08:00
onealtang
adca455804 always use server's locale to parse date
When parsing the date without time, it's always using UTC date, which is
unexpected. If we want to use UTC date, it's recommend to set the
server's timezone as UTC, and keep the code flexible.
2015-09-02 15:50:40 +08:00
Hepri
d91840779a Update templatefunc.go 2015-08-17 01:18:29 +05:00
Sergey Shcherbina
d4e15c0bd0 Added MapGet template func 2015-08-17 00:08:02 +05:00
Sergey Shcherbina
0c31c2d689 Added support to parse slices of ints and strings in ParseForm func 2015-02-22 22:13:06 +05:00
astaxie
2a0f87e810 Merge pull request #1010 from BlackLee/master
add compare_not/not_nil methods for template
2015-02-14 20:31:18 +08:00
Black.Lee
18659e16ba add compare_not/not_nil methods for template 2015-01-05 16:38:57 +08:00
Jianbo Feng
e34f8479bb Add all type support for UrlFor’s params 2014-12-17 15:52:48 +08:00
astaxie
7743eecfd4 support #761
type Test struct {
    Date    time.Time    `form:"Date, 2006-01-02"`
    Save    bool            `form:"Save"`
}
2014-11-04 16:19:46 +08:00
astaxie
710f5b6234 fix the test fun for pull request 873 2014-10-20 22:23:29 +08:00
WithGJR
6c9ff81fc1 fix: if user didn't set id or class, then it won't be displayed in HTML code 2014-10-20 18:59:46 +08:00
WithGJR
1b3e7de463 add new feature to 'renderform' function, user could add HTML id and class now 2014-10-20 17:49:16 +08:00
astaxie
a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
astaxie
ea6982fcea beego: template fund when the start> len(bt) 2014-08-05 23:52:06 +08:00
astaxie
fefd8ddb5b beego: update licence& fix #669 2014-07-03 23:40:21 +08:00
Vangelis Tsoumenis
34572193c6 Adds html5 input types to valid intput types of RenderForm. 2014-06-30 10:38:32 +02:00
Vangelis Tsoumenis
4994d36b66 templateform.RenderForm now renders textarea
When RenderForm encounters a field with the structTag `form` value
type `textarea` it renders an actual <textarea> html tag.
2014-06-29 20:49:56 +02:00
Vangelis Tsoumenis
a991b9dcde Removes unused FormType map from templatefunc 2014-06-29 20:49:35 +02:00
Vangelis Tsoumenis
3fe9e6a28a extract func parseFormTag from templatefunc.RenderForm
Extracted a func `parseFormTag` that takes a reflect.StructField
and returns the different positional parts of the `form` structTag
with default values as documented in
http://beego.me/docs/mvc/view/view.md#renderform

This makes RenderForm shorter and makes it possible to test the
parsing separately.
2014-06-29 20:49:08 +02:00
astaxie
0f170a80da update the comments fix #658 2014-06-25 10:39:37 +08:00
astaxie
bdc01f52a0 Merge pull request #626 from mvpmvh/michael
Michael
2014-05-31 14:25:40 +08:00