Skip to content

Commit

Permalink
Enhance - Dashboard page (#1271)
Browse files Browse the repository at this point in the history
* Added - Input field to enter the activation license key

* Added - Validation for license field input

* Added - License and plugin version validation

* Added - Loaading on button while retrieving license activation response

* Added - Page reload after the license activation

* Added -Toggle to activate/deactivate the module

* Fix - plugin activation/deactivation toggle and upgrade plan

* Added - Settings URL for global settings

* Fix - Settings URL and button style

* Added - Play button for demo vido on module hover

* Fix - Video URL

* Added - Video Player for modules

* Fix - Video play option while license deactivated

* Fix - Searching module

* Added - copy button to copy shortcode

* Added - Shortcode copied to clipboard

* Tweak - Shortcode copy style

* Fix - Settings icon size, search module and settings link

* Add - open global settings on new tab

* Add - Shortcode copy icon for shortcode example

* Add - video url for ai contact and frontend listing

* Remove - Pop up for plan update in free version

* Fix - Searching of module

* Fix - Video loading and bulk plugin activation or deactivation

* Fix - No item found text

* Fix - Addon activation issues

* Fix - Upgrade plan UTM

* Fix - License Activation

* Add - id to some shortcode

* Fix - Search issue

* Tweak - Width of notice drawer

* Fix - Sorting of modules by descending order

* Fix - Sorting of modules on popular basis

* Update - Changelog

---------

Co-authored-by: Deependra Chaudhary <elendoff11@gmail.com>
  • Loading branch information
riteelama and deepench committed Jul 1, 2024
1 parent 3b41b89 commit 17dae54
Show file tree
Hide file tree
Showing 15 changed files with 25,743 additions and 5,895 deletions.
218 changes: 173 additions & 45 deletions assets/extensions-json/sections/all_extensions.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
= 3.0.1 - xx-xx-2024
Feature - Import entries in our form using csv file.
* Enhancement - Global Setting Premium Sidebar.
* Enhancement - Dashboard page
* Fix - Block design all messed up when viewed in block editor.
* Fix - Wrong instruction on captcha.
* Fix - Email template on email clone, save and continue forms.
Expand Down
4 changes: 2 additions & 2 deletions dist/blocks.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/dashboard.min.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/dashboard.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

/**
* @license React
* react-dom.production.min.js
Expand Down
1 change: 1 addition & 0 deletions dist/reactPlayerPreview.min.js

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

47 changes: 46 additions & 1 deletion includes/RestApi/controllers/version1/class-evf-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ public function register_routes() {
'permission_callback' => array( __CLASS__, 'check_admin_plugin_activation_permissions' ),
)
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/activate-license',
array(
'methods' => 'POST',
'callback' => array( __CLASS__, 'activate_license' ),
'permission_callback' => array( __CLASS__, 'check_admin_plugin_activation_permissions' ),
)
);
}

/**
Expand Down Expand Up @@ -602,7 +611,7 @@ public static function bulk_install_addons( $addon_data ) {
);
$status = self::install_individual_addon( $slug, $plugin, $name, $status );

if ( isset( $status['success'] ) && ! $status['success'] ) {
if ( isset( $status['success'] ) && '' === $status['success'] ) {
array_push( $failed_addon, $name );
continue;
}
Expand Down Expand Up @@ -693,4 +702,40 @@ public static function check_admin_plugin_activation_permissions( $request ) {
public static function check_admin_plugin_installation_permissions( $request ) {
return current_user_can( 'install_plugins' ) && current_user_can( 'activate_plugin' );
}

/**
* Activate the plugin license.
*
* @since 3.0.1
*
* @param WP_REST_Request $request Full details about the request.
*
* @return WP_Error|WP_REST_Response
*/
public static function activate_license( $request ) {
if ( isset( $request['licenseActivationKey'] ) ) {
$evf_dashboard_plugin_updater = new EVF_Plugin_Updater();
$evf_dashboard_plugin_activator = $evf_dashboard_plugin_updater->activate_license( $request['licenseActivationKey'] );

if ( isset( $evf_dashboard_plugin_activator ) && $evf_dashboard_plugin_activator ) {
return new \WP_REST_Response(
array(
'status' => true,
'message' => esc_html__( 'Everest Forms Pro activated successfully.', 'everest-forms' ),
'code' => 200,
),
200
);
} else {
return new \WP_REST_Response(
array(
'status' => true,
'message' => esc_html__( 'Please enter the valid license key.', 'everest-forms' ),
'code' => 400,
),
200
);
}
}
}
}
Loading

0 comments on commit 17dae54

Please sign in to comment.