File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 13
13
class HideCreateEmptyProject extends AbstractExternalModule
14
14
{
15
15
public function redcap_every_page_top ($ project_id ) {
16
- if (PAGE === 'redcap/index.php ' || PAGE === 'index.php?action=create ' ) {
16
+ if (PAGE === 'index.php ' || PAGE === ' redcap/index.php ' || PAGE === 'index.php?action=create ' ) {
17
17
// For "Create new Project" hide "Empty Project" option and default to template
18
18
if (isset ($ _GET ['action ' ]) && $ _GET ['action ' ]==='create ' ) {
19
19
?>
20
20
<script type='text/javascript'>
21
21
$(document).ready(function() {
22
22
$('input[name="project_template_radio"][value="0"]').closest('div').hide();
23
- // $(window).on('load', function() {
24
- setTimeout(function() {
25
- $('input[name="project_template_radio"]').val([1]).change().click();
26
- }, 1000);
27
- // });
23
+ $('input[name="project_template_radio"]').val([1]);
24
+ setTimeout(function() {
25
+ $('input[name="project_template_radio"]').change();
26
+ }, 500);
28
27
});
29
28
</script>
30
29
<?php
You can’t perform that action at this time.
0 commit comments