Commit 751e98d5 by Braden MacDonald

Merge pull request #8713 from open-craft/fix-pr-8658-lib-create-form

Fix: users without course creation permission were not shown new libr…
parents 14b48ed3 4e9db252
...@@ -141,6 +141,8 @@ define(["domReady", "jquery", "underscore", "js/utils/cancel_on_escape", "js/vie ...@@ -141,6 +141,8 @@ define(["domReady", "jquery", "underscore", "js/utils/cancel_on_escape", "js/vie
e.preventDefault(); e.preventDefault();
$('.courses-tab').toggleClass('active', tab === 'courses'); $('.courses-tab').toggleClass('active', tab === 'courses');
$('.libraries-tab').toggleClass('active', tab === 'libraries'); $('.libraries-tab').toggleClass('active', tab === 'libraries');
// Also toggle this course-related notice shown below the course tab, if it is present:
$('.wrapper-creationrights').toggleClass('is-hidden', tab === 'libraries');
}; };
}; };
......
...@@ -103,7 +103,9 @@ ...@@ -103,7 +103,9 @@
</form> </form>
</div> </div>
%if libraries_enabled: % endif
%if libraries_enabled and show_new_library_button:
<div class="wrapper-create-element wrapper-create-library"> <div class="wrapper-create-element wrapper-create-library">
<form class="form-create create-library library-info" id="create-library-form" name="create-library-form"> <form class="form-create create-library library-info" id="create-library-form" name="create-library-form">
<div class="wrap-error"> <div class="wrap-error">
...@@ -154,8 +156,6 @@ ...@@ -154,8 +156,6 @@
</div> </div>
% endif % endif
% endif
<!-- STATE: processing courses --> <!-- STATE: processing courses -->
%if allow_course_reruns and rerun_creator_status and len(in_process_course_actions) > 0: %if allow_course_reruns and rerun_creator_status and len(in_process_course_actions) > 0:
<div class="courses courses-processing"> <div class="courses courses-processing">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment