Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1717 from hendrikschneider/master
removed default action from project.js #1716
- Loading branch information
Showing
2 changed files
with
2 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/static/js/project.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1 @@ | ||
/* Project specific Javascript goes here. */ | ||
|
||
/* | ||
Formatting hack to get around crispy-forms unfortunate hardcoding | ||
in helpers.FormHelper: | ||
if template_pack == 'bootstrap4': | ||
grid_colum_matcher = re.compile('\w*col-(xs|sm|md|lg|xl)-\d+\w*') | ||
using_grid_layout = (grid_colum_matcher.match(self.label_class) or | ||
grid_colum_matcher.match(self.field_class)) | ||
if using_grid_layout: | ||
items['using_grid_layout'] = True | ||
Issues with the above approach: | ||
1. Fragile: Assumes Bootstrap 4's API doesn't change (it does) | ||
2. Unforgiving: Doesn't allow for any variation in template design | ||
3. Really Unforgiving: No way to override this behavior | ||
4. Undocumented: No mention in the documentation, or it's too hard for me to find | ||
*/ | ||
$('.form-group').removeClass('row'); |