优化下翻译,创建节目时,添加old参数

This commit is contained in:
2022-08-01 17:44:33 +08:00
parent dc07742be8
commit 9d382e1725
2 changed files with 6 additions and 6 deletions

View File

@ -11,19 +11,19 @@
<input type="hidden" name="id" value="{{$program->id}}">
<label class="block my-2">
节目名称
<input class="form-input border-0 border-b-2 w-full" type="text" name="name" value="{{$program->name}}">
<input class="form-input border-0 border-b-2 w-full" type="text" required name="name" value="{{ old("name", $program->name) }}">
</label>
<label class="block my-2">
节目难度
<input class="form-input border-0 border-b-2 w-full" type="text" name="difficulty" value="{{$program->difficulty}}">
<input class="form-input border-0 border-b-2 w-full" type="text" name="difficulty" value="{{ old("difficulty", $program->difficulty) }}">
</label>
<label class="block my-2">
节目要求
<input class="form-input border-0 border-b-2 w-full" type="text" name="desc" value="{{$program->desc}}">
<input class="form-input border-0 border-b-2 w-full" type="text" name="desc" value="{{ old("desc", $program->desc) }}">
</label>
<label class="block my-2">
是否结束维护
<input class="form-checkbox" type="checkbox" name="status" value="1" @if($program->status == 1) checked @endif>
<input class="form-checkbox" type="checkbox" name="status" value="1" @if(old("status", $program->status) == 1) checked @endif>
</label>
@if($errors->any())
@foreach ($errors->all() as $error)