1
1
@(account: gitbucket.core.model.Account,
2
- disableEmail: Boolean)(implicit context: gitbucket.core.controller.Context)
3
-
2
+ disableEmail: Boolean, info: Option[Any] )(implicit context: gitbucket.core.controller.Context)
3
+ @import gitbucket.core.view.helpers
4
4
@gitbucket.core.html.main("Notifications"){
5
5
@gitbucket.core.account.html.menu("notifications", account.userName, account.isGroupAccount){
6
- < div class ="panel panel-default ">
7
- < div class ="panel-heading strong "> Email notification preferences</ div >
8
- < div class ="panel-body ">
9
- < fieldset class ="form-group ">
10
- < p class ="muted "> If checked, never be notified of anything.</ p >
11
- < label for ="disable ">
12
- < input type ="checkbox " name ="disable " id ="disable " value ="true " @if(disableEmail){checked} />
13
- Disable
14
- </ label >
15
- </ fieldset >
6
+ @gitbucket.core.helper.html.information(info)
7
+ < form action ="@helpers.url(account.userName)/_notifications " method ="POST ">
8
+ < div class ="panel panel-default ">
9
+ < div class ="panel-heading strong "> Email notification preferences</ div >
10
+ < div class ="panel-body ">
11
+ < fieldset class ="form-group ">
12
+ < label for ="disable " class ="checkbox ">
13
+ < input type ="checkbox " name ="disable " id ="disable " value ="true " @if(disableEmail){checked} />
14
+ Disable
15
+ < div class ="normal muted "> If checked, never be notified of anything.</ div >
16
+ </ label >
17
+ </ fieldset >
18
+ </ div >
16
19
</ div >
17
- </ div >
20
+ < div >
21
+ < input type ="submit " class ="btn btn-success " value ="Save ">
22
+ </ div >
23
+ </ form >
18
24
}
19
25
}
20
- < script >
21
- $ ( function ( ) {
22
- $ ( '#disable' ) . click ( function ( ) {
23
- $ . post ( '@context.path/@account.userName/_notifications' , { 'disable' : this . checked } ) ;
24
- } ) ;
25
- } ) ;
26
- </ script >
0 commit comments