<h3>Gestión de email institucional </h3>
<br>
<form method="POST" action="{{ URL::to('/') }}/forms/update/email" accept-charset="UTF-8" >
    <input type="hidden" name="_token" value="{{ csrf_token() }}">

    <input type="hidden" name="type" value="email">
    <input type="hidden" name="id" value="{{ $task->id }}">


    <h4><i class="fa fa-pencil-square-o" aria-hidden="true"></i>  Requerimiento</h4>

    <hr>
    <div class="col-md-12">

        <div class="form-group">
            <select name="email_request" id="email_request" style="width:100% !important">
                <option value="">Seleccionar Requerimiento</option>
                <option value="registration" @if ("registration" == old('email_request', $task->taskdata->request)) selected="selected" @endif>Alta de cuenta</option>
                <option value="laundering" @if ("laundering" == old('email_request', $task->taskdata->request)) selected="selected" @endif>Blanqueo de contraseña</option>
                <option value="delete" @if ("delete" == old('email_request', $task->taskdata->request)) selected="selected" @endif>Baja</option>
            </select>
        </div>
    </div>

    <hr>
    <br>
    <br>
    <br>
    <h4><i class="fa fa-pencil-square-o" aria-hidden="true"></i> &nbsp;Seleccionar Perfil</h4>

    <hr>

    <div class="col-md-12">
        @include('task.forms.shared.profile-select-edit')

    </div>

    <br>
    <h4><i class="fa fa-pencil-square-o" aria-hidden="true"></i> &nbsp;Datos de la cuenta de Email Institucional
    </h4>

    <hr>

    <div class="row">
        <div class="col-md-12"><h4></h4>


            <div class="form-group">
                <label for="">Nombre/s</label><br>
                <input type="text" name="email_name" value="{{ old('name',$task->taskdata->email_name) }}">
            </div>
            <div class="form-group">
                <label for="">Apellido/s</label><br>
                <input type="text" name="email_surname" value="{{ old('surname',$task->taskdata->email_surname) }}">
            </div>
            <div class="form-group">
                <label for="">Email Personal</label><br>
                <input type="text" name="email_personalemail" value="{{ old('surname',$task->taskdata->email_personalemail) }}">
                <p id="" style="font-size:12px;color:#969696;" class="">Ingrese una cuenta de correo existente en la que recibirá los datos de acceso a la cuenta institucional.</p>
            </div>
            <div class="form-group">
                <label for="">Mail a eliminar:</label><br>
                {{--<input type="text" name="deleteemail" value="{{ old('deleteemail') }}">--}}
                <input type="text" name="deleteemail" value="{{ old('deleteemail',$task->taskdata->deleteemail) }}"></input>
            </div>
            <div class="form-group">
                <label for="">Observaciones</label><br>
                {{--<input type="text" name="deleteemail" value="{{ old('deleteemail') }}">--}}
                <textarea rows="4" cols="50" name="description" value="{{ old('description',$task->taskdata->description) }}"></textarea>
            </div>

        </div>
    </div>

    {{--<div class="form-group">--}}

    {{--<label for="web_deadline" class="control-label">Deadline:</label>--}}
    {{--@if($task->deadline)--}}
    {{--<input class="form-control" name="email_deadline" type="text" id="deadline" value="{{ date('d-m-Y', strtotime(str_replace('/', '-', $task->deadline))) }}">--}}
    {{--@else--}}
    {{--<input class="form-control" name="email_deadline" type="text" id="deadline" value="{{ date('d-m-Y', strtotime(str_replace('/', '-', $task->taskdata->deadline))) }}">--}}
    {{--@endif--}}

    {{--</div>--}}

    <?php /*
    <div class="form-group">
        <label for="adjuntos" class="control-label">Adjuntos:</label><br>
        <span class="btn btn-success fileinput-button">
            <i class="icon-plus icon-white"></i>
            <span>Elegir Archivos</span>
            <input id="fileupload" multiple type="file" name="file" data-url="{{ url('upload') }}" style="display: inline;">
        </span>
        <ul id="file-upload-progress" class="list-unstyled">

        </ul>
        <input type="hidden" name="jsonIdAttachments" id="jsonIdAttachments" value="">
        <progress class="barProgress" max="100" value="0" style="display: none;"><span id="textProgress">22</span></progress>
        <ul id="file-upload-list" class="list-unstyled">
            @foreach($task->attachments as $attach)
                <li>Subido: {{ $attach->original_name }}</li>
            @endforeach
        </ul>
    </div>
    */ ?>

    <div class="form-group">  <!-- Terms Checkbox !-->
        <div class="checkbox">
            <label>
                <input type="checkbox" value="1" class="draft" name="draft" {{ $task->draft == '1' ? 'checked="checked"' : '' }}>
                Guardar como borrador
            </label>
            <p id="" style="font-size:12px;color:#969696;" class="">Si envía el formulario con este campo
                tildado, el contenido del formulario se guardará pero no será enviado para su procesamiento.</p>

        </div>
    </div>


    <input type="button" class="form-control" value="Enviar" onclick="form.submit()">

</form>