公用表单错误,@disabled、@checked相关删除(无此功能)

This commit is contained in:
Jerry Yan 2022-08-07 21:51:27 +08:00
parent b1124432c7
commit 50934228ef
7 changed files with 13 additions and 32 deletions

View File

@ -0,0 +1,5 @@
@if($errors->any())
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif

View File

@ -44,11 +44,7 @@
补充说明 补充说明
<input class="form-input border-0 border-b-2 w-full" type="text" name="append" value="{{ old('append', $append->append) }}"> <input class="form-input border-0 border-b-2 w-full" type="text" name="append" value="{{ old('append', $append->append) }}">
</label> </label>
@if($errors->any()) @include("common.form_error")
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif
<div class="block my-2 text-center"> <div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit"> <input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit">
</div> </div>

View File

@ -17,11 +17,7 @@
BVID BVID
<input class="form-input border-0 border-b-2 w-full" type="text" name="bvid" required value="{{ old('bvid') }}"> <input class="form-input border-0 border-b-2 w-full" type="text" name="bvid" required value="{{ old('bvid') }}">
</label> </label>
@if($errors->any()) @include("common.form_error")
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif
@isset($message) @isset($message)
<div class="bg-red-600 text-white">提示:{{ $message }}</div> <div class="bg-red-600 text-white">提示:{{ $message }}</div>
@endisset @endisset

View File

@ -25,11 +25,7 @@
是否结束维护 是否结束维护
<input class="form-checkbox" type="checkbox" name="status" value="1" @if(old("status", $program->status) == 1) checked @endif> <input class="form-checkbox" type="checkbox" name="status" value="1" @if(old("status", $program->status) == 1) checked @endif>
</label> </label>
@if($errors->any()) @include("common.form_error")
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif
<div class="block my-2 text-center"> <div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit"> <input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit">
</div> </div>

View File

@ -11,7 +11,7 @@
<input type="hidden" name="id" value="{{$program_video->id}}"> <input type="hidden" name="id" value="{{$program_video->id}}">
<label class="block my-2"> <label class="block my-2">
BVID BVID
<input class="form-input border-0 border-b-2 w-full" @disabled($program_video->video_bvid) type="text" name="video_bvid" value="{{ old("video_bvid", $program_video->video_bvid) }}"> <input class="form-input border-0 border-b-2 w-full" @if($program_video->video_bvid) disabled @endif type="text" name="video_bvid" value="{{ old("video_bvid", $program_video->video_bvid) }}">
</label> </label>
<label class="block my-2"> <label class="block my-2">
开始P数 开始P数
@ -47,11 +47,7 @@
@endif @endif
<input class="form-input border-0 border-b-2 w-full" type="file" name="stop_image"> <input class="form-input border-0 border-b-2 w-full" type="file" name="stop_image">
</label> </label>
@if($errors->any()) @include("common.form_error")
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif
<div class="block my-2 text-center"> <div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit"> <input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit">
</div> </div>

View File

@ -20,13 +20,9 @@
</label> </label>
<label class="block my-4"> <label class="block my-4">
记住密码 记住密码
<input class="form-checkbox" type="checkbox" name="remember" @checked(old("remember") == 1) value="1"> <input class="form-checkbox" type="checkbox" name="remember" @if(old("remember") == 1) checked @endif value="1">
</label> </label>
@if($errors->any()) @include("common.form_error")
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif
<div class="block my-2 text-center"> <div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit" value="登录"> <input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit" value="登录">
</div> </div>

View File

@ -22,11 +22,7 @@
密码 密码
<input class="form-input border-0 border-b-2 w-full" minlength="5" type="password" name="password" value="{{ old("password") }}" placeholder="密码"> <input class="form-input border-0 border-b-2 w-full" minlength="5" type="password" name="password" value="{{ old("password") }}" placeholder="密码">
</label> </label>
@if($errors->any()) @include("common.form_error")
@foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div>
@endforeach
@endif
<div class="block my-2 text-center"> <div class="block my-2 text-center">
<input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit" value="注册"> <input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit" value="注册">
</div> </div>