<?php
/**
 * Created by PhpStorm.
 * User: betawaredino
 * Date: 06/09/2017
 * Time: 13:30
 */
//echo "<pre>";print_r($formData);exit;
$data = 0;
/*
@foreach($errors->all() as $error)
    <div>
        {{ $error}}
    </div>
@endforeach */
?>


            <?php echo Form::open(array('route' => 'postVolunteerRegistration', 'autocomplete' => 'off', 'role' => 'form', 'class' => 'form-container')); ?>

            <?php echo Form::hidden('id', isset($formData->id) ? $formData->id : null); ?>

            <?php echo Form::hidden('city', $city); ?>

            <div class="row">
                <div class="col s12">
                    <?php /* List subscribers for City */ ?>
                    <div class="push-subs widget-holder hoverable">
                        <div class="widget-heading">
                            <h2 class="widget-heading-thick">Opći podatci</h2>
                        </div>

                        <div class="widget-content">
                            <div class="inputs-wrapper">
                                <div class="vol-form-row">
                                    <div class="vol-form-inner">
                                        <div class="row">
                                            <div class="col s12">
                                                <h5 class="vol-title">Vrsta organizacije</h5>
                                                <p>
                                                    <?php echo Form::radio('organization_type', 1, isset($formData->organization_type)  ? $formData->organization_type == 1 ? true : false : true,["id"=>"test1","name"=>"group1"]); ?>

                                                    <label for="test1">Udruga</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('organization_type', 2, isset($formData->organization_type) ? $formData->organization_type == 2 ? true : false : false,["id"=>"test2","name"=>"group1"]); ?>

                                                    <label for="test2">Zaklada</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('organization_type', 3, isset( $formData->organization_type) ? $formData->organization_type == 3 ? true : false : false,["id"=>"test3","name"=>"group1"]); ?>

                                                    <label for="test3">Ustanova</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('organization_type', 4, isset( $formData->organization_type) ? $formData->organization_type == 4 ? true : false : false,["id"=>"test4","name"=>"group1"]); ?>

                                                    <label for="test4">Jedinica lokalne samouprave</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('organization_type', 5,  isset($formData->organization_type ) ? $formData->organization_type == 5 ? true : false : false,["id"=>"test5","name"=>"group1"]); ?>

                                                    <label for="test5">Jedinica regionalne samouprave</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('organization_type', 6,  isset($formData->organization_type ) ? $formData->organization_type == 6 ? true : false : false,["id"=>"test6","name"=>"group1"]); ?>

                                                    <label for="test6">Tijelo državne uprave</label>
                                                </p>

                                                <?php if(isset($errors) && ($errors->first('organization_type') != '' || $errors->first('organization_type') != null)): ?>
                                                    <p><small><?php echo $errors->first('organization_type'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="col s12 input-field">
                                                <label>Naziv organizacije:</label>
                                                <?php echo Form::text('organization_name',  isset($formData->organization_name) ? $formData->organization_name : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?>

                                                <?php if(isset($errors) && ($errors->first('organization_name') != '' || $errors->first('organization_name') != null)): ?>
                                                    <p><small><?php echo $errors->first('organization_name'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="col s12"><h5 class="vol-title">Adresa</h5></div>
                                            <div class="col s4 input-field">
                                                <label>Ulica i kućni br.</label>
                                                <?php echo Form::text('street', isset($formData->street) ? $formData->street : null, array('id' => 'ulica_kucnibr', 'class' => 'form-control', 'required')); ?>

                                                <?php if(isset($errors) && ($errors->first('street') != '' || $errors->first('street') != null)): ?>
                                                    <p><small><?php echo $errors->first('street'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                            <div class="col s4 input-field"> <label>Poštanski br.</label> <?php echo Form::text('postal_num',isset($formData->postal_num) ? $formData->postal_num : null, array('id' => 'postanski_broj', 'class' => 'form-control', 'required')); ?></div>
                                            <?php if(isset($errors) && ($errors->first('postal_num') != '' || $errors->first('postal_num') != null)): ?>
                                                <p><small><?php echo $errors->first('postal_num'); ?></small></p>
                                            <?php endif; ?>
                                            <div class="col s4 input-field"> <label>Mjesto</label>  <?php echo Form::text('place', isset($formData->place) ? $formData->place : null, array('id' => 'mjesto', 'class' => 'form-control', 'required')); ?></div>
                                            <?php if(isset($errors) && ($errors->first('place') != '' || $errors->first('place') != null)): ?>
                                                <p><small><?php echo $errors->first('place'); ?></small></p>
                                            <?php endif; ?>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="col s6 input-field"><label>Telefon</label> <?php echo Form::text('phone',isset($formData->phone ) ? $formData->phone : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?></div>
                                            <?php if(isset($errors) && ($errors->first('phone') != '' || $errors->first('phone') != null)): ?>
                                                <p><small><?php echo $errors->first('phone'); ?></small></p>
                                            <?php endif; ?>
                                            <div class="col s6 input-field"><label>E-mail</label><?php echo Form::email('email',isset($formData->email) ? $formData->email : null, array('id' => 'naziv_organizacije', 'class' => 'form-control')); ?></div>
                                            <?php if(isset($errors) && ($errors->first('email') != '' || $errors->first('email') != null)): ?>
                                                <p><small><?php echo $errors->first('email'); ?></small></p>
                                            <?php endif; ?>
                                            <div class="col s6 input-field"><label>Kontakt osoba</label> <?php echo Form::text('contact_person',isset($formData->contact_person) ? $formData->contact_person : null, array('id' => 'ulica_kucnibr', 'class' => 'form-control', 'required')); ?></div>
                                            <?php if(isset($errors) && ($errors->first('contact_person') != '' || $errors->first('contact_person') != null)): ?>
                                                <p><small><?php echo $errors->first('contact_person'); ?></small></p>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                </div>
            </div>
            </div>

            <div class="row">
                <div class="col s12">
                    <?php /* List subscribers for City */ ?>
                    <div class="push-subs widget-holder hoverable">
                    <div class="widget-heading">
                        <h2 class="widget-heading-thick">Podatci o volonterskoj poziciji</h2>
                    </div>
                        <div class="widget-content">
                            <div class="inputs-wrapper">
                                <div class="vol-form-row">


                                    <div class="vol-form-inner">
                                        <div class="row mt-20">
                                            <div class="col s12">
                                                <label>Volontere trebate:</label><br>
                                                <p>
                                                    <?php echo Form::radio('duration', 1, isset($formData->duration) ? $formData->duration == 1 ? true : false : true,["id"=>"vol1","name"=>"group2"]); ?>

                                                    <label for="vol1">Jednokratno</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('duration', 2, isset($formData->duration) ? $formData->duration == 2 ? true : false : false,["id"=>"vol2","name"=>"group2"]); ?>

                                                    <label for="vol2">U kontinuitetu manje od 3 mjeseca</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('duration', 3, isset($formData->duration) ? $formData->duration == 3 ? true : false : false,["id"=>"vol3","name"=>"group2"]); ?>

                                                    <label for="vol3">U kontinuitetu duže od 3 mjeseca</label>
                                                </p>
                                                <?php if(isset($errors) && ($errors->first('duration') != '' || $errors->first('duration') != null)): ?>
                                                    <p><small><?php echo $errors->first('duration'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="col s6 input-field">
                                                <label>Broj potrebnih volontera</label>
                                                <?php echo Form::text('volunteer_num', isset($formData->volunteer_num) ? $formData->volunteer_num : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?>

                                                <?php if(isset($errors) && ($errors->first('naziv_organizacije') != '' || $errors->first('naziv_organizacije') != null)): ?>
                                                    <p><small><?php echo $errors->first('naziv_organizacije'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col s6 input-field">
                                                <label>Kratki opis zadataka koje bi volonter obavljao</label>
                                                <?php echo Form::text('job_desc',isset($formData->job_desc) ? $formData->job_desc : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?>

                                                <?php if(isset($errors) && ($errors->first('job_desc') != '' || $errors->first('job_desc') != null)): ?>
                                                    <p><small><?php echo $errors->first('job_desc'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="col s6 input-field">
                                                <label>Vrijeme i dinamika volontiranja</label>
                                                <?php echo Form::text('job_working_hours',isset($formData->job_hours_and_dynamic) ? $formData->job_hours_and_dynamic : null, array('id' => 'naziv_organizacije', 'class' => 'form-control')); ?>

                                                <?php if(isset($errors) && ($errors->first('job_working_hours') != '' || $errors->first('job_working_hours') != null)): ?>
                                                    <p><small><?php echo $errors->first('job_working_hours'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="col s6 input-field">
                                                <label>Mjesto volontiranja</label>
                                                <?php echo Form::text('job_site',isset($formData->job_site) ? $formData->job_site : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?>

                                                <?php if(isset($errors) && ($errors->first('job_site') != '' || $errors->first('job_site') != null)): ?>
                                                    <p><small><?php echo $errors->first('job_site'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20">
                                            <div class="form-group">
                                                <div class="col s6 input-field">
                                                    <label>Osoba zadužena za praćenje i podršku volontera</label>
                                                    <?php echo Form::text('support_person',isset($formData->support_person) ? $formData->support_person : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?>

                                                    <?php if(isset($errors) && ($errors->first('support_person') != '' || $errors->first('support_person') != null)): ?>
                                                        <p><small><?php echo $errors->first('support_person'); ?></small></p>
                                                    <?php endif; ?>
                                                </div>
                                                <div class="col s6 input-field">
                                                    <label>Kontakt osobe za praćenje i podršku volontera</label>
                                                    <?php echo Form::text('support_contact', isset($formData->support_contact) ?  $formData->support_contact : null, array('id' => 'naziv_organizacije', 'class' => 'form-control', 'required')); ?>

                                                    <?php if(isset($errors) && ($errors->first('support_contact') != '' || $errors->first('support_contact') != null)): ?>
                                                        <p><small><?php echo $errors->first('support_contact'); ?></small></p>
                                                    <?php endif; ?>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col s12 input-field">
                                                <label>Može li organizacija pružiti specifično dodatno obrazovanje za obavljanje volonterskog angažmana?</label><br>
                                                <p>
                                                    <?php echo Form::radio('education', 1, isset($formData->education) ? $formData->education == 1 ? true : false : true,["id"=>"education1","title"=>"education"]); ?>

                                                    <label for="education1">da</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('education', 2, isset($formData->education) ? $formData->education == 2 ? true : false : false,["id"=>"education2","title"=>"education"]); ?>

                                                    <label for="education2">ne</label>

                                                </p>


                                                <?php if(isset($errors) && ($errors->first('education') != '' || $errors->first('education') != null)): ?>
                                                    <p><small><?php echo $errors->first('education'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20 mb-20">
                                            <div class="col s12 input-field">
                                                <label>Može li organizacija volonteru osigurati pokrivanje troškova ako je potrebno?</label><br>
                                                <p>
                                                    <?php echo Form::radio('expenses', 1,isset($formData->expenses) ? $formData->expenses == 1 ? true : false : true,["id"=>"expenses1","title"=>"expenses"]); ?>

                                                    <label for="expenses1">da</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('expenses', 2, isset($formData->expenses) ?  $formData->expenses == 2 ? true : false : false,["id"=>"expenses2","title"=>"expenses"]); ?>

                                                    <label for="expenses2">ne</label>
                                                </p>
                                                <?php if(isset($errors) && ($errors->first('expenses') != '' || $errors->first('expenses') != null)): ?>
                                                    <p><small><?php echo $errors->first('expenses'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col s12">
                    <?php /* List subscribers for City */ ?>
                    <div class="widget-holder hoverable push-subs">
                        <div class="widget-heading">
                            <h2 class="widget-heading-thick">Ostale informacije</h2>
                        </div>
                        <div class="widget-content">
                            <div class="inputs-wrapper">
                                <div class="vol-form-row">
                                    <div class="vol-form-inner">
                                        <div class="row mt-20">
                                            <div class="col s12 form-group">
                                                <p>Jesu li članovi vaše organizacije završili edukaciju za koordinatora volontera</p>
                                                <p>
                                                    <?php echo Form::radio('mentor_education', 1,isset($formData->mentor_education) ? $formData->mentor_education == 1 ? true : false : true,["id"=>"mentor1","title"=>"mentor"]); ?>

                                                    <label for="mentor1">ništa</label>
                                                </p>
                                                <p>
                                                    <?php echo Form::radio('mentor_education', 2,isset($formData->mentor_education) ? $formData->mentor_education == 2 ? true : false : false,["id"=>"mentor2","title"=>"mentor"]); ?>

                                                    <label for="mentor2">da</label>

                                                </p>
                                                <p>
                                                    <?php echo Form::radio('mentor_education', 3,isset($formData->mentor_education) ? $formData->mentor_education == 3 ? true : false : false,["id"=>"mentor3","title"=>"mentor"]); ?>

                                                    <label for="mentor3">ne</label>
                                                </p>
                                                <?php if(isset($errors) && ($errors->first('mentor_education') != '' || $errors->first('mentor_education') != null)): ?>
                                                    <p><small><?php echo $errors->first('mentor_education'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                            <div class="col s12 form-group mt-20" id="trening">
                                                <p>(HIDDEN AKO JE GORE NE)Jeste li zainteresirani za treninge o upravljanju kvalitetnim volonterskim programima koje organizira Volonterski centar Osijek?</p>
                                                <p>
                                                    <?php echo Form::radio('mentor_training', 1, isset($formData->mentor_training)  ? $formData->mentor_training == 1 ? true : false : true,["id"=>"mentor_training1","title"=>"mentor_training"]); ?>

                                                    <label for="mentor_training1">ništa</label>

                                                </p>
                                                <p>
                                                    <?php echo Form::radio('mentor_training', 2, isset( $formData->mentor_training) ? $formData->mentor_training == 2 ? true : false : false,["id"=>"mentor_training2","title"=>"mentor_training"]); ?>

                                                    <label for="mentor_training2">da</label>

                                                </p>
                                                <p>
                                                    <?php echo Form::radio('mentor_training', 3, isset( $formData->mentor_training ) ? $formData->mentor_training == 3 ? true : false : false,["id"=>"mentor_training3","title"=>"mentor_training"]); ?>

                                                    <label for="mentor_training3">ne</label>

                                                </p>
                                                <?php if(isset($errors) && ($errors->first('mentor_training') != '' || $errors->first('mentor_training') != null)): ?>
                                                    <p><small><?php echo $errors->first('mentor_training'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <div class="row mt-20 mb-20">
                                            <div class="col s12 form-group">
                                                <p>Je li vam potrebna dodatna pomoć u organiziranju volonterskog programa?</p>
                                                <p>
                                                    <?php echo Form::radio('additional_help', 1, isset($formData->additional_help) ? $formData->additional_help == 1 ? true : false : true,["id"=>"additional1","title"=>"additional"]); ?>

                                                    <label for="additional1">ništa</label>

                                                </p>
                                                <p>
                                                    <?php echo Form::radio('additional_help', 2, isset($formData->additional_help) ? $formData->additional_help == 2 ? true : false : false,["id"=>"additional2","title"=>"additional"]); ?>

                                                    <label for="additional2">da</label>

                                                </p>
                                                <p>
                                                    <?php echo Form::radio('additional_help', 3, isset($formData->additional_help) ? $formData->additional_help == 3 ? true : false : false,["id"=>"additional3","title"=>"additional"]); ?>

                                                    <label for="additional3">ne</label>

                                                </p>
                                                <?php if(isset($errors) && ($errors->first('additional_help') != '' || $errors->first('additional_help') != null)): ?>
                                                    <p><small><?php echo $errors->first('additional_help'); ?></small></p>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>


                    </div>

            </div>
            </div>

            <div class="row">
                <div class="col s12">
                    <p class="center-align"><?php echo Form::button('<span class="icon icon-done"></span> Završi', array('class' => 'btn btn-primary', 'type' => 'submit')); ?></p>
                </div>
            </div>
            <?php echo Form::close(); ?>




