mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Fix all test channels for user and owner.
This commit is contained in:
		| @@ -307,13 +307,33 @@ | ||||
|                                     {# view range #} | ||||
|                                     <div class="preferences-box"> | ||||
|                                         <h3>{{ 'pref_notifications'|_ }}</h3> | ||||
|                                         <p class="text-info">{{ 'pref_notifications_help'|_ }}</p> | ||||
|                                         <p> | ||||
|                                             {{ 'available_channels_expl'|_ }} | ||||
|                                         </p> | ||||
|                                         <ul> | ||||
|                                             {% for name,info in channels %} | ||||
|                                                 <li> | ||||
|                                                     {% if true == info.enabled and true == forcedAvailability[name] %} | ||||
|                                                         ☑️ {{ trans('firefly.notification_channel_name_'~name) }} | ||||
|                                                         {% if 0 == info.ui_configurable %}({{ 'configure_channel_in_env'|_ }}) {% endif %} | ||||
|                                                     {% endif %} | ||||
|                                                     {% if false == info.enabled or false == forcedAvailability[name] %} | ||||
|                                                         ⚠️ {{ trans('firefly.notification_channel_name_'~name) }} ({{ 'channel_not_available'|_ }}) | ||||
|                                                     {% endif %} | ||||
|                                                 </li> | ||||
|                                             {% endfor %} | ||||
|                                         </ul> | ||||
|                                         <p>{{ 'pref_notifications_help'|_ }}</p> | ||||
|                                         {% for id, info in notifications %} | ||||
|                                             <div class="form-group"> | ||||
|                                                 <div class="col-sm-10"> | ||||
|                                                     <div class="checkbox"> | ||||
|                                                         <label> | ||||
|                                                             <input {% if not info.configurable %}disabled{% endif %} type="checkbox" name="notification_{{ id }}" {{ info.enabled == true ? 'checked' : '' }} value="1"> | ||||
|                                                             {% if info.configurable %} | ||||
|                                                             <input {% if not info.configurable %}readonly{% endif %} type="checkbox" name="notification_{{ id }}" {{ info.enabled == true ? 'checked' : '' }} value="1"> | ||||
|                                                             {% else %} | ||||
|                                                                 <input readonly disabled type="checkbox" checked value="1"> | ||||
|                                                             {% endif %} | ||||
|                                                             {{ trans('firefly.pref_notification_' ~ id) }} | ||||
|                                                         </label> | ||||
|                                                     </div> | ||||
| @@ -325,8 +345,8 @@ | ||||
|                                 <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12"> | ||||
|                                     <div class="preferences-box"> | ||||
|                                         <h3>{{ 'pref_notifications_settings'|_ }}</h3> | ||||
|                                         <p class="text-info">{{ 'pref_notifications_settings_help'|_ }}</p> | ||||
|                                         {{ ExpandedForm.text('slackUrl',slackUrl,{'label' : 'slack_url_label'|_, helpText: 'slack_discord_double'|_}) }} | ||||
|                                         <p>{{ 'pref_notifications_settings_help'|_ }}</p> | ||||
|                                         {{ ExpandedForm.text('slack_webhook_url',slackUrl,{'label' : 'slack_url_label'|_, helpText: 'slack_discord_double'|_}) }} | ||||
|  | ||||
|                                         {{ ExpandedForm.text('pushover_app_token', pushoverAppToken, {}) }} | ||||
|                                         {{ ExpandedForm.text('pushover_user_token', pushoverUserToken, {}) }} | ||||
| @@ -336,7 +356,18 @@ | ||||
|                                         {{ ExpandedForm.checkbox('ntfy_auth','1', ntfyAuth, {}) }} | ||||
|                                         {{ ExpandedForm.text('ntfy_user', ntfyUser, {}) }} | ||||
|                                         {{ ExpandedForm.passwordWithValue('ntfy_pass', ntfyPass, {}) }} | ||||
|  | ||||
|                                         <p> | ||||
|                                         {{ 'pref_notifications_settings_help'|_ }} | ||||
|                                         </p> | ||||
|                                             <div class="btn-group"> | ||||
|                                                 {% for name,info in channels %} | ||||
|                                                     {% if true == info.enabled and true == forcedAvailability[name] %} | ||||
|                                                         <a href="#" data-channel="{{ name }}" class="btn btn-default submit-test"> | ||||
|                                                             {{ trans('firefly.test_notification_channel_name_'~name) }} | ||||
|                                                         </a> | ||||
|                                                     {% endif %} | ||||
|                                                 {% endfor %} | ||||
|                                             </div> | ||||
|                                     </div> | ||||
|                                 </div> | ||||
|                             </div> | ||||
| @@ -349,7 +380,7 @@ | ||||
|             <div class="col-lg-12 col-md-12 col-sm-12"> | ||||
|                 <div class="form-group"> | ||||
|                     <div class="col-sm-12"> | ||||
|                         <button type="submit" class="btn btn-success btn-lg">{{ 'pref_save_settings'|_ }}</button> | ||||
|                         <button type="submit" name="form_submit" value="form_submit" class="btn btn-success btn-lg">{{ 'pref_save_settings'|_ }}</button> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
| @@ -357,6 +388,9 @@ | ||||
|     </form> | ||||
| {% endblock %} | ||||
| {% block scripts %} | ||||
|     <script type="text/javascript" nonce="{{ JS_NONCE }}"> | ||||
|         var postUrl = "{{ route('preferences.test-notification') }}"; | ||||
|     </script> | ||||
|     <script type="text/javascript" src="v1/js/lib/modernizr-custom.js?v={{ FF_VERSION }}" | ||||
|             nonce="{{ JS_NONCE }}"></script> | ||||
|     <script type="text/javascript" src="v1/js/lib/jquery-ui.min.js?v={{ FF_VERSION }}" nonce="{{ JS_NONCE }}"></script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user