snipe-it/resources/views/settings/alerts.blade.php

173 lines
8.6 KiB
PHP
Raw Normal View History

2017-07-07 23:44:48 -07:00
@extends('layouts/default')
{{-- Page title --}}
@section('title')
{{ trans('admin/settings/general.alert_title') }}
2017-07-07 23:44:48 -07:00
@parent
@stop
@section('header_right')
2020-04-01 03:21:15 -07:00
<a href="{{ route('settings.index') }}" class="btn btn-primary"> {{ trans('general.back') }}</a>
2017-07-07 23:44:48 -07:00
@stop
{{-- Page content --}}
@section('content')
<style>
.checkbox label {
padding-right: 40px;
}
</style>
{{ Form::open(['method' => 'POST', 'files' => false, 'autocomplete' => 'off', 'class' => 'form-horizontal', 'role' => 'form' ]) }}
2017-07-07 23:44:48 -07:00
<!-- CSRF Token -->
{{csrf_field()}}
<div class="row">
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
<div class="panel box box-default">
<div class="box-header with-border">
2020-04-01 03:21:15 -07:00
<h2 class="box-title">
<i class="fas fa-bell"></i> {{ trans('admin/settings/general.alerts') }}
2020-04-01 03:21:15 -07:00
</h2>
2017-07-07 23:44:48 -07:00
</div>
<div class="box-body">
<div class="col-md-11 col-md-offset-1">
<!-- Alerts Enabled -->
<div class="form-group {{ $errors->has('alerts_enabled') ? 'error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('alerts_enabled', '1', old('alerts_enabled', $setting->alerts_enabled)) }}
{{ trans('admin/settings/general.alerts_enabled') }}
</label>
</div>
</div>
<!-- Menu Alerts Enabled -->
<div class="form-group {{ $errors->has('show_alerts_in_menu') ? 'error' : '' }}">
<div class="col-md-9 col-md-offset-3">
<label class="form-control">
{{ Form::checkbox('show_alerts_in_menu', '1', old('show_alerts_in_menu', $setting->show_alerts_in_menu)) }}
{{ trans('admin/settings/general.show_alerts_in_menu') }}
</label>
2017-07-07 23:44:48 -07:00
</div>
</div>
<!-- Alert Email -->
<div class="form-group {{ $errors->has('alert_email') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('alert_email', trans('admin/settings/general.alert_email')) }}
</div>
<div class="col-md-7">
2020-04-21 03:58:31 -07:00
{{ Form::text('alert_email', old('alert_email', $setting->alert_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com')) }}
2020-04-01 03:21:15 -07:00
{!! $errors->first('alert_email', '<span class="alert-msg" aria-hidden="true">:message</span><br>') !!}
2017-07-07 23:44:48 -07:00
<p class="help-block">{{ trans('admin/settings/general.alert_email_help') }}</p>
2017-07-07 23:44:48 -07:00
</div>
</div>
Notification improvements (#5254) * Added “show fields in email” to custom fields * Added “show images in email” to settings * Added nicer HTML emails * Break notifications out into their own, instead of trying to mash them all together * Remove old notification for accessory checkout * Janky fix for #5076 - “The asset you have attempted to accept was not checked out to you” * Add method for image url for accessories * Added accessory checkout email blade * Make accessory email notification on checkout screen consistent with assets * Added native consumables notifications * Fixes for asset notification * Updated notification blades with correct-er fields * Updated notifications * License checkin notification - does not work yet Need to figure out whether the license seat is assigned to a person or an asset before we can pass the target * Added alternate “cc” email for admins * Only try to trigger notifications if the target is a user * Fix tests * Fixed consumable URL * Removed unused notification * Pass target type in params * Show slack status * Pass additional parameters There is a logic bug in this :( Will send to slack twice, since the admin CC and the user are both using the same notification. Fuckity fuck fuck fuck. * Pass a variable to the notification to supress the duplicate slack message * Slack is broken :( Trying to fix Will try a git bisect * Put preview back into checkout * Pulled old archaic mail * Removed debugging * Fixed wrong email title * Fixed slack endpoint not firing * Poobot, we hardly knew ye. * Removed old, manual mail from API * Typo :-/ * Code cleanup * Use defined formatted date in JSON * Use static properties for checkin/checkout notifiers for cleaner code * Removed debugging * Use date formatter * Fixed target_type * Fixed language in consumable email
2018-03-25 13:46:57 -07:00
<!-- Admin CC Email -->
<div class="form-group {{ $errors->has('admin_cc_email') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('admin_cc_email', trans('admin/settings/general.admin_cc_email')) }}
</div>
<div class="col-md-7">
2020-04-21 03:58:31 -07:00
{{ Form::text('admin_cc_email', old('admin_cc_email', $setting->admin_cc_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com')) }}
2020-04-01 03:21:15 -07:00
{!! $errors->first('admin_cc_email', '<span class="alert-msg" aria-hidden="true">:message</span><br>') !!}
Notification improvements (#5254) * Added “show fields in email” to custom fields * Added “show images in email” to settings * Added nicer HTML emails * Break notifications out into their own, instead of trying to mash them all together * Remove old notification for accessory checkout * Janky fix for #5076 - “The asset you have attempted to accept was not checked out to you” * Add method for image url for accessories * Added accessory checkout email blade * Make accessory email notification on checkout screen consistent with assets * Added native consumables notifications * Fixes for asset notification * Updated notification blades with correct-er fields * Updated notifications * License checkin notification - does not work yet Need to figure out whether the license seat is assigned to a person or an asset before we can pass the target * Added alternate “cc” email for admins * Only try to trigger notifications if the target is a user * Fix tests * Fixed consumable URL * Removed unused notification * Pass target type in params * Show slack status * Pass additional parameters There is a logic bug in this :( Will send to slack twice, since the admin CC and the user are both using the same notification. Fuckity fuck fuck fuck. * Pass a variable to the notification to supress the duplicate slack message * Slack is broken :( Trying to fix Will try a git bisect * Put preview back into checkout * Pulled old archaic mail * Removed debugging * Fixed wrong email title * Fixed slack endpoint not firing * Poobot, we hardly knew ye. * Removed old, manual mail from API * Typo :-/ * Code cleanup * Use defined formatted date in JSON * Use static properties for checkin/checkout notifiers for cleaner code * Removed debugging * Use date formatter * Fixed target_type * Fixed language in consumable email
2018-03-25 13:46:57 -07:00
<p class="help-block">{{ trans('admin/settings/general.admin_cc_email_help') }}</p>
</div>
</div>
2017-07-07 23:44:48 -07:00
<!-- Alert interval -->
<div class="form-group {{ $errors->has('alert_interval') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('alert_interval', trans('admin/settings/general.alert_interval')) }}
</div>
<div class="col-md-9">
2020-04-21 03:58:31 -07:00
{{ Form::text('alert_interval', old('alert_interval', $setting->alert_interval), array('class' => 'form-control','placeholder' => '30', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
2020-04-01 03:21:15 -07:00
{!! $errors->first('alert_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
2017-07-07 23:44:48 -07:00
</div>
</div>
<!-- Alert threshold -->
<div class="form-group {{ $errors->has('alert_threshold') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('alert_threshold', trans('admin/settings/general.alert_inv_threshold')) }}
</div>
<div class="col-md-9">
2020-04-21 03:58:31 -07:00
{{ Form::text('alert_threshold', old('alert_threshold', $setting->alert_threshold), array('class' => 'form-control','placeholder' => '5', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
2020-04-01 03:21:15 -07:00
{!! $errors->first('alert_threshold', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
2017-07-07 23:44:48 -07:00
</div>
</div>
2017-08-25 18:40:20 -07:00
<!-- Alert interval -->
<div class="form-group {{ $errors->has('audit_interval') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('audit_interval', trans('admin/settings/general.audit_interval')) }}
</div>
<div class="input-group col-md-2">
{{ Form::text('audit_interval', old('audit_interval', $setting->audit_interval), array('class' => 'form-control','placeholder' => '12', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
2017-08-25 18:40:20 -07:00
<span class="input-group-addon">{{ trans('general.months') }}</span>
</div>
<div class="col-md-9 col-md-offset-3">
2020-04-01 03:21:15 -07:00
{!! $errors->first('audit_interval', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
2017-08-25 18:40:20 -07:00
<p class="help-block">{{ trans('admin/settings/general.audit_interval_help') }}</p>
</div>
</div>
<!-- Alert threshold -->
<div class="form-group {{ $errors->has('audit_warning_days') ? 'error' : '' }}">
<div class="col-md-3">
{{ Form::label('audit_warning_days', trans('admin/settings/general.audit_warning_days')) }}
</div>
<div class="input-group col-md-2">
{{ Form::text('audit_warning_days', old('audit_warning_days', $setting->audit_warning_days), array('class' => 'form-control','placeholder' => '14', 'maxlength'=>'3', 'style'=>'width: 60px;')) }}
2017-08-25 18:40:20 -07:00
<span class="input-group-addon">{{ trans('general.days') }}</span>
</div>
<div class="col-md-9 col-md-offset-3">
2020-04-01 03:21:15 -07:00
{!! $errors->first('audit_warning_days', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
2017-08-25 18:40:20 -07:00
<p class="help-block">{{ trans('admin/settings/general.audit_warning_days_help') }}</p>
</div>
</div>
2017-07-07 23:44:48 -07:00
</div>
</div> <!--/.box-body-->
<div class="box-footer">
<div class="text-left col-md-6">
<a class="btn btn-link text-left" href="{{ route('settings.index') }}">{{ trans('button.cancel') }}</a>
</div>
<div class="text-right col-md-6">
<button type="submit" class="btn btn-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
2017-07-07 23:44:48 -07:00
</div>
</div>
</div> <!-- /box -->
</div> <!-- /.col-md-8-->
</div> <!-- /.row-->
{{Form::close()}}
@stop