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 95e8e9f2..00000000
--- a/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,46 +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?
-- [ ] Private Content
-- [ ] Instagram
-- [ ] User Tags
-- [ ] Social Activity
-- [ ] WooCommerce
-- [ ] Private Messages
-- [ ] Followers
-- [ ] Real-time Notifications
-- [ ] Social Login
-- [ ] bbPress
-- [ ] MailChimp
-- [ ] User Reviews
-- [ ] Verified Users
-- [ ] myCRED
-- [ ] Notices
-- [ ] Profile Completeness
-- [ ] Friends
-- [ ] Terms & Conditions
-- [ ] Google reCAPTCHA
-- [ ] Online Users
-- [ ] Groups
-- [ ] Gallery
diff --git a/README.md b/README.md
index 8a6510ca..f356f4d2 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
# Ultimate Member
-
-[](https://travis-ci.org/ultimatemember/ultimatemember)
+[](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.
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' ) {
diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php
index b3c6d17c..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';
+
+ ?>
+
@@ -2643,14 +2654,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'] ) ) {
/**