Skip to content

Commit

Permalink
Merge branch 'develop' into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
soulseekah committed Sep 2, 2017
2 parents ee376e9 + 02c687c commit d9fe0f8
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
21 changes: 18 additions & 3 deletions includes/class-gravityview-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,14 @@ public function get_app_setting( $setting_name ) {
* @return array
*/
public function get_app_settings() {
return get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', $this->get_default_settings() );

$settings = get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', $this->get_default_settings() );

if( defined( 'GRAVITYVIEW_LICENSE_KEY' ) ) {
$settings['license_key'] = GRAVITYVIEW_LICENSE_KEY;
}

return $settings;
}


Expand Down Expand Up @@ -667,7 +674,11 @@ public function set_field_error( $field, $error_message = '' ) {
*/
protected function settings_edd_license( $field, $echo = true ) {

$text = self::settings_text( $field, false );
if( defined('GRAVITYVIEW_LICENSE_KEY') && ! empty( GRAVITYVIEW_LICENSE_KEY ) ) {
$field['input_type'] = 'password';
}

$text = $this->settings_text( $field, false );

$activation = $this->License_Handler->settings_edd_license_activation( $field, false );

Expand Down Expand Up @@ -895,6 +906,7 @@ public function app_settings_fields() {
'label' => __( 'License Key', 'gravityview' ),
'description' => __( 'Enter the license key that was sent to you on purchase. This enables plugin updates & support.', 'gravityview' ) . $this->get_license_handler()->license_details( $this->get_app_setting( 'license_key_response' ) ),
'type' => 'edd_license',
'disabled' => ( defined('GRAVITYVIEW_LICENSE_KEY') && ! empty( GRAVITYVIEW_LICENSE_KEY ) ),
'data-pending-text' => __('Verifying license…', 'gravityview'),
'default_value' => $default_settings['license_key'],
'class' => ( '' == $this->get_app_setting( 'license_key' ) ) ? 'activate code regular-text edd-license-key' : 'deactivate code regular-text edd-license-key',
Expand Down Expand Up @@ -990,8 +1002,11 @@ public function app_settings_fields() {
if( $disabled_attribute ) {
$field['disabled'] = $disabled_attribute;
}
}

if( empty( $field['disabled'] ) ) {
unset( $field['disabled'] );
}
}

$sections = array(
array(
Expand Down
12 changes: 11 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ Beautifully display your Gravity Forms entries. Learn more on [gravityview.co](h

The changelog will not be maintained for beta versions. __For information about the Beta, please [read up here](https://github.com/gravityview/GravityView/wiki/The-Future-of-GravityView)__.

= 1.22 =

* Fixed: Inline Edit plugin not working when displaying a single entry
* Fixed: Featured Entries plugin not adding correct CSS selector to the single entry container

__Developer Updates:__

* Fixed: When `GRAVITYVIEW_LICENSE_KEY` constant is defined, it will always be used, and the license field will be disabled
* Fixed: List View and Table View templates have more standardized CSS selectors for single & multiple contexts ([Learn more](http://docs.gravityview.co/article/63-css-guide))

= 1.21.5.3 on July 24, 2017 =

* Fixed: For some field types, the value "No" would be interpreted as `false`
Expand Down Expand Up @@ -1495,4 +1505,4 @@ We're just getting started with what can be done with DataTables. We'll have muc

= 1.0 =

* Liftoff!
* Liftoff!
2 changes: 1 addition & 1 deletion templates/deprecated/list-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
*/
?>
<?php gravityview_before(); ?>
<div class="<?php gv_container_class('gv-list-container'); ?>">
<div class="<?php gv_container_class('gv-list-container gv-list-view gv-list-multiple-container'); ?>">
<?php gravityview_header(); ?>
2 changes: 1 addition & 1 deletion templates/deprecated/list-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
?>
<?php gravityview_before(); ?>

<div class="gv-container gv-list-single-container gv-list-container">
<div class="<?php gv_container_class( 'gv-list-view gv-list-container gv-list-single-container' ); ?>">
<p class="gv-back-link"><?php echo gravityview_back_link(); ?></p>
<?php
if( $this->getContextFields() ) {
Expand Down
2 changes: 1 addition & 1 deletion templates/deprecated/table-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
?>
<?php gravityview_before(); ?>
<div class="<?php gv_container_class('gv-table-container'); ?>">
<div class="<?php gv_container_class('gv-table-view gv-table-container gv-table-multiple-container'); ?>">
<table class="gv-table-view">
<thead>
<?php gravityview_header(); ?>
Expand Down
2 changes: 1 addition & 1 deletion templates/deprecated/table-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<p class="gv-back-link"><?php echo gravityview_back_link(); ?></p>

<div class="gv-table-view gv-container gv-table-single-container">
<div class="<?php gv_container_class( 'gv-table-view gv-table-container gv-table-single-container' ); ?>">
<table class="gv-table-view-content">
<?php if( $this->getFields('single_table-columns') ) { ?>
<thead>
Expand Down

0 comments on commit d9fe0f8

Please sign in to comment.