Skip to content

Commit

Permalink
Fixed issue #13786: duplicate survey in tutorial/beginner tour
Browse files Browse the repository at this point in the history
Dev: Save button in fullpagebar gets disabled after clicking it.
  • Loading branch information
lacrioque committed Jun 27, 2018
1 parent ab761df commit e16ee53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion application/core/LsDefaultDataSets.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ public static function getTutorialEntryData()
'redirect' => false,
'onNext' => "(function(tour){
tour.setCurrentStep(8);
$('#save-form-button').trigger('click');
if(!$('#save-form-button').hasClass('disabled'))
$('#save-form-button').trigger('click');
return new Promise(function(res,rej){});
})",
))
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/super/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

<!-- Save -->
<?php if(isset($fullpagebar['savebutton']['form'])):?>
<a class="btn btn-success" href="#" role="button" id="save-form-button" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>">
<a class="btn btn-success" href="#" role="button" id="save-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['savebutton']['form']; ?>">
<span class="fa fa-floppy-o"></span>
<?php eT("Save");?>
</a>
<?php endif;?>


<?php if(isset($fullpagebar['saveandclosebutton']['form'])):?>
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>">
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>
Expand Down

0 comments on commit e16ee53

Please sign in to comment.