Changeset 3366808
- Timestamp:
- 09/23/2025 10:34:14 PM (6 months ago)
- Location:
- whistleblowing-system/trunk
- Files:
-
- 1 added
- 9 edited
-
Apps/deactivate/assets/deactivate.js (modified) (4 diffs)
-
Apps/defaultForms.php (added)
-
admin/assets/css/edit.css (modified) (1 diff)
-
admin/whistleblower_form_edit_page.php (modified) (2 diffs)
-
config.php (modified) (1 diff)
-
frontend/assets/css/default.css (modified) (3 diffs)
-
frontend/assets/css/style.css (modified) (6 diffs)
-
frontend/assets/js/script.js (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
whistleblowing.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
whistleblowing-system/trunk/Apps/deactivate/assets/deactivate.js
r3155815 r3366808 1 let deactivate_link = '';1 let wbls_deactivate_link = ''; 2 2 jQuery(document).ready(function () { 3 3 let idName = 'deactivate-whistleblowing-system'; … … 8 8 jQuery(document).on('click', '#'+idName, function (e) { 9 9 e.preventDefault(); 10 deactivate_link = jQuery(this).attr("href");10 wbls_deactivate_link = jQuery(this).attr("href"); 11 11 let template = jQuery(document).find("#wbls-deactivate-template").html(); 12 12 jQuery("body").append(template); … … 75 75 }, 76 76 complete: function (response) { 77 window.location.href = deactivate_link;77 window.location.href = wbls_deactivate_link; 78 78 }, 79 79 error: function () { … … 128 128 }, 129 129 complete: function (response) { 130 window.location.href = deactivate_link;130 window.location.href = wbls_deactivate_link; 131 131 }, 132 132 error: function () { -
whistleblowing-system/trunk/admin/assets/css/edit.css
r3356340 r3366808 1349 1349 } 1350 1350 1351 .wbls-field-row-radio, 1351 1352 .wbls-field-row-checkbox { 1352 1353 display: flex; 1353 align-items: center; 1354 line-height: 25px; 1354 align-items: flex-start; 1355 line-height: 20px; 1356 gap: 10px; 1355 1357 } 1356 1358 -
whistleblowing-system/trunk/admin/whistleblower_form_edit_page.php
r3364570 r3366808 370 370 371 371 public function __construct() { 372 373 372 $this->teeny_active = get_option('teeny_active', true); 374 373 $task = isset($_GET['task']) ? sanitize_text_field($_GET['task']) : ''; … … 392 391 if( $id ) { 393 392 $this->fields_options = (array) get_post_meta( $id, 'wbls_field_options', true ); 393 394 394 $form_settings = (array) get_post_meta( $id, 'wbls_form_settings', true ); 395 395 $form_conditions = (array) get_post_meta( $id, 'wbls_form_conditions', true ); -
whistleblowing-system/trunk/config.php
r3364570 r3366808 5 5 6 6 if (!defined('WBLS_VERSION')) { 7 define('WBLS_VERSION', '1.3. 9');7 define('WBLS_VERSION', '1.3.10'); 8 8 } 9 9 if (!defined('WBLS_PREFIX')) { -
whistleblowing-system/trunk/frontend/assets/css/default.css
r3325272 r3366808 37 37 border-radius: 0px; 38 38 box-shadow: none; 39 line-height: 1.2; 39 40 } 40 41 .wbls-form-container .wbls-form input[type=text], … … 93 94 height: 17px; 94 95 background-color: #ffffff; 95 margin: 0 12px 0 0;96 margin: 0; 96 97 padding: 2px; 97 98 accent-color: #000000; 99 flex: 0 0 auto; 98 100 } 99 101 .wbls-form-container .wbls-form .wbls-field-row-radio { … … 107 109 opacity: 1; 108 110 margin: 0; 111 line-height: 1.2; 109 112 } 110 113 .wbls-form-container .wbls-form button.wbls-submit-form, -
whistleblowing-system/trunk/frontend/assets/css/style.css
r3360117 r3366808 97 97 background: url(../images/close_front_14.svg); 98 98 background-repeat: no-repeat; 99 position: absolute; 100 right: 10px; 101 top: 10px; 99 102 } 100 103 … … 330 333 display: flex; 331 334 justify-content: left; 332 align-items: center;335 align-items: flex-start; 333 336 margin-top: 10px; 337 gap: 10px; 334 338 } 335 339 … … 426 430 border-radius: 0px; 427 431 box-shadow: none; 428 display: flex;432 display: block; 429 433 font-family: inherit; 434 line-height: 1.2; 430 435 } 431 436 … … 698 703 display: flex; 699 704 width: 100%; 705 gap:10px; 700 706 } 701 707 702 708 .wbls-field-firstName { 703 margin-right: 10px;709 margin-right: 0; 704 710 flex-grow: 5; 705 711 } 706 712 707 713 .wbls-field-lastName { 708 margin-right: 10px;714 margin-right: 0; 709 715 flex-grow: 5; 710 716 } … … 712 718 713 719 .wbls-field-middleName { 714 margin-right: 10px;720 margin-right: 0; 715 721 flex-grow: 1; 716 722 } … … 792 798 position: relative; 793 799 box-sizing: border-box; 800 max-height: 40%; 801 min-height: 75px; 802 overflow: auto; 803 font-size:16px; 804 line-height: 20px; 794 805 } 795 806 -
whistleblowing-system/trunk/frontend/assets/js/script.js
r3364570 r3366808 267 267 } 268 268 269 let $checkboxGroups = []; 269 270 form.find(".wbls-field").each(function() { 270 271 if( jQuery(this).attr('type') === 'radio' && typeof jQuery(this).attr('required') !== 'undefined' ) { … … 282 283 } 283 284 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")) 286 286 { 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; 301 296 } 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")) { 305 314 $el.addClass("wbls-required-error"); 315 required_error = true; 306 316 } 307 }308 else if ( !jQuery(this).is(":checked") )309 {310 $el.addClass("wbls-required-error");311 required_error = true;312 317 } 313 318 } else if( typeof jQuery(this).attr('required') !== 'undefined' && … … 316 321 { 317 322 required_error = true; 323 jQuery(this).closest(".wblsform-row").addClass("wbls-required-error"); 318 324 } 319 325 }); -
whistleblowing-system/trunk/readme.txt
r3364570 r3366808 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.3. 97 Stable tag: 1.3.10 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html 10 10 11 Create encrypted, anonymous contact or whistleblowing forms with free conditional logic and secure two-way messaging. GDPR-compliant and mobile-friendly.11 Create encrypted, anonymous contact or whistleblowing forms with free conditional logic and secure two-way messaging. GDPR-compliant and responsive 12 12 13 13 == Description == … … 113 113 114 114 == Changelog == 115 = 1.3.10 = 116 Added: Default forms 117 Fixed: Checkbox required bug fix 118 115 119 = 1.3.9 = 116 120 Added: Checkbox required field logic for group -
whistleblowing-system/trunk/whistleblowing.php
r3364570 r3366808 6 6 * Plugin URI: https://whistleblowing-form.de 7 7 * Description: Whistleblowing system form is the ultimate solution for effortlessly creating and managing contact and whistleblowing forms. 8 * Version: 1.3. 98 * Version: 1.3.10 9 9 * Author: Whistleblowing System Team 10 10 * Author URI: https://whistleblowing-form.de … … 98 98 add_action('current_screen', array( $this, 'check_plugins_page' ) ); 99 99 } 100 101 100 require_once 'Apps/blocks.php'; 102 101 } … … 167 166 $wp_rewrite->flush_rules(); 168 167 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 } 171 179 172 180 /**
Note: See TracChangeset
for help on using the changeset viewer.