forked from akiyamaSM/larapoll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,55 @@ | ||
<div class="container"> | ||
{{ $poll->question }} | ||
@foreach($poll->options as $option) | ||
<h3>{{ $option->name }}</h3> | ||
@endforeach | ||
</div> | ||
@extends('larapoll::layouts.app') | ||
@section('title') | ||
Polls- Edit | ||
@endsection | ||
@section('content') | ||
<div class="container"> | ||
<ol class="breadcrumb"> | ||
<li><a href="#">Home</a></li> | ||
<li><a href="#">Polls</a></li> | ||
<li class="active">Edit Poll</li> | ||
</ol> | ||
<div class="well col-md-8 col-md-offset-2"> | ||
@if($errors->any()) | ||
<ul class="alert alert-danger"> | ||
@foreach($errors->all() as $error) | ||
<li>{{ $error }}</li> | ||
@endforeach | ||
</ul> | ||
@endif | ||
<form method="POST" action=" {{ route('poll.update', $poll->id) }}"> | ||
{{ csrf_field() }} | ||
<!-- Question Input --> | ||
<div class="form-group"> | ||
<label>{{ $poll->question }}</label> | ||
</div> | ||
<ul class="options"> | ||
@foreach($poll->options as $option) | ||
<li>{{ $option->name }}</li> | ||
@endforeach | ||
</ul> | ||
|
||
@php | ||
$maxCheck = $poll->maxCheck; | ||
$count_options = $poll->optionsNumber() | ||
@endphp | ||
<select name="count_check" class="form-control"> | ||
@for($i =1; $i<= $count_options; $i++) | ||
<option {{ $i==$maxCheck? 'selected':'' }} >{{ $i }}</option> | ||
@endfor | ||
</select> | ||
|
||
<div class="radio"> | ||
<label> | ||
<input type="checkbox" name="close" {{ $poll->isLocked()? 'checked':'' }}> Close | ||
</label> | ||
</div> | ||
|
||
<!-- Create Form Submit --> | ||
<div class="form-group"> | ||
<input name="update" type="submit" value="Update" class="btn btn-primary form-control"/> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters