Skip to content

Release 2.30 #2168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d3cf31b
Testing
omarkasem Sep 7, 2024
7fb5bbe
Fix upload issue and Add disable button and message when max files is…
omarkasem Sep 8, 2024
47dd649
Fixes multiple messages showing up
omarkasem Sep 10, 2024
572e0fa
Fixes issue that allowed user to uplaod files more than the maximum
omarkasem Sep 13, 2024
24c81c2
Find associated field by field name instead of type first.
doekenorg May 28, 2024
5c54a9e
Add created_by field rendering for edit view.
doekenorg May 28, 2024
77a8113
Add ability to change created by user:
doekenorg May 28, 2024
18b10c5
Add check for `list_users` and update readme
doekenorg Sep 16, 2024
dff1b6c
Fix Code style problems
doekenorg Sep 16, 2024
24f875b
Fix wp_kses arguments
doekenorg Sep 16, 2024
a7c05e1
Add merge tags for dates function
omarkasem Sep 17, 2024
bb612e4
Add unit tests
omarkasem Sep 17, 2024
97f8351
Fixes timestamp being different from raw format
omarkasem Sep 19, 2024
bc73aac
Merge branch 'develop' into feature/721-allow-changing-entry-creator-…
zackkatz Sep 24, 2024
03c757a
Merge branch 'develop' into feature/721-allow-changing-entry-creator-…
doekenorg Sep 26, 2024
f861363
Fixes reversing issue
omarkasem Sep 30, 2024
f2f7a73
Fixes spacing
omarkasem Sep 30, 2024
db39fd4
Merge branch 'develop' into feature/721-allow-changing-entry-creator-…
doekenorg Oct 1, 2024
f597017
Merge branch 'develop' into issue/1978-add-merge-tags-now-today-yeste…
mrcasual Oct 2, 2024
cf61199
Remove unused function parameters, format code, reuse variables
mrcasual Oct 2, 2024
c8ccfc6
Update changelog [ci skip]
mrcasual Oct 2, 2024
3d3d81e
Issue/1978 add merge tags now today yesterday (#2143)
mrcasual Oct 2, 2024
05e94af
Merge branch 'develop' into issue/2086-edit-entry-doesnt-respect-file…
mrcasual Oct 2, 2024
969e7a4
Update changelog [ci skip]
mrcasual Oct 2, 2024
0a3a26c
Issue/2086 edit entry doesnt respect file uploads maximum number of f…
mrcasual Oct 2, 2024
7d0e5a1
Merge branch 'develop' into feature/721-allow-changing-entry-creator-…
doekenorg Oct 2, 2024
57bdb1b
Require GFExport
doekenorg Oct 2, 2024
0cd996d
Gets choices directly from database to avoid reversal issues
omarkasem Oct 2, 2024
70b40ab
Enqueue WP scripts during HTML output (#2163)
mrcasual Oct 8, 2024
87f3bae
Add smooth scroll to focus
doekenorg Oct 9, 2024
9e98a5f
Makes code more readable
omarkasem Oct 9, 2024
552ebd0
Fix resending notifications to entries filtered by approval status
mrcasual Oct 9, 2024
ed10a05
Fixes fatal error related to wp_redirect filter
zackkatz Oct 10, 2024
69bd67b
Merge branch 'develop' into feature/721-allow-changing-entry-creator-…
doekenorg Oct 11, 2024
4208ac4
Show custom label for Created By field on entry edit
doekenorg Oct 11, 2024
1867225
Show configured label instead of field label
doekenorg Oct 11, 2024
01965df
Remove capbility notice on admin bar
doekenorg Oct 11, 2024
2cf7589
Fix unit tests
doekenorg Oct 11, 2024
3fc596b
Update Foundation to v1.2.19
mrcasual Oct 13, 2024
429efb9
Check if View exists before accessing class methods
mrcasual Oct 14, 2024
8bad3b7
Fix spacing [ci skip]
mrcasual Oct 14, 2024
d171c2e
Allow changing entry creator from the edit entry screen (#2141)
mrcasual Oct 14, 2024
a90806c
Merge branch 'develop' into issue/2125-survey-field-ratings-are-incor…
mrcasual Oct 14, 2024
209c90f
Update changelog [ci skip]
mrcasual Oct 14, 2024
f593e47
Fixes reversing issue (#2157)
mrcasual Oct 14, 2024
6ff0ff5
Bump version to 2.30 and update changelog
mrcasual Oct 14, 2024
e98337e
Fix typo [ci skip]
mrcasual Oct 14, 2024
337c11b
Fix PHP notice when rendering entry value from inactive add-on
mrcasual Oct 14, 2024
655f9a2
Update @since tags [ci skip]
mrcasual Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions assets/js/admin-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,19 @@

viewConfiguration.setTooltipLayout( activate_layout );

$focus_item.trigger('focus');
// Smooth scroll to focus.
$focus_item[ 0 ].focus( { preventScroll: true } );
const box = $focus_item[ 0 ].getBoundingClientRect();

if ( box.y < 0 || box.y > document.body.getBoundingClientRect().height ) {
window.scrollTo(
{
left: window.scrollX,
top: window.scrollY + box.y + ( box.y < 0 ? -60 : 60 ),
behavior: 'smooth'
}
);
}
},
closeOnEscape: true,
disabled: true, // Don't open on hover
Expand Down Expand Up @@ -3253,4 +3265,4 @@
.fail( on_fail );
} );
} );
}(jQuery));
}(jQuery));
83 changes: 83 additions & 0 deletions assets/js/fe-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,95 @@ jQuery( function ( $ ) {
$( '.gv-search-clear' ).on( 'click', this.clear_search );

$( 'a.gv-sort' ).on( 'click', this.multiclick_sort );

this.disable_upload_file_when_limit_reached();

this.fix_updating_files_after_edit();

this.number_range();

this.iframe();
},

/**
* Fix the issue of updating files after edit where the previous value still exists in the uploaded field.
*/
fix_updating_files_after_edit: function(){
$.each($('.ginput_preview_list'), function(index, element){
if ($(element).children().length > 0) {
return true;
}

$(element).parents('form').find('[name=gform_uploaded_files]').val('');
});
},

/**
* Fix the issue for file upload fields where the button is not disabled and show message for multi upload file.
*/
disable_upload_file_when_limit_reached: function(){

var checkUploaders = setInterval(function() {
if (typeof gfMultiFileUploader !== 'undefined' && gfMultiFileUploader.uploaders) {
clearInterval(checkUploaders);
$.each(gfMultiFileUploader.uploaders, function(index, uploader){
uploader.bind('Init', function(up, params) {
var data = up.settings;
var max = data.gf_vars.max_files;
var fieldId = data.multipart_params.field_id;
var existingFilesCount = $('#preview_existing_files_'+fieldId).children().length;
var limitReached = existingFilesCount >= max;
gfMultiFileUploader.toggleDisabled(data, limitReached);
});

uploader.bind('FilesAdded', function(up, files) {
var data = up.settings;
var max = data.gf_vars.max_files;
var fieldId = data.multipart_params.field_id;
var formId = data.multipart_params.form_id;
var newFilesCount = $('#gform_preview_'+formId+'_'+fieldId).children().length;
var existingFilesCount = $('#preview_existing_files_'+fieldId).children().length;
var limitReached = existingFilesCount + newFilesCount >= max;

$.each(files, function(i, file) {
if (max > 0 && existingFilesCount >= max){
up.removeFile(file);
$('#'+file.id).remove();
return;
}

existingFilesCount++;
});

gfMultiFileUploader.toggleDisabled(data, limitReached);


// Only show message if max is greater than 1
if(max <= 1){
return true;
}

// Check if message already exists

if($("#" + up.settings.gf_vars.message_id).children().length > 0){
return true;
}
$( "#" + up.settings.gf_vars.message_id ).prepend( "<li class='gfield_description gfield_validation_message'>" +
$('<div/>').text(gform_gravityforms.strings.max_reached).html()
+
"</li>" );
// Announce errors.
setTimeout(function () {
wp.a11y.speak( $( "#" + up.settings.gf_vars.message_id ).text() );
}, 1000 );

});

});
}
}, 1);
},

/**
* Triggered when the search form changes
* - Adds 'data-form-changed' attribute to <form> wrapper
Expand Down
Loading