confirmation dialog and user wasn't getting saved #52

This commit is contained in:
Nabeel Shahzad
2018-01-08 16:35:52 -06:00
parent 6b265ed67b
commit 4eb5aeebed
4 changed files with 10 additions and 5 deletions
+1
View File
@@ -100,6 +100,7 @@ news:
the release of Letraset sheets containing Lorem Ipsum passages, the release of Letraset sheets containing Lorem Ipsum passages,
and more recently with desktop publishing software like and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum. Aldus PageMaker including versions of Lorem Ipsum.
created_at: now
airports: airports:
- id: KAUS - id: KAUS
@@ -46,7 +46,7 @@ class DashboardController extends BaseController
$attrs = $request->post(); $attrs = $request->post();
$attrs['user_id'] = Auth::user()->id; $attrs['user_id'] = Auth::user()->id;
$this->newsRepo->create($request->post()); $this->newsRepo->create($attrs);
} elseif ($request->isMethod('delete')) { } elseif ($request->isMethod('delete')) {
$news_id = $request->input('news_id'); $news_id = $request->input('news_id');
$this->newsRepo->delete($news_id); $this->newsRepo->delete($news_id);
@@ -23,7 +23,9 @@
{!! {!!
Form::button('delete', Form::button('delete',
['type' => 'submit', ['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small']) 'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
!!} !!}
{!! Form::close() !!} {!! Form::close() !!}
@@ -22,7 +22,9 @@
'method' => 'delete', 'class' => 'pjax_form form-inline']) !!} 'method' => 'delete', 'class' => 'pjax_form form-inline']) !!}
{!! Form::hidden('comment_id', $comment->id) !!} {!! Form::hidden('comment_id', $comment->id) !!}
{!! Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', {!! Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
'class' => 'btn btn-danger btn-small']) !!} 'class' => 'btn btn-danger btn-small',
'onclick' => "return confirm('Are you sure?')",
]) !!}
{!! Form::close() !!} {!! Form::close() !!}
</td> </td>
</tr> </tr>
@@ -31,8 +33,8 @@
</table> </table>
<hr/> <hr/>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-sm-12">
<div class="input-group input-group-lg pull-right"> <div class="text-right">
{!! Form::open(['url' => url('/admin/pireps/'.$pirep->id.'/comments'), {!! Form::open(['url' => url('/admin/pireps/'.$pirep->id.'/comments'),
'method' => 'post', 'class' => 'pjax_form form-inline']) !!} 'method' => 'post', 'class' => 'pjax_form form-inline']) !!}
{!! Form::input('text', 'comment', null, ['class' => 'form-control input-sm']) !!} {!! Form::input('text', 'comment', null, ['class' => 'form-control input-sm']) !!}