File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 4747 endforeach ;
4848 ?>
4949 <li class="pull-right">
50- <button class="btn btn-block btn-primary"><?= Yii::t ('prototype ' , 'Save changes ' ) ?> </button>
50+ <button type="submit" id="save-changes" class="btn btn-block btn-primary"><?= Yii::t ('prototype ' , 'Save changes ' ) ?> </button>
5151 </li>
5252 </ul>
5353 <div class="tab-content">
Original file line number Diff line number Diff line change @@ -32,8 +32,12 @@ $(function(){
3232 localStorage . setItem ( localStorageKey , newActiveHash ) ;
3333 } ) ;
3434
35+ $ ( '#save-changes' ) . on ( 'click' , function ( ) {
36+ window . onbeforeunload = null
37+ } ) ;
38+
3539 // remember user to save stuff
36- window . onbeforeunload = function ( ) {
40+ window . onbeforeunload = function ( e ) {
3741 return true ;
38- } ;
42+ }
3943} ) ;
You can’t perform that action at this time.
0 commit comments