Skip to content

Commit

Permalink
SAK-46033 resources > edit > no copyright warning when flipping copyr…
Browse files Browse the repository at this point in the history
…ight back to 'please select...' (sakaiproject#9612)
  • Loading branch information
bjones86 authored Aug 24, 2021
1 parent 1d4316d commit a33ec48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
<h3>
$tlang.getString("action.props")
</h3>

#if ($alertMessage)
<div class="sak-banner-error">$tlang.getString("label.alert") $formattedText.escapeHtml($alertMessage)</div>
<div id="resourceAlert" class="sak-banner-error">$tlang.getString("label.alert") $formattedText.escapeHtml($alertMessage)</div>
#else
<div id="resourceAlert" class="sak-banner-error hide"></div>
#end

<p class="instruction">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#end
</ol>
#if ($itemAlertMessage)
<div class="sak-banner-success">$itemAlertMessage</div>
<div id="resourceAlert" class="sak-banner-success">$itemAlertMessage</div>
#else
<div class="sak-banner-error" style="display:none"></div>
<div id="resourceAlert" class="sak-banner-error hide"></div>
#end
<div id="dragDropWrapper">
<form name="dropzone-form" action="#toolLink("ResourcesHelperAction" "doPost")&flow=save" class="dropzone" id="file-uploader">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1150,9 +1150,8 @@
// 'Please select...' is always the first element in the drop down, but only enforce this if configured via sakai.properties
if (requireChoice && copyrightSelect !== null && copyrightSelect.selectedIndex < 1)
{
$('.sak-banner-error').html('$tlang.getString("label.alert") $copyrightError');
$('.sak-banner-error').removeClass('hide');
$('.sak-banner-error').show();
$('#resourceAlert').html('$tlang.getString("label.alert") $copyrightError');
$('#resourceAlert').removeClass('hide');
window.scrollTo(0, 0);
copyrightSelect.focus();

Expand All @@ -1161,7 +1160,6 @@
}

// Copyright status has been selected; let the calling site submit the necessary form
$('.sak-banner-error').hide();
submitButton.disabled = true;
return true;
}
Expand Down

0 comments on commit a33ec48

Please sign in to comment.