Skip to content

Conversation

@scott-nz
Copy link

@scott-nz scott-nz commented May 2, 2019

SilverStripe 4 upgrade.

@sminnee
Copy link

sminnee commented Aug 16, 2019

lol I did this in #57 too.

Copy link
Owner

@unclecheese unclecheese left a comment

Choose a reason for hiding this comment

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

Nice work. Thanks for taking this on. Happy to merge it if we can just get the Requirements calls sorted. @sminnee ??

_config.php Outdated
<?php

define('BOOTSTRAP_FORMS_DIR',basename(dirname(__FILE__)));
define('BOOTSTRAP_FORMS_DIR','vendor/unclecheese/bootstrap-forms/');
Copy link
Owner

Choose a reason for hiding this comment

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

Don't need this defined anymore. Use module references in Requirements:: calls.

Copy link

Choose a reason for hiding this comment

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

Fixed in 034d9e8

"javascript",
"css"
]
}
Copy link
Owner

Choose a reason for hiding this comment

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

psr-4 autoload?

Copy link

Choose a reason for hiding this comment

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


public function Field($attributes = array ())
{
Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap_forms.js");
Copy link
Owner

Choose a reason for hiding this comment

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

Use module reference here: unclecheese/boostrapforms: file.js`

Copy link

Choose a reason for hiding this comment

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

Fixed in 034d9e8

Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap-select/js/bootstrap-select.min.js");
Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap-select/js/i18n/defaults-{$current_locale}.js");
Requirements::css(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap-select/css/bootstrap-select.min.css");
}
Copy link
Owner

Choose a reason for hiding this comment

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

Fix require calls.

Copy link

Choose a reason for hiding this comment

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

Fixed in 034d9e8

@sminnee
Copy link

sminnee commented Aug 16, 2019

I've asked @scott-nz for commit rights to his fork so that I can make the ^ changes.

@sminnee
Copy link

sminnee commented Aug 16, 2019

How's that @unclecheese ?
EDIT: Push failed, oops :p
EDIT 2: should be good now

@sminnee
Copy link

sminnee commented Jul 16, 2020

This has an issue in that bootstrap forms are applied to the CMS as well. I'm not sure if there's a way of disabling all the special onBeforeRender hooks for fields that aren't part of a BootstrapForm? Perhaps onBeforeRender should be moved to a per-field bootstrapify()?

image

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.

3 participants