Skip to content

Commit

Permalink
Merge pull request #745 from coral-erm/ERM-111
Browse files Browse the repository at this point in the history
Fixed logins tab loading issue in usage module
  • Loading branch information
andyp-uk authored Feb 26, 2024
2 parents d816876 + 6d288d5 commit b892026
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion usage/ajax_htmldata.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
$orgArray = $publisherPlatform->getOrganizationExternalLogins();
$externalLoginArray = $publisherPlatform->getExternalLogins();

if ((count($orgArray) > 0) || (count($externalLoginArray) > 0)){
if ((is_array($orgArray) && count($orgArray) > 0) || (is_array($externalLoginArray) && count($externalLoginArray) > 0)){
$pub = new Publisher(new NamedArguments(array('primaryKey' => $publisherPlatform->publisherID)));
$pubArray[$publisherPlatform->publisherID] = $pub->name;
}
Expand Down
23 changes: 10 additions & 13 deletions usage/js/forms/platformNoteSubmitForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,23 @@

$(function(){


$("#submitPlatformNoteForm").click(function () {
submitPlatformNotes();
$(document).on('click', '#submitPlatformNoteForm', function () {
submitPlatformNotes();
});



//do submit if enter is hit
$('#startYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPlatformNotes();
}
$(document).on('keyup', '#startYear', function (e) {
if(e.keyCode === 13) {
submitPlatformNotes();
}
});


//do submit if enter is hit
$('#endYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPlatformNotes();
}
$(document).on('keyup', '#endYear', function (e) {
if(e.keyCode === 13) {
submitPlatformNotes();
}
});


Expand Down
25 changes: 12 additions & 13 deletions usage/js/forms/publisherNoteSubmitForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,26 @@

$(function(){


$("#submitPublisherNoteForm").click(function () {
submitPublisherNote();
});
$(document).on('click', '#submitPublisherNoteForm', function (e) {
submitPublisherNote();
});



//do submit if enter is hit
$('#startYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPublisherNote();
}
$(document).on('keyup', '#startYear', function (e) {
if(e.keyCode === 13) {
submitPublisherNote();
}
});


//do submit if enter is hit
$('#endYear').keyup(function(e) {
if(e.keyCode == 13) {
submitPublisherNote();
}
});
$(document).on('keyup', '#endYear', function (e) {
if(e.keyCode === 13) {
submitPublisherNote();
}
});



Expand Down

0 comments on commit b892026

Please sign in to comment.