File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 11import Controller from '@ember/controller' ;
2+ import { action } from '@ember/object' ;
23import EmberTableControllerMixin from 'open-event-frontend/mixins/ember-table-controller' ;
34
45export default class extends Controller . extend ( EmberTableControllerMixin ) {
@@ -52,5 +53,25 @@ get columns() {
5253 }
5354
5455 ] ;
56+ } ;
57+
58+ @action
59+ save ( ) {
60+ try {
61+ const systemMessages = this . model ;
62+ Array . from ( systemMessages ) . forEach ( systemMessage => {
63+ systemMessage . save ( ) ;
64+ } ) ;
65+ this . notify . success ( this . l10n . t ( 'Changes have been saved successfully' ) ,
66+ {
67+ id : 'message_success'
68+ } ) ;
69+ } catch ( e ) {
70+ console . error ( 'Error while saving system messages' , e ) ;
71+ this . notify . error ( e . errors [ 0 ] . detail ,
72+ {
73+ id : 'change_error_message'
74+ } ) ;
75+ }
5576}
5677}
Original file line number Diff line number Diff line change 1717 @fillMode =" equal-column" />
1818 </div >
1919 </div >
20+ <div class =" row" >
21+ <div class =" sixteen wide {{ if this.device.isMobile ' center aligned' }} column" >
22+ <button class =" ui blue button left floated {{ if this.isLoading ' loading' }} " {{ action ' save' }} >{{ t ' Save' }} </button >
23+ </div >
24+ </div >
2025</div >
You can’t perform that action at this time.
0 commit comments