Skip to content

Commit

Permalink
Merge pull request #575 from NHSLeadership/develop
Browse files Browse the repository at this point in the history
Version 2.4.12
  • Loading branch information
maheshmuralip authored Mar 14, 2023
2 parents 83f4dc5 + dae91c2 commit 2839695
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nightingale 2.4.11
<img src="https://img.shields.io/badge/nightingale-v2.4.11-blue">
# Nightingale 2.4.12
<img src="https://img.shields.io/badge/nightingale-v2.4.12-blue">
<a href="https://github.com/nhsuk/nhsuk-frontend">
<img src="https://img.shields.io/badge/nhsuk--frontend-v6.1.0-blue"></a> <a href="https://www.gnu.org/licenses/gpl-3.0.en.html"><img src="https://img.shields.io/badge/license-GPL%20(%3E%3D3)-green"></a> <a href="https://wordpress.org"><img src="https://img.shields.io/badge/WordPress-v5.5%20%2B-lightgrey"></a> <img src="https://img.shields.io/badge/php-5.6%2B-red"> <img src="https://img.shields.io/badge/pull%20requests-welcome-blueviolet"> <a href="https://wordpress.org/themes/nightingale"><img src="https://img.shields.io/badge/theme%20install-WP%20repo-lightgrey"></a>

Expand Down
6 changes: 6 additions & 0 deletions assets/scss/gravity-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -555,3 +555,9 @@
}
}
}
@media only screen and (max-width: 641px) {
.gform_legacy_markup_wrapper input:not([type="radio"]):not([type="checkbox"]):not([type="image"]):not([type="file"]) {
// @todo remove !important if possible.
line-height: 28px !important;
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nhsleadership/nightingale",
"version": "2.4.11",
"version": "2.4.12",
"description": " NHSUK Frontend style theme for WordPress",
"repositories":[{"type":"composer","url":"https://wpackagist.org"}],
"type": "wordpress-theme",
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @link https://developer.wordpress.org/themes/basics/theme-functions/
* @package Nightingale
* @copyright NHS Leadership Academy, Tony Blacker
* @version 2.4.11 11 jan 2023
* @version 2.4.12 07 mar 2023
*/

/**
Expand Down
11 changes: 8 additions & 3 deletions inc/gravity-forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ function ( $form_string, $form ) {
// Style the submit button.
$form_string = str_replace( 'gform_button', 'nhsuk-button', $form_string );
// Style the next button.
$form_string = str_replace( 'gform_next_button button', 'nhsuk-button', $form_string );
$form_string = str_replace( 'gform_next_button gform-theme-button button', 'nhsuk-button', $form_string ); // For Gravity Forms version 2.7+.
$form_string = str_replace( 'gform_next_button button', 'nhsuk-button', $form_string ); // Prior to gforms 2.7.
// Style the previous button.
$form_string = str_replace( 'gform_previous_button button', 'nhsuk-button nhsuk-button--reverse', $form_string );
$form_string = str_replace( 'gform_previous_button gform-theme-button', 'nhsuk-button nhsuk-button--reverse', $form_string ); // For Gravity Forms version 2.7+.
$form_string = str_replace( 'gform_previous_button button', 'nhsuk-button nhsuk-button--reverse', $form_string ); // Prior to gforms 2.7.
// Style last page button.
$form_string = str_replace( 'button gform_button gform_last_page_button', 'nhsuk-button nhsuk-button--reverse', $form_string ); // For Gravity Forms version 2.7+.
// Style the save and continue functionality.
$form_string = str_replace( 'gform_save_link button', 'nhsuk-button nhsuk-button--secondary', $form_string );
$form_string = str_replace( 'gform_save_link', 'nhsuk-button nhsuk-button--secondary', $form_string );
Expand Down Expand Up @@ -189,7 +193,8 @@ function nightingale_clean_gf_inputs( $field_content, $field, $value, $lead_id,
$field_content = str_replace( '</li', '</div', $field_content );
$field_content = str_replace( 'gfield-choice-input', 'gfield-choice-input nhsuk-checkboxes__input', $field_content );
$field_content = preg_replace( '#<label for(.*?)>(.*?)</label>#i', "<label for$1 class='nhsuk-label nhsuk-checkboxes__label'>$2</label>", $field_content );

// Fix for gravity forms 2.7+.
$field_content = str_replace( 'gform-field-label gform-field-label--type-inline', 'nhsuk-label nhsuk-checkboxes__label', $field_content );
// Style <input>s.
$field_content = str_replace( "type='checkbox'", "type='checkbox' class='nhsuk-checkboxes__input'", $field_content );
break;
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
* @package Nightingale
* @copyright NHS Leadership Academy, Tony Blacker
* @version 2.4.11 11th January 2023
* @version 2.4.12 7th March 2023
*/

get_header();
Expand Down
6 changes: 6 additions & 0 deletions js/gravity-overrides.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
jQuery(window).on('load', function () {
if (jQuery(".gform_last_page_button")[0]) {
jQuery(".gform_last_page_button").removeClass('gform_last_page_button').addClass('nhsuk-button nhsuk-button--secondary');
}
});

if (typeof gForm !== 'undefined') {
gform.addFilter('gform_file_upload_markup', function (html, file, up, strings, imagesUrl) {
var formId = up.settings.multipart_params.form_id,
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires PHP: 5.6
License: GPL v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Theme URI: https://digital.leadershipacademy.nhs.uk/digital-capabilities/websites/nightingale-theme-user-guide/
Version: 2.4.11
Version: 2.4.12
Stable tag: 2.4


Expand Down Expand Up @@ -43,6 +43,10 @@ one level only. To show further levels, we recommend using the right (or left) h

== Changelog

=2.4.12=
* Button style improvement for gravity forms 2.7
* Fix for checkbox rendering in gravity forms 2.7

=2.4.11=
* Button style fix for gravity forms with legacy markup enabled

Expand Down
5 changes: 5 additions & 0 deletions style-gutenburg.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Theme Name: Nightingale
Text Domain: nightingale
Version: 2.4.11
Version: 2.4.12
Requires at least: 5.0
Tested up to: 6
Requires PHP: 5.2.4
Expand Down

0 comments on commit 2839695

Please sign in to comment.