From 67066f3bfdcdfd442c4221422bd71503ad1068fb Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Sat, 31 Aug 2019 19:53:51 +0800 Subject: [PATCH 1/5] Add form_mode to ajax request headers in form builder --- includes/admin/assets/js/um-admin-modal.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/admin/assets/js/um-admin-modal.js b/includes/admin/assets/js/um-admin-modal.js index 637fea11..65ff31d7 100644 --- a/includes/admin/assets/js/um-admin-modal.js +++ b/includes/admin/assets/js/um-admin-modal.js @@ -97,6 +97,8 @@ function um_admin_modal_ajaxcall( act_id, arg1, arg2, arg3 ) { in_column = jQuery('.um-col-demon-settings').data('in_column'); in_group = jQuery('.um-col-demon-settings').data('in_group'); } + + var form_mode = jQuery('input[type=hidden][id=form__um_mode]').val(); jQuery.ajax({ url: wp.ajax.settings.url, @@ -111,7 +113,8 @@ function um_admin_modal_ajaxcall( act_id, arg1, arg2, arg3 ) { in_sub_row: in_sub_row, in_column: in_column, in_group: in_group, - nonce: um_admin_scripts.nonce + nonce: um_admin_scripts.nonce, + form_mode: form_mode }, complete: function(){ um_admin_modal_loaded(); @@ -126,7 +129,6 @@ function um_admin_modal_ajaxcall( act_id, arg1, arg2, arg3 ) { jQuery( "#_custom_dropdown_options_source" ).trigger('blur'); - if ( jQuery('.um-admin-editor:visible').length > 0 ) { if ( act_id == 'um_admin_edit_field_popup' ) { From 7a469ee53a8eeb4b82d0ca2a0a8d3ad7cbcba8eb Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Sat, 31 Aug 2019 22:10:01 +0800 Subject: [PATCH 2/5] Fix dropdown callback function issue on registration --- includes/core/class-fields.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index b3c6d17c..a49c4169 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2643,14 +2643,33 @@ if ( ! class_exists( 'um\core\Fields' ) ) { um_user( $data['parent_dropdown_relationship'] ) ) { $options = call_user_func( $data['custom_dropdown_options_source'], $data['parent_dropdown_relationship'] ); + + $disabled_by_parent_option = ''; if ( um_user( $form_key ) ) { $select_original_option_value = " data-um-original-value='" . um_user( $form_key ) . "' "; } + + } } + // Child dropdown option selected + if( isset( UM()->form()->post_form[ $form_key ] ) ){ + $select_original_option_value = " data-um-original-value='" . esc_attr( UM()->form()->post_form[ $form_key ] ) . "' "; + } + + // Child dropdown + if( $has_parent_option ){ + + if ( ! empty( $data['custom_dropdown_options_source'] ) && $has_parent_option && function_exists( $data['custom_dropdown_options_source'] ) && + isset( UM()->form()->post_form[ $form_key ] ) + ) { + $options = call_user_func( $data['custom_dropdown_options_source'], $data['parent_dropdown_relationship'] ); + } + } + if ( ! empty( $data['custom_dropdown_options_source'] ) ) { /** From f2e1e9955af280a6b14be3eef8e1fa2cd553a9e5 Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Tue, 3 Sep 2019 14:34:04 +0800 Subject: [PATCH 3/5] Fix issue with checkbox not checked on form submission with error validation --- includes/core/class-fields.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index a49c4169..b484e83c 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -39,7 +39,18 @@ if ( ! class_exists( 'um\core\Fields' ) ) { * @param bool $checked */ function checkbox( $id, $title, $checked = true ) { - $class = $checked ? 'um-icon-android-checkbox-outline' : 'um-icon-android-checkbox-outline-blank'; ?> + + /** + * Set value on form submission + */ + if( isset( $_REQUEST[ $id ] ) ){ + $checked = $_REQUEST[ $id ]; + } + + $class = $checked ? 'um-icon-android-checkbox-outline' : 'um-icon-android-checkbox-outline-blank'; + + ?> +
From 226ed960621cf122172226e9839b36bc42dee0a5 Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Tue, 3 Sep 2019 15:16:42 +0800 Subject: [PATCH 4/5] Update issue template & ReadMe.md --- ISSUE_TEMPLATE.md | 36 +++++++++++++++++++----------------- README.md | 3 +-- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 95e8e9f2..dff1b30f 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -22,25 +22,27 @@ Tell us how to reproduce this issue. - [ ] 5.3 below ### Do you use UM extensions? -- [ ] Private Content -- [ ] Instagram -- [ ] User Tags -- [ ] Social Activity -- [ ] WooCommerce -- [ ] Private Messages - [ ] Followers -- [ ] Real-time Notifications -- [ ] Social Login -- [ ] bbPress +- [ ] ForumWP +- [ ] Friends +- [ ] Google reCAPTCHA +- [ ] Groups +- [ ] Instagram - [ ] MailChimp -- [ ] User Reviews -- [ ] Verified Users - [ ] myCRED - [ ] Notices -- [ ] Profile Completeness -- [ ] Friends -- [ ] Terms & Conditions -- [ ] Google reCAPTCHA - [ ] Online Users -- [ ] Groups -- [ ] Gallery +- [ ] Private Content +- [ ] Private Messages +- [ ] Profile Completeness +- [ ] Real-time Notifications +- [ ] Social Activity +- [ ] Social Login +- [ ] Terms & Conditions +- [ ] Unsplash +- [ ] User Bookmarks +- [ ] User Photos +- [ ] User Reviews +- [ ] User Tags +- [ ] Verified Users +- [ ] WooCommerce diff --git a/README.md b/README.md index 8a6510ca..f356f4d2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Ultimate Member - -[![Travic-CI](https://travis-ci.org/ultimatemember/ultimatemember.svg?branch=master)](https://travis-ci.org/ultimatemember/ultimatemember) +[![Build Status](https://travis-ci.org/ultimatemember/ultimatemember.svg?branch=master)](https://travis-ci.org/ultimatemember/ultimatemember) Ultimate Member is the #1 user profile & membership plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is perfect for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. From ff1484858b11faef9cba2d983430b6c31593226a Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Tue, 3 Sep 2019 16:17:05 +0800 Subject: [PATCH 5/5] Update issue templates --- .github/ISSUE_TEMPLATE/-----security-issue.md | 12 ++++ .github/ISSUE_TEMPLATE/Bug_report.md | 67 +++++++++++++++++++ .github/ISSUE_TEMPLATE/Enhancement.md | 21 ++++++ .github/ISSUE_TEMPLATE/Feature_request.md | 21 ++++++ .github/ISSUE_TEMPLATE/Support.md | 22 ++++++ ISSUE_TEMPLATE.md | 48 ------------- 6 files changed, 143 insertions(+), 48 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/-----security-issue.md create mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/Enhancement.md create mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/Support.md delete mode 100644 ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/-----security-issue.md b/.github/ISSUE_TEMPLATE/-----security-issue.md new file mode 100644 index 00000000..0f9bac95 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/-----security-issue.md @@ -0,0 +1,12 @@ +--- +name: "\U0001F46E‍♂️Security issue" +about: Please report security issues *only* via https://ultimatemember.com/feedback/ +title: '' +labels: '' +assignees: '' + +--- + +For security reasons, please report all security issues via https://ultimatemember.com/feedback/. + +Please disclose responsibly and not via GitHub (which allows for exploiting issues in the wild before the patch is released). \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md new file mode 100644 index 00000000..31ebf8a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -0,0 +1,67 @@ +--- +name: "\U0001F41E Bug report" +about: Report a bug if something isn't working as expected in the core Ultimate Member + plugin. +title: '' +labels: '' +assignees: '' + +--- + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Isolating the problem (mark completed items with an [x]):** +- [ ] I have deactivated other plugins and confirmed this bug occurs when only Ultimate Member plugin is active. +- [ ] This bug happens with a default WordPress theme active, or [UM Theme](https://ultimatemember.com/theme/). +- [ ] I can reproduce this bug consistently using the steps above. + +**Describe the bug** +A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Do you use UM extensions?** +- [ ] Followers +- [ ] ForumWP +- [ ] Friends +- [ ] Google reCAPTCHA +- [ ] Groups +- [ ] Instagram +- [ ] MailChimp +- [ ] myCRED +- [ ] Notices +- [ ] Online Users +- [ ] Private Content +- [ ] Private Messages +- [ ] Profile Completeness +- [ ] Real-time Notifications +- [ ] Social Activity +- [ ] Social Login +- [ ] Terms & Conditions +- [ ] Unsplash +- [ ] User Bookmarks +- [ ] User Photos +- [ ] User Reviews +- [ ] User Tags +- [ ] Verified Users +- [ ] WooCommerce + + +**WordPress Environment** +
+``` +Copy and paste the install info from ** Ultimate Member > Settings > Install Info ** in WordPress admin. +``` +
\ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Enhancement.md b/.github/ISSUE_TEMPLATE/Enhancement.md new file mode 100644 index 00000000..261e4919 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Enhancement.md @@ -0,0 +1,21 @@ +--- +name: "✨ New Enhancement" +about: If you have an idea to improve an existing feature in core or need something + for development (such as a new hook) please let us know or submit a Pull Request! +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md new file mode 100644 index 00000000..dd8f852e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -0,0 +1,21 @@ +--- +name: "\U0001F680 Feature request" +about: "Suggest a new feature \U0001F389 We'll consider building it if it receives + sufficient interest! \U0001F44D" +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/Support.md b/.github/ISSUE_TEMPLATE/Support.md new file mode 100644 index 00000000..c3921a45 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Support.md @@ -0,0 +1,22 @@ +--- +name: "❓ Support Question" +about: "If you have a question \U0001F4AC please see our docs or use our forums & support page" +title: '' +labels: '' +assignees: '' + +--- + +We don't offer technical support on GitHub so we recommend using the following: + +**Reading our documentation** +Usage docs can be found here: https://docs.ultimatemember.com + +If you have a problem, you may want to start with the self help guide here: https://docs.ultimatemember.com/article/1507-ultimate-member-self-service-guide/ + +**Technical support for premium extensions or if you're a UltimateMember.com customer** +Please submit a ticket via the support page +https://ultimatemember.com/support/ticket/ + +**General questions** +- WordPress.org Forums: https://wordpress.org/support/plugin/ultimate-member/ diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index dff1b30f..00000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,48 +0,0 @@ -### Ultimate Member Version -Tell us what UM core version you use. -- [ ] 1.3.x -- [x] 2.x ( latest ) - - -### Subject of the issue -Describe your issue here. - -### Expected behavior -Tell us what should happen - -### Actual behavior -Tell us what happens instead - -### Steps to reproduce the behavior -Tell us how to reproduce this issue. - -## PHP version -- [x] 7.1 above -- [ ] 5.4 -- [ ] 5.3 below - -### Do you use UM extensions? -- [ ] Followers -- [ ] ForumWP -- [ ] Friends -- [ ] Google reCAPTCHA -- [ ] Groups -- [ ] Instagram -- [ ] MailChimp -- [ ] myCRED -- [ ] Notices -- [ ] Online Users -- [ ] Private Content -- [ ] Private Messages -- [ ] Profile Completeness -- [ ] Real-time Notifications -- [ ] Social Activity -- [ ] Social Login -- [ ] Terms & Conditions -- [ ] Unsplash -- [ ] User Bookmarks -- [ ] User Photos -- [ ] User Reviews -- [ ] User Tags -- [ ] Verified Users -- [ ] WooCommerce