@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">Add new Hyper-V server</div>

                <div class="card-body">
                    @if (session('status'))
                        <div class="alert alert-success" role="alert">
                            {{ session('status') }}
                        </div>
                    @endif
                    <form action="/servers/storeHyper" enctype="multipart/form-data" method="POST">
                        @csrf
                        <div class="form-group row">

                            <label for="name" class="col-md-4 col-form-label text-md-right">Name of new system</label>
                            <div class="col-md-6">
                                <input name="name" id="name" type="text"/>
                            </div>
                            <label for="name" class="col-md-4 col-form-label text-md-right"></label>
                            <div class="col-md-6">
                                <p style="color: red">@error('name') {{ $message }} @enderror</p>
                            </div>

                            <label for="ip" class="col-md-4 col-form-label text-md-right">IP adress</label>
                            <div class="col-md-6">
                                <input name="ip" id="ip" type="text"/>
                            </div>
                            <label for="name" class="col-md-4 col-form-label text-md-right"></label>
                            <div class="col-md-6">
                                <p style="color: red">@error('ip') {{ $message }} @enderror</p>
                            </div>
                            <label for="script" class="col-md-4 col-form-label text-md-right">Path to scripts</label>
                            <div class="col-md-6">
                                <table>
                                    <tr>                                      
                                        <td>
                                            <input name="scripts_disk" id="scripts_datastore" type="text" maxlength="1" size="1"/>
                                        </td>
                                            <td>:\</td>                                      
                                        <td>
                                            <input name="scripts_one" id="scripts_one" type="text" />
                                        </td>
                                    </tr>
                                  </table>
                                  <p style="color: red">@error('scripts_disk') {{ $message }} @enderror</p>
                            </div>
                            <br>
                            <label for="template" class="col-md-4 col-form-label text-md-right">Path to templates</label>
                            <div class="col-md-6">
                                <table>
                                    <tr>                                      
                                        <td>
                                            <input name="templates_disk" id="templates_disk" type="text" maxlength="1" size="1"/>
                                        </td>
                                            <td>:\</td>                                      
                                        <td>
                                            <input name="templates_one" id="templates_one" type="text"  />
                                        </td>
                                    </tr>
                                  </table>
                                  <p style="color: red">@error('templates_disk') {{ $message }} @enderror</p>
                            </div>
                            <br>
                            <label for="Clones" class="col-md-4 col-form-label text-md-right">Clones location</label>
                            <div class="col-md-6">
                                <table>
                                    <tr>                                      
                                        <td>
                                            <input name="clones_disk" id="clones_disk" type="text" maxlength="1" size="1"/>
                                        </td>
                                            <td>:\</td>                                      
                                        <td>
                                            <input name="clones_one" id="clones_one" type="text"/>
                                        </td>
                                    </tr>
                                  </table>
                                  <p style="color: red">@error('clones_disk') {{ $message }} @enderror</p>
                            </div>
                            <label for="Clones" class="col-md-4 col-form-label text-md-right">SSH Private key</label>
                            <div class="col-md-6">
                                <table>
                                    <tr>
                                        <input type="file" name="import" id="import">
                                    </tr>
                                  </table>
                            </div>
                        </div>

                        <div class="form-group row mb-0">
                            <div class="col-md-8 offset-md-4">
                                <button type="submit" class="btn btn-primary">
                                    Create
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
