@extends('layouts.app')
@section('title')编辑-项目组@endsection

@section('content')
    <div id="nav2">
        @component('maintenance.menu')@endcomponent
        @component('maintenance.userOwnerGroup.menu')
            @if(isset($group))@can('项目组-编辑')
            <li class="nav-item">
                <a class="nav-link" href="{{URL::current()}}" :class="{active:isActive('edit',4)}">编辑</a>
            </li> @endcan @endif
        @endcomponent
    </div>
    <div class="container-fluid card">
        <div class="card-body offset-3 mt-2">
            <form method="post" action="{{isset($group) ? url('maintenance/userOwnerGroup').'/'.$group->id : url('maintenance/userOwnerGroup')}}">
                @csrf
                @if(isset($group)) @method('PUT') @endif
                <div class="row mt-3">
                    <label class="col-2" for="name">项目组名称</label>
                    <input class="form-control col-6 @error("name") is-invalid @enderror" id="name" name="name"
                           value="{{old("name") ?? (isset($group) ? $group->name : '')}}">
                    @error("name")<span class="offset-2 mt-0 invalid-feedback">
                        <strong>{{$message}}</strong>
                    </span>@enderror
                </div>
                <div class="row mt-3 offset-1">
                    <button class="btn btn-success col-7">提交</button>
                </div>
            </form>
        </div>
    </div>
@stop

