gobuffalo/buffalo

Cannot disable Bootstrap classes in forms

Closed this issue · 1 comments

Description

Version: 0.17.3
Cannot disable Bootstrap classes in forms, even after uncommenting these lines:

image
image

Apologies in advance if PEBCAK.

Steps to Reproduce the Problem

  1. Render a form using form helpers
  2. Examine output, notice classes like "form-control" and "form-group" (Bootstrap classes)
  3. Uncomment lines in render.go
  4. Restart app via CTRL-C and buffalo dev

I also tried using plush module directly as shown in https://gobuffalo.io/en/docs/forms#using-non-bootstrap-form-helpers, same result.

Expected Behavior

Bootstrap classes e.g. "form-control" and "form-group" do not appear.

Actual Behavior

Bootstrap classes e.g. "form-control" and "form-group" still APPEARS despite hard refresh.

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

-> Go: Checking installation
✓ The `go` executable was found on your system at: /usr/local/bin/go

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.17.1, meets the minimum requirements.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✓ Your PATH contains /Users/ernsheong/go/bin.

-> Node: Checking installation
✓ The `node` executable was found on your system at: /Users/ernsheong/.nvm/versions/node/v14.16.0/bin/node

-> Node: Checking minimum version requirements
✓ Your version of Node, v14.16.0, meets the minimum requirements.

-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /Users/ernsheong/.nvm/versions/node/v14.16.0/bin/npm

-> NPM: Checking minimum version requirements
✓ Your version of NPM, 6.14.11, meets the minimum requirements.

-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /usr/local/bin/yarnpkg

-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.22.4, meets the minimum requirements.

-> PostgreSQL: Checking installation
✓ The `postgres` executable was found on your system at: /usr/local/bin/postgres

-> PostgreSQL: Checking minimum version requirements
✓ Your version of PostgreSQL, 11.12.0, meets the minimum requirements.

-> MySQL: Checking installation
✓ The `mysql` executable was found on your system at: /usr/local/bin/mysql

-> MySQL: Checking minimum version requirements
✘ signal: abort trap

-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3

-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.32.3, meets the minimum requirements.

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /usr/local/bin/buffalo

-> Buffalo (CLI): Checking minimum version requirements
✓ Your version of Buffalo (CLI), v0.17.5, meets the minimum requirements.

-> Buffalo: Application Details
Pwd         /Users/ernsheong/belian-tech/findtutor
Root        /Users/ernsheong/belian-tech/findtutor
GoPath      /Users/ernsheong/go
PackagePkg  findtutor
ActionsPkg  findtutor/actions
ModelsPkg   findtutor/models
GriftsPkg   findtutor/grifts
WithModules true
Name        findtutor
Bin         bin/findtutor
VCS         git
WithPop     true
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    false
WithDocker  true
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[build:webpack --mode production --progress dev:webpack --watch]}

-> Buffalo: config/buffalo-app.toml
name = "findtutor"
bin = "bin/findtutor"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = false
with_docker = true
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-auth"
  go_get = "github.com/gobuffalo/buffalo-auth"

[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop/v2"

-> Buffalo: go.mod
module findtutor

go 1.17

require (
        github.com/gobuffalo/buffalo v0.17.3
        github.com/gobuffalo/buffalo-pop/v2 v2.3.0
        github.com/gobuffalo/envy v1.9.0
        github.com/gobuffalo/helpers v0.6.2
        github.com/gobuffalo/mw-csrf v1.0.0
        github.com/gobuffalo/mw-forcessl v0.0.0-20200131175327-94b2bd771862
        github.com/gobuffalo/mw-i18n v1.1.0
        github.com/gobuffalo/mw-paramlogger v1.0.0
        github.com/gobuffalo/packr/v2 v2.8.1
        github.com/gobuffalo/pop/v5 v5.3.4
        github.com/gobuffalo/suite v2.8.2+incompatible
        github.com/gobuffalo/validate/v3 v3.1.0
        github.com/gofrs/uuid v3.2.0+incompatible
        github.com/markbates/grift v1.5.0
        github.com/pkg/errors v0.9.1
        github.com/unrolled/secure v1.0.9
        golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
)

require (
        github.com/BurntSushi/toml v0.4.1 // indirect
        github.com/Masterminds/semver/v3 v3.1.1 // indirect
        github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051 // indirect
        github.com/davecgh/go-spew v1.1.1 // indirect
        github.com/dustin/go-humanize v1.0.0 // indirect
        github.com/fatih/color v1.12.0 // indirect
        github.com/fatih/structs v1.1.0 // indirect
        github.com/felixge/httpsnoop v1.0.1 // indirect
        github.com/fsnotify/fsnotify v1.4.9 // indirect
        github.com/go-sql-driver/mysql v1.5.0 // indirect
        github.com/gobuffalo/events v1.4.1 // indirect
        github.com/gobuffalo/fizz v1.10.0 // indirect
        github.com/gobuffalo/flect v0.2.3 // indirect
        github.com/gobuffalo/genny v0.6.0 // indirect
        github.com/gobuffalo/github_flavored_markdown v1.1.0 // indirect
        github.com/gobuffalo/httptest v1.5.0 // indirect
        github.com/gobuffalo/logger v1.0.4 // indirect
        github.com/gobuffalo/meta v0.3.0 // indirect
        github.com/gobuffalo/nulls v0.4.0 // indirect
        github.com/gobuffalo/packd v1.0.0 // indirect
        github.com/gobuffalo/plush v3.8.3+incompatible // indirect
        github.com/gobuffalo/plush/v4 v4.1.6 // indirect
        github.com/gobuffalo/pop v4.13.1+incompatible // indirect
        github.com/gobuffalo/tags/v3 v3.1.0 // indirect
        github.com/gobuffalo/validate v2.0.4+incompatible // indirect
        github.com/gorilla/handlers v1.5.1 // indirect
        github.com/gorilla/mux v1.8.0 // indirect
        github.com/gorilla/securecookie v1.1.1 // indirect
        github.com/gorilla/sessions v1.2.1 // indirect
        github.com/inconshreveable/mousetrap v1.0.0 // indirect
        github.com/jackc/chunkreader/v2 v2.0.1 // indirect
        github.com/jackc/pgconn v1.8.1 // indirect
        github.com/jackc/pgio v1.0.0 // indirect
        github.com/jackc/pgpassfile v1.0.0 // indirect
        github.com/jackc/pgproto3/v2 v2.0.6 // indirect
        github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
        github.com/jackc/pgtype v1.7.0 // indirect
        github.com/jackc/pgx/v4 v4.11.0 // indirect
        github.com/jmoiron/sqlx v1.3.3 // indirect
        github.com/joho/godotenv v1.3.0 // indirect
        github.com/karrick/godirwalk v1.16.1 // indirect
        github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
        github.com/lib/pq v1.10.1 // indirect
        github.com/luna-duclos/instrumentedsql v1.1.3 // indirect
        github.com/markbates/errx v1.1.0 // indirect
        github.com/markbates/oncer v1.0.0 // indirect
        github.com/markbates/refresh v1.11.1 // indirect
        github.com/markbates/safe v1.0.1 // indirect
        github.com/markbates/sigtx v1.0.0 // indirect
        github.com/mattn/go-colorable v0.1.8 // indirect
        github.com/mattn/go-isatty v0.0.12 // indirect
        github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
        github.com/microcosm-cc/bluemonday v1.0.2 // indirect
        github.com/mitchellh/go-homedir v1.1.0 // indirect
        github.com/monoculum/formam v0.0.0-20210523135142-1af3317b7b9b // indirect
        github.com/pelletier/go-toml v1.9.3 // indirect
        github.com/pmezard/go-difflib v1.0.0 // indirect
        github.com/rogpeppe/go-internal v1.5.2 // indirect
        github.com/sergi/go-diff v1.1.0 // indirect
        github.com/sirupsen/logrus v1.8.1 // indirect
        github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect
        github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect
        github.com/spf13/cobra v1.2.1 // indirect
        github.com/spf13/pflag v1.0.5 // indirect
        github.com/stretchr/testify v1.7.0 // indirect
        golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
        golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
        golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
        golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf // indirect
        golang.org/x/text v0.3.5 // indirect
        gopkg.in/yaml.v2 v2.4.0 // indirect
        gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

Okay, the problem is that buffalo g auth is generating deprecated code, i.e. "form_for" that isn't covered in the above mapping. buffalo g auth is also generating code that uses the old untagged dependencies, but that is probably another issue.

The fix for the above is to replace form_for (deprecated) with formFor.