Skip to content

Commit 7d4a324

Browse files
authored
Merge pull request #1 from CachetHQ/2.4
Update from upstream repo CachetHQ/Cachet
2 parents 197493b + 7cfcf5e commit 7d4a324

File tree

12 files changed

+55
-15
lines changed

12 files changed

+55
-15
lines changed

app/Bus/Commands/User/InviteUserCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class InviteUserCommand
3131
* @var string[]
3232
*/
3333
public $rules = [
34-
'emails' => 'required|array|email',
34+
'emails.*' => 'required|email',
3535
];
3636

3737
/**

app/Composers/AppComposer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function compose(View $view)
8181
$view->withAutomaticLocalization($this->config->get('setting.automatic_localization'));
8282
$view->withEnableExternalDependencies($this->config->get('setting.enable_external_dependencies'));
8383
$view->withShowTimezone($this->config->get('setting.show_timezone'));
84+
$view->withAppRefreshRate($this->config->get('setting.app_refresh_rate'));
8485
$view->withTimezone($this->dates->getTimezone());
8586
$view->withSiteTitle($this->config->get('setting.app_name'));
8687
$view->withFontSubset($this->config->get('langs.'.$this->config->get('app.locale').'.subset', 'latin'));

app/Console/Commands/DemoSeederCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ protected function seedSettings()
393393
], [
394394
'key' => 'app_incident_days',
395395
'value' => '7',
396+
], [
397+
'key' => 'app_refresh_rate',
398+
'value' => '0',
396399
], [
397400
'key' => 'app_analytics',
398401
'value' => 'UA-58442674-3',

database/factories/ModelFactory.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@
106106
];
107107
});
108108

109+
$factory->define(Setting::class, function ($faker) {
110+
return [
111+
'name' => 'app_refresh_rate',
112+
'value' => '0',
113+
];
114+
});
115+
109116
$factory->define(Subscriber::class, function ($faker) {
110117
return [
111118
'email' => $faker->safeEmail,

resources/lang/en-US/forms.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
'display-graphs' => 'Display graphs on status page?',
152152
'about-this-page' => 'About this page',
153153
'days-of-incidents' => 'How many days of incidents to show?',
154+
'time_before_refresh' => 'Status page refresh rate (in seconds).',
154155
'banner' => 'Banner Image',
155156
'banner-help' => "It's recommended that you upload files no bigger than 930px wide .",
156157
'subscribers' => 'Allow people to signup to email notifications?',

resources/lang/en/dashboard.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,15 @@
147147
],
148148
// Subscribers
149149
'subscribers' => [
150-
'subscribers' => 'Subscribers',
151-
'description' => 'Subscribers will receive email updates when incidents are created or components are updated.',
152-
'verified' => 'Verified',
153-
'not_verified' => 'Not verified',
154-
'subscriber' => ':email, subscribed :date',
155-
'no_subscriptions' => 'Subscribed to all updates',
156-
'global' => 'Globally subscribed',
157-
'add' => [
150+
'subscribers' => 'Subscribers',
151+
'description' => 'Subscribers will receive email updates when incidents are created or components are updated.',
152+
'description_disabled' => 'To use this feature, you need allow people to signup for notifications.',
153+
'verified' => 'Verified',
154+
'not_verified' => 'Not verified',
155+
'subscriber' => ':email, subscribed :date',
156+
'no_subscriptions' => 'Subscribed to all updates',
157+
'global' => 'Globally subscribed',
158+
'add' => [
158159
'title' => 'Add a new subscriber',
159160
'success' => 'Subscriber has been added!',
160161
'failure' => 'Something went wrong adding the subscriber, please try again.',

resources/lang/en/forms.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
'display-graphs' => 'Display graphs on status page?',
152152
'about-this-page' => 'About this page',
153153
'days-of-incidents' => 'How many days of incidents to show?',
154+
'time_before_refresh' => 'Status page refresh rate (in seconds).',
154155
'banner' => 'Banner Image',
155156
'banner-help' => "It's recommended that you upload files no bigger than 930px wide .",
156157
'subscribers' => 'Allow people to signup to email notifications?',

resources/views/dashboard/settings/app-setup.blade.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@
4949
</div>
5050
</div>
5151
</div>
52+
<div class="row">
53+
<div class="col-xs-12">
54+
<div class="form-group">
55+
<label>{{ trans('forms.settings.app-setup.time_before_refresh') }}</label>
56+
<input type="number" name="app_refresh_rate" class="form-control" value="{{ Config::get('setting.app_refresh_rate', 0) }}" placeholder="{{ trans('forms.settings.app-setup.time_before_refresh') }}">
57+
</div>
58+
</div>
59+
</div>
5260
<div class="row">
5361
<div class="col-xs-12">
5462
<div class="checkbox">

resources/views/dashboard/subscribers/index.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
<div class="content-wrapper header-fixed">
1919
<div class="row">
2020
<div class="col-sm-12">
21-
<p class="lead">{{ trans('dashboard.subscribers.description') }}</p>
21+
<p class="lead">
22+
@if($enable_subscribers)
23+
{{ trans('dashboard.subscribers.description') }}
24+
@else
25+
{{ trans('dashboard.subscribers.description_disabled') }}
26+
@endif
27+
</p>
2228

2329
<div class="striped-list">
2430
@foreach($subscribers as $subscriber)

resources/views/dashboard/team/invite.blade.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
<fieldset>
1919
<div class="form-group">
2020
<label>{{ trans('forms.user.team.description') }}</label>
21-
<input type="email" class="form-control" name="emails[]" placeholder="{{ trans('forms.user.team.email', ['id' => 1]) }}" required>
21+
<input type="email" class="form-control" name="emails[]" value="{{ Binput::old('emails')[0] }}" placeholder="{{ trans('forms.user.team.email', ['id' => 1]) }}" required>
2222
</div>
2323
<div class="form-group">
24-
<input type="email" class="form-control" name="emails[]" placeholder="{{ trans('forms.user.team.email', ['id' => 2]) }}">
24+
<input type="email" class="form-control" name="emails[]" value="{{ Binput::old('emails')[1] }}" placeholder="{{ trans('forms.user.team.email', ['id' => 2]) }}">
2525
</div>
2626
<div class="form-group">
27-
<input type="email" class="form-control" name="emails[]" placeholder="{{ trans('forms.user.team.email', ['id' => 3]) }}">
27+
<input type="email" class="form-control" name="emails[]" value="{{ Binput::old('emails')[2] }}" placeholder="{{ trans('forms.user.team.email', ['id' => 3]) }}">
2828
</div>
2929
<div class="form-group">
30-
<input type="email" class="form-control" name="emails[]" placeholder="{{ trans('forms.user.team.email', ['id' => 4]) }}">
30+
<input type="email" class="form-control" name="emails[]" value="{{ Binput::old('emails')[3] }}" placeholder="{{ trans('forms.user.team.email', ['id' => 4]) }}">
3131
</div>
3232
<div class="form-group">
33-
<input type="email" class="form-control" name="emails[]" placeholder="{{ trans('forms.user.team.email', ['id' => 5]) }}">
33+
<input type="email" class="form-control" name="emails[]" value="{{ Binput::old('emails')[4] }}" placeholder="{{ trans('forms.user.team.email', ['id' => 5]) }}">
3434
</div>
3535
</fieldset>
3636

0 commit comments

Comments
 (0)