2014-12-20 20:28:58 +00:00
|
|
|
@extends('layout.dashboard')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="header">
|
2014-12-29 10:15:25 -06:00
|
|
|
<i class="fa fa-list-ul"></i> {{ Lang::get('cachet.dashboard.components') }} > <small>Edit component</small>
|
2014-12-20 20:28:58 +00:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
@if($savedComponent = Session::get('savedComponent'))
|
|
|
|
<div class='alert alert-{{ $savedComponent->isValid() ? "success" : "danger" }}'>
|
|
|
|
@if($savedComponent->isValid())
|
|
|
|
<strong>Awesome.</strong> Component updated.
|
|
|
|
@else
|
|
|
|
<strong>Whoops.</strong> Something went wrong with the component. {{ $savedComponent->getErrors() }}
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<form name='EditComponentForm' class='form-vertical' role='form' action='/dashboard/components/{{ $component->id }}/edit' method='POST'>
|
|
|
|
<fieldset>
|
|
|
|
<div class='form-group'>
|
2014-12-22 12:49:47 +00:00
|
|
|
<label for='incident-name'>Name</label>
|
2014-12-20 20:28:58 +00:00
|
|
|
<input type='text' class='form-control' name='component[name]' id='component-name' required value='{{ $component->name }}' />
|
|
|
|
</div>
|
2014-12-22 12:49:47 +00:00
|
|
|
<div class='form-group'>
|
|
|
|
<label for='component-status'>Status</label>
|
|
|
|
<select name='component[status]' class='form-control'>
|
|
|
|
@foreach(Lang::get('cachet.component.status') as $statusID => $status)
|
|
|
|
<option value='{{ $statusID }}' {{ $statusID === $component->status ? "selected" : "" }}>{{ $status }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
</div>
|
2014-12-20 20:28:58 +00:00
|
|
|
<div class='form-group'>
|
|
|
|
<label>Description</label>
|
|
|
|
<textarea name='component[description]' class='form-control' rows='5'>{{ $component->description }}</textarea>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Save Component</button>
|
|
|
|
<input type='hidden' name='component[user_id]' value='{{ $component->agent_id || Auth::user()->id }}' />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@stop
|