Plugin Directory

Changeset 3366808


Ignore:
Timestamp:
09/23/2025 10:34:14 PM (6 months ago)
Author:
pokhar
Message:

Release Version 1.3.10

Location:
whistleblowing-system/trunk
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • whistleblowing-system/trunk/Apps/deactivate/assets/deactivate.js

    r3155815 r3366808  
    1 let deactivate_link = '';
     1let wbls_deactivate_link = '';
    22jQuery(document).ready(function () {
    33    let idName = 'deactivate-whistleblowing-system';
     
    88    jQuery(document).on('click', '#'+idName, function (e) {
    99        e.preventDefault();
    10         deactivate_link = jQuery(this).attr("href");
     10        wbls_deactivate_link = jQuery(this).attr("href");
    1111        let template = jQuery(document).find("#wbls-deactivate-template").html();
    1212        jQuery("body").append(template);
     
    7575            },
    7676            complete: function (response) {
    77                 window.location.href = deactivate_link;
     77                window.location.href = wbls_deactivate_link;
    7878            },
    7979            error: function () {
     
    128128            },
    129129            complete: function (response) {
    130                 window.location.href = deactivate_link;
     130                window.location.href = wbls_deactivate_link;
    131131            },
    132132            error: function () {
  • whistleblowing-system/trunk/admin/assets/css/edit.css

    r3356340 r3366808  
    13491349}
    13501350
     1351.wbls-field-row-radio,
    13511352.wbls-field-row-checkbox {
    13521353    display: flex;
    1353     align-items: center;
    1354     line-height: 25px;
     1354    align-items: flex-start;
     1355    line-height: 20px;
     1356    gap: 10px;
    13551357}
    13561358
  • whistleblowing-system/trunk/admin/whistleblower_form_edit_page.php

    r3364570 r3366808  
    370370
    371371    public function __construct() {
    372 
    373372        $this->teeny_active = get_option('teeny_active', true);
    374373        $task = isset($_GET['task']) ? sanitize_text_field($_GET['task']) : '';
     
    392391        if( $id ) {
    393392            $this->fields_options = (array) get_post_meta( $id, 'wbls_field_options', true );
     393
    394394            $form_settings = (array) get_post_meta( $id, 'wbls_form_settings', true );
    395395            $form_conditions = (array) get_post_meta( $id, 'wbls_form_conditions', true );
  • whistleblowing-system/trunk/config.php

    r3364570 r3366808  
    55
    66if (!defined('WBLS_VERSION')) {
    7     define('WBLS_VERSION', '1.3.9');
     7    define('WBLS_VERSION', '1.3.10');
    88}
    99if (!defined('WBLS_PREFIX')) {
  • whistleblowing-system/trunk/frontend/assets/css/default.css

    r3325272 r3366808  
    3737    border-radius: 0px;
    3838    box-shadow: none;
     39    line-height: 1.2;
    3940}
    4041.wbls-form-container .wbls-form input[type=text],
     
    9394    height: 17px;
    9495    background-color: #ffffff;
    95     margin: 0 12px 0 0;
     96    margin: 0;
    9697    padding: 2px;
    9798    accent-color: #000000;
     99    flex: 0 0 auto;
    98100}
    99101.wbls-form-container .wbls-form .wbls-field-row-radio {
     
    107109    opacity: 1;
    108110    margin: 0;
     111    line-height: 1.2;
    109112}
    110113.wbls-form-container .wbls-form button.wbls-submit-form,
  • whistleblowing-system/trunk/frontend/assets/css/style.css

    r3360117 r3366808  
    9797    background: url(../images/close_front_14.svg);
    9898    background-repeat: no-repeat;
     99    position: absolute;
     100    right: 10px;
     101    top: 10px;
    99102}
    100103
     
    330333    display: flex;
    331334    justify-content: left;
    332     align-items: center;
     335    align-items: flex-start;
    333336    margin-top: 10px;
     337    gap: 10px;
    334338}
    335339
     
    426430    border-radius: 0px;
    427431    box-shadow: none;
    428     display: flex;
     432    display: block;
    429433    font-family: inherit;
     434    line-height: 1.2;
    430435}
    431436
     
    698703    display: flex;
    699704    width: 100%;
     705    gap:10px;
    700706}
    701707
    702708.wbls-field-firstName {
    703     margin-right: 10px;
     709    margin-right: 0;
    704710    flex-grow: 5;
    705711}
    706712
    707713.wbls-field-lastName {
    708     margin-right: 10px;
     714    margin-right: 0;
    709715    flex-grow: 5;
    710716}
     
    712718
    713719.wbls-field-middleName {
    714     margin-right: 10px;
     720    margin-right: 0;
    715721    flex-grow: 1;
    716722}
     
    792798    position: relative;
    793799    box-sizing: border-box;
     800    max-height: 40%;
     801    min-height: 75px;
     802    overflow: auto;
     803    font-size:16px;
     804    line-height: 20px;
    794805}
    795806
  • whistleblowing-system/trunk/frontend/assets/js/script.js

    r3364570 r3366808  
    267267        }
    268268
     269        let $checkboxGroups = [];
    269270        form.find(".wbls-field").each(function() {
    270271            if( jQuery(this).attr('type') === 'radio' && typeof jQuery(this).attr('required') !== 'undefined' ) {
     
    282283            }
    283284            else if( typeof jQuery(this).attr('required') !== 'undefined' &&
    284                     jQuery(this).attr('type') === 'checkbox' &&
    285                     jQuery(this).is(":visible"))
     285                    jQuery(this).attr('type') === 'checkbox' && jQuery(this).is(":visible"))
    286286            {
    287                 let $el = jQuery(this).closest(".wblsform-row");
    288                 if( $el.attr("data-required") === 'single' ) {
    289 
    290                     let group_ids = $el.attr("data-required-group-ids"); // example attribute
    291                     if (!group_ids) return false;
    292 
    293                     let required_temp_error = true;
    294 
    295                     group_ids.split(",").forEach(function(group_id) {
    296                         group_id = group_id.trim();
    297 
    298                         let $checkboxes = $el.find('input[name="wbls_field_' + group_id + '"]');
    299                         if ($checkboxes.length && $checkboxes.is(":checked")) {
    300                             required_temp_error = false;
     287                if( !jQuery(this).is(":checked") ) {
     288                    let $el = jQuery(this).closest(".wblsform-row");
     289                    if ($el.attr("data-required") === 'single') {
     290
     291                        let group_ids = $el.attr("data-required-group-ids"); // example attribute
     292                        if (!group_ids || required_error) return false;
     293
     294                        if ($checkboxGroups.length && $checkboxGroups.includes(group_ids)) {
     295                            return;
    301296                        }
    302                     });
    303                     required_error = required_temp_error;
    304                     if( required_error ) {
     297                        $checkboxGroups.push(group_ids);
     298
     299                        let required_temp_error = true;
     300
     301                        group_ids.split(",").forEach(function (group_id) {
     302                            group_id = group_id.trim();
     303
     304                            let $checkboxes = $el.find('input[name="wbls_field_' + group_id + '"]');
     305                            if ($checkboxes.length && $checkboxes.is(":checked")) {
     306                                required_temp_error = false;
     307                            }
     308                        });
     309                        required_error = required_temp_error;
     310                        if (required_error) {
     311                            $el.addClass("wbls-required-error");
     312                        }
     313                    } else if (!jQuery(this).is(":checked")) {
    305314                        $el.addClass("wbls-required-error");
     315                        required_error = true;
    306316                    }
    307                 }
    308                 else if ( !jQuery(this).is(":checked") )
    309                 {
    310                     $el.addClass("wbls-required-error");
    311                     required_error = true;
    312317                }
    313318            } else if( typeof jQuery(this).attr('required') !== 'undefined' &&
     
    316321            {
    317322                required_error = true;
     323                jQuery(this).closest(".wblsform-row").addClass("wbls-required-error");
    318324            }
    319325        });
  • whistleblowing-system/trunk/readme.txt

    r3364570 r3366808  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.3.9
     7Stable tag: 1.3.10
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1010
    11 Create encrypted, anonymous contact or whistleblowing forms with free conditional logic and secure two-way messaging. GDPR-compliant and mobile-friendly.
     11Create encrypted, anonymous contact or whistleblowing forms with free conditional logic and secure two-way messaging. GDPR-compliant and responsive
    1212
    1313== Description ==
     
    113113
    114114== Changelog ==
     115= 1.3.10 =
     116Added: Default forms
     117Fixed: Checkbox required bug fix
     118
    115119= 1.3.9 =
    116120Added: Checkbox required field logic for group
  • whistleblowing-system/trunk/whistleblowing.php

    r3364570 r3366808  
    66 * Plugin URI: https://whistleblowing-form.de
    77 * Description: Whistleblowing system form is the ultimate solution for effortlessly creating and managing contact and whistleblowing forms.
    8  * Version: 1.3.9
     8 * Version: 1.3.10
    99 * Author: Whistleblowing System Team
    1010 * Author URI: https://whistleblowing-form.de
     
    9898            add_action('current_screen', array( $this, 'check_plugins_page' ) );
    9999        }
    100 
    101100        require_once 'Apps/blocks.php';
    102101    }
     
    167166        $wp_rewrite->flush_rules();
    168167
    169     }
    170    
     168        if( !WBLS_PRO ) {
     169            $this->create_default_forms();
     170        }
     171    }
     172
     173    public function create_default_forms() {
     174        if ( !get_option( 'wbls_default_forms_created', false ) ) {
     175            require_once WBLS_DIR."/Apps/defaultForms.php";
     176            new WBLS_DefaultForms();
     177        }
     178    }
    171179
    172180    /**
Note: See TracChangeset for help on using the changeset viewer.