@if($poll->image_path!='')<img src="{{$poll->image_path}}" id="poll_img" class="img-responsive">@endif
<!-- Form Name -->
{{Form::open(array('url'=>'/admin/update-poll',
                    'class'=>'form-horizontal',
                    'id'=>'update_poll_form',
                    'method'=>'POST'
                    ))}}

{{Form::hidden('image_name',$poll->image_path,array('id'=>'file_name'))}}
{{Form::hidden('poll_id',$poll->poll_id,array('id'=>''))}}
<div class="control-group">
    <label class="control-label" for="textinput"> Poll :</label>
    <div class="controls">
        {{Form::text('poll_text',$poll->poll_text,array('id'=>'poll_text','class'=>'form-control input-sm','placeholder'=>'Poll text'))}}
    </div>
</div>
<div class="clearfix">&nbsp;</div>
<div class="row">
    <div class="col-lg-6">
        <div class="input-group date form_datetime" data-date="{{date('Y-m-d H:i:s')}}" data-date-format="dd MM yyyy - HH:ii p" data-link-field="dtp_input3">
            <input class="form-control input-sm" size="16" name="voting_last_date" type="text" readonly="" placeholder="Voting last date" value="{{$poll->voting_last_date}}">
            <span class="input-group-addon input-sm"><span class="glyphicon glyphicon-calendar"></span></span>
        </div>
        <input type="hidden" id="dtp_input3" name="voting_last_date" value="">
    </div>
    <div class="col-lg-3"><a data-toggle="tooltip" data-placement="bottom" title="Add image" class="btn btn-sm btn-info" href="javascript:void(0)" id="update-media"> <i class="fa fa-image"></i> </a></div>
    <div class="visible-sm visible-md">&nbsp; &nbsp;</div>
    <div class="col-lg-3">
        <div class="control-group">
            <div class="controls">
                {{Form::button('<i class="fa fa-edit"></i> Add Option',array('class'=>'btn btn-warning btn-sm btn-block','id'=>'add_poll_opt','type'=>'button'))}}
            </div>
        </div>
    </div>
</div>
<div class="clearfix optn-rmv">&nbsp;</div>
@foreach($poll_options as $op)
<div class="input-group optn-rmv">
    {{Form::text('option_text[]',$op->poll_option_text,array('class'=>'form-control input-sm opt','placeholder'=>'Poll Option'))}}
    <span class="input-group-addon btn">

    </span>
</div><!-- /input-group -->
<div class="clearfix optn-rmv">&nbsp;</div>
@endforeach

<!-- /input-group -->
<div class="clearfix poll-append">&nbsp;</div>
<!-- Button -->
<div class="control-group">
    <label>{{Form::checkbox('is_featured')}} Featured to Home page  &nbsp; &nbsp; &nbsp;  </label>
</div>

<div class="control-group">
    <label class="control-label" for="singlebutton"></label>
    <div class="controls hidden-xs hidden-sm">
        {{Form::button('Reset',array('class'=>'btn btn-default btn-sm','type'=>'reset','id'=>'reset_poll_form'))}}
        {{Form::button('<i class="fa fa-save"></i> Update poll',array('name'=>'edit_poll','id'=>'edit_poll','class'=>'edit_poll btn btn-info btn-sm','type'=>'button' ))}}
        <span class="poll-loader"></span>
    </div>
    <div class="controls visible-sm visible-xs">
        {{Form::button('Reset',array('class'=>'btn btn-default btn-sm visible-sm visible-xs btn-block','type'=>'reset','id'=>'reset_poll_form'))}}
        <div class="clearfix">&nbsp;</div>
        {{Form::button('<i class="fa fa-save"></i> Update Poll',array('name'=>'update_poll','id'=>'update_poll','class'=>'save_poll btn btn-info btn-sm visible-sm visible-xs btn-block','type'=>'button' ))}}
        <span class="poll-loader"></span>
    </div>
</div>
{{Form::close()}}
<!--//  End form -->
<script>

</script>
