Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Bootstrap 4 #577

Merged
merged 8 commits into from
Oct 24, 2018
Merged

Adding support for Bootstrap 4 #577

merged 8 commits into from
Oct 24, 2018

Conversation

bdewong
Copy link
Contributor

@bdewong bdewong commented Oct 23, 2018

This adds pretty basic support for Bootstrap 4. Needed minor changes to the checkable trait to be able to support the way that Boostrap 4 renders the radio and checkbox fields.

Example Radio call:

	{!! Former::radios('type')
		->radios([
			'Option 1' => [
				'name' => 'type',
				'value' => 'o1',
				'class' => 'form-check-input'
			],
			'Option 2' => [
				'name' => 'type',
				'value' => 'o2',
				'class' => 'form-check-input'
			]
		])->inline();
	!!}

Adding in support for Bootstrap 4
Adding support for Bootstrap 4 and using inline checkboxes
@bdewong bdewong mentioned this pull request Oct 23, 2018
@claar
Copy link
Member

claar commented Oct 24, 2018

Wow! Thanks so much @bdewong!

This looks fantastic. Would you be willing to copy TwitterBootstrap3Test.php to TwitterBootstrap4Test.php and update the tests to pass?

Copy link
Member

@claar claar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file will need renamed from TwitterBootstrap4.php to TwitterBootstrap4Test.php and the tests will need updated to pass.

@bdewong
Copy link
Contributor Author

bdewong commented Oct 24, 2018

Sorry, I created them online to get started. I've gone ahead and updated them and they are now passing.

@claar claar merged commit eae1b4f into formers:master Oct 24, 2018
ricardosierra added a commit to SierraTecnologia/former that referenced this pull request Jun 16, 2020
* 'master' of github.com:formers/former: (47 commits)
  Support Laravel 7
  Fix errors when using rules in validation array
  Add tests
  Fix errors when using rules in validation array
  Laravel 6 support (formers#591)
  Adds correct checkbox input class when is a checkbox (or radio) (formers#590)
  Encode checkbox value to prevent XSS attack (formers#584)
  Fix the Bootstrap 4 help blocks
  Fix tabs vs spaces :)
  Fix Bootstrap 4 validation messages not being colored red
  Fix the error state for Bootstrap 4
  Fix TwitterBootstrap4 blockHelp
  Add default TwitterBootstrap4 config
  Adding support for Bootstrap 4 (formers#577)
  Add Choice field type
  Add field modifiers to store moethod signature metadata and postpone framework classes until render time
  Checkable allow setting inline, stacked, grouped via boolaen attribute
  Allow setting required via boolean attribute per formers#571
  Update README.md
  Revert "Encode select options (formers#555)"
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants