mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-18 05:58:18 +01:00
Save a SEO title and description when creating an incident
This commit is contained in:
parent
0fcd939f50
commit
129030daaf
@ -104,6 +104,10 @@ class CreateIncidentCommandHandler
|
|||||||
// Store any meta?
|
// Store any meta?
|
||||||
if ($meta = $command->meta) {
|
if ($meta = $command->meta) {
|
||||||
foreach ($meta as $key => $value) {
|
foreach ($meta as $key => $value) {
|
||||||
|
if (empty($value)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Meta::create([
|
Meta::create([
|
||||||
'key' => $key,
|
'key' => $key,
|
||||||
'value' => $value,
|
'value' => $value,
|
||||||
|
@ -131,7 +131,8 @@ class IncidentController extends Controller
|
|||||||
Binput::get('stickied', false),
|
Binput::get('stickied', false),
|
||||||
Binput::get('occurred_at'),
|
Binput::get('occurred_at'),
|
||||||
null,
|
null,
|
||||||
[]
|
[],
|
||||||
|
['seo' => Binput::get('seo', [])]
|
||||||
));
|
));
|
||||||
} catch (ValidationException $e) {
|
} catch (ValidationException $e) {
|
||||||
return cachet_redirect('dashboard.incidents.create')
|
return cachet_redirect('dashboard.incidents.create')
|
||||||
|
@ -129,6 +129,14 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.seo.title') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
|
||||||
|
<input type="text" name="seo[title]" class="form-control" placeholder="{{ trans('forms.optional') }}">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{{ trans('forms.seo.description') }}</label> <small class="text-muted">{{ trans('forms.optional') }}</small>
|
||||||
|
<input type="text" name="seo[description]" class="form-control" placeholder="{{ trans('forms.optional') }}">
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user