1
0
Fork 0
forked from goffee/cup

develop #1

Merged
diana merged 2 commits from goffee/cup:develop into develop 2024-10-14 17:20:34 -04:00
2 changed files with 13 additions and 6 deletions
Showing only changes of commit 6c536e05b9 - Show all commits

View file

@ -113,6 +113,11 @@ func Themeform(c *core.Context) *core.Response {
optionc.Name = "citys" optionc.Name = "citys"
optionc.Value = "buenosaires" optionc.Value = "buenosaires"
optionc.Label = "Buenos Aires" optionc.Label = "Buenos Aires"
allOptionsc = append(allOptionsc, optionc)
optionc.ID = "sogas"
optionc.Name = "sogas"
optionc.Value = "Sogamoso"
optionc.Label = "Sogamoso"
//optionc.IsChecked = true //optionc.IsChecked = true
allOptionsc = append(allOptionsc, optionc) allOptionsc = append(allOptionsc, optionc)
@ -194,13 +199,16 @@ func Themecontent(c *core.Context) *core.Response {
th.ID = "ba" th.ID = "ba"
th.Value = "Column heading 3" th.Value = "Column heading 3"
allTh = append(allTh, th) allTh = append(allTh, th)
// for td items // for td items
var allTd [][]components.ContentTableTD var allTd [][]components.ContentTableTD
var vals []components.ContentTableTD //var vals []components.ContentTableTD
// rows // rows
for i := 0; i < 5; i++ { for i := 1; i <= 10; i++ {
vals := make([]components.ContentTableTD, len(allTh))
for b := 0; b < len(allTh); b++ { for b := 0; b < len(allTh); b++ {
vals[b].Value = fmt.Sprintf("%s%d%d", "TD data: ", b, i) vals[b].Value = fmt.Sprintf("%s%d%d", "TD data: ", i, b)
vals[b].ID = fmt.Sprintf("%s%d%d", "idtd_", i, b)
} }
allTd = append(allTd, vals) allTd = append(allTd, vals)
} }
@ -208,8 +216,7 @@ func Themecontent(c *core.Context) *core.Response {
// now fill data of the components // now fill data of the components
tmplData := templateData{ tmplData := templateData{
ContentTable: components.ContentTable{ ContentTable: components.ContentTable{
ID: "email", ID: "table_demo",
Label: "Email",
AllTH: allTh, AllTH: allTh,
AllTD: allTd, AllTD: allTd,
}, },

View file

@ -5,7 +5,7 @@
<div class="container"> <div class="container">
<form> <form>
<fieldset> <fieldset>
<legendFform demos</legend> <legend>form demos</legend>
<div class="row"> <div class="row">
{{template "form_input" .FormText}} {{template "form_input" .FormText}}
{{template "form_input" .FormEmail}} {{template "form_input" .FormEmail}}