Refactor #12979
Add a helper for primary buttons
Pull request:
Fixed in Releases:
Found in Releases:
Description
In most of the views there is a create button(example "New Host") that we need to apply btn-success css class on it(btn-primary once patterfly will be merged), we are now doing so automatically by using JavaScript which is considered bad practice(application.js:66), we need to remove it.
In order to achieve that:- create a helper for create_button.
- apply it in needed views.
- remove js functionality (application.js:66).
Related issues
Associated revisions
Refs #12979 - adding btn-default class to leftover buttons
Refs #12979 - fix proxy button styling
History
#1
Updated by Tomer Brisker almost 5 years ago
- Category set to Web Interface
- Status changed from New to Assigned
- Assignee set to Tomer Brisker
#2
Updated by The Foreman Bot almost 5 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3350 added
#3
Updated by Anonymous almost 5 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset bb25ebe661dea99d1247dd48a0dbea5c88162711.
#4
Updated by Ori Rabin almost 5 years ago
- Related to Refactor #14360: Use new_link for new buttons added
#5
Updated by Dominic Cleal almost 5 years ago
- Legacy Backlogs Release (now unused) set to 136
#6
Updated by The Foreman Bot almost 5 years ago
- Pull request https://github.com/theforeman/foreman/pull/3373 added
#7
Updated by Stephen Benjamin almost 5 years ago
- Related to Bug #14506: Use new button helpers added
#8
Updated by Dominic Cleal almost 5 years ago
- Pull request https://github.com/theforeman/foreman/pull/3396 added
#9
Updated by Tomer Brisker almost 5 years ago
- Related to Bug #14555: Welcome pages missing use of new_link helper added
#10
Updated by Ohad Levy almost 5 years ago
- Related to Bug #14564: some buttons are no longer visible as buttons added
#11
Updated by Dominic Cleal over 4 years ago
- Related to Bug #14977: report show toolbar buttons are just links added
#12
Updated by Dominic Cleal over 4 years ago
- Related to Bug #15431: smart proxy show buttons are missing css classes. added
#13
Updated by Ohad Levy over 4 years ago
- Related to Bug #15475: btn misses css class under console view added
Fixes #12979 - Create helper for "new" button
Previously the button classes were applied to new buttons using jQuery.
This commit creates a `new_link` helper that makes sure all new buttons
will receive the correct class and only display if authorized. Also a
little bit of cleanup.