|
12 | 12 | <li class="dropdown">
|
13 | 13 | <a href="#" class="dropdown-toggle" data-toggle="dropdown">{% verbatim %}{{ CurrentUser.Name }} {% endverbatim %} <span class="caret"></span></a>
|
14 | 14 | <ul class="dropdown-menu" role="menu">
|
15 |
| - <li><a href="#">Change notifications settings</a></li> |
| 15 | + <li><a href="#" data-toggle="modal" data-target="#changeNotificationsSettings">Change notifications settings</a></li> |
16 | 16 | <li class="divider"></li>
|
17 | 17 | <li><a href="#" data-toggle="modal" data-target="#changePassword">Change password</a></li>
|
18 | 18 | </ul>
|
@@ -52,3 +52,75 @@ <h4 class="modal-title">Change password</h4>
|
52 | 52 | </form>
|
53 | 53 | </div>
|
54 | 54 | </div>
|
| 55 | + |
| 56 | +<div class="modal fade" id="changeNotificationsSettings" tabindex="-1" role="dialog"> |
| 57 | + <div class="modal-dialog" role="document"> |
| 58 | + <form method="post" action="/notifications/update-method/"> |
| 59 | + <div class="modal-content"> |
| 60 | + <div class="modal-header"> |
| 61 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 62 | + <h4 class="modal-title">Change notifications settings</h4> |
| 63 | + </div> |
| 64 | + <div class="modal-body"> |
| 65 | + <div class="input-group"> |
| 66 | + <div class="input-group-btn"> |
| 67 | + <select class="btn btn-default dropdown-toggle" style="height: 34px" name="method"> |
| 68 | + <option value="none">none</option> |
| 69 | + <option value="none">email</option> |
| 70 | + <option value="none">telegram</option> |
| 71 | + </select> |
| 72 | + </div> |
| 73 | + <input type="text" name="identifier" class="form-control"> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + <div class="modal-footer"> |
| 77 | + <button type="button" class="btn btn-default" data-dismiss="modal">close</button> |
| 78 | + <button type="submit" class="btn btn-primary">change</button> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + </form> |
| 82 | + </div> |
| 83 | +</div> |
| 84 | + |
| 85 | +{% verbatim %} |
| 86 | +{% if CurrentUser.IsSuperuser %} |
| 87 | +<div class="modal fade" id="systemSettings" tabindex="-1" role="dialog"> |
| 88 | + <div class="modal-dialog" role="document"> |
| 89 | + <form method="post" action="/system/update-settings/"> |
| 90 | + <div class="modal-content"> |
| 91 | + <div class="modal-header"> |
| 92 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 93 | + <h4 class="modal-title">System settings</h4> |
| 94 | + </div> |
| 95 | + <div class="modal-body"> |
| 96 | + <div class="form-group"> |
| 97 | + <label for="message-text" class="control-label">app host:</label> |
| 98 | + <input type="text" name="app_host" data-title="Field is required" class="form-control" required> |
| 99 | + </div> |
| 100 | + <div class="form-group"> |
| 101 | + <label for="message-text" class="control-label">smtp address:</label> |
| 102 | + <input type="text" name="smtp_address" placeholder="host:port" class="form-control"> |
| 103 | + </div> |
| 104 | + <div class="form-group"> |
| 105 | + <label for="message-text" class="control-label">smtp username:</label> |
| 106 | + <input type="text" name="smtp_username" class="form-control"> |
| 107 | + </div> |
| 108 | + <div class="form-group"> |
| 109 | + <label for="message-text" class="control-label">smtp password:</label> |
| 110 | + <input type="password" name="smtp_password" class="form-control"> |
| 111 | + </div> |
| 112 | + <div class="form-group"> |
| 113 | + <label for="message-text" class="control-label">telegram token:</label> |
| 114 | + <input type="text" name="telegram_token" class="form-control"> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + <div class="modal-footer"> |
| 118 | + <button type="button" class="btn btn-default" data-dismiss="modal">close</button> |
| 119 | + <button type="submit" class="btn btn-primary">save</button> |
| 120 | + </div> |
| 121 | + </div> |
| 122 | + </form> |
| 123 | + </div> |
| 124 | +</div> |
| 125 | +{% endif %} |
| 126 | +{% endverbatim %} |
0 commit comments