Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[入力エラー] ファイルアップロードで入力エラー時にファイル参照欄を赤線で囲う対応の見直し #1868

Merged
merged 3 commits into from Oct 24, 2023

Conversation

akagane99
Copy link
Contributor

@akagane99 akagane99 commented Oct 24, 2023

概要

ファイルアップロードで入力エラー時にファイル参照欄を赤線で囲おうとしていましたが、赤線が表示されていない画面がありましたので対応しました。

詳細

エラー時 <input type="file"> に border-danger クラスを追加しても赤線枠が表示されない

エラー時 <label class="custom-file-label"> に border-danger クラスを追加すると赤線枠が表示される

<input type="file" name="upload_file[{{$frame_id}}]" value="{{old("upload_file.$frame_id")}}" class="custom-file-input @if ($errors && $errors->has("upload_file.$frame_id")) border-danger @endif" id="upload_file{{$frame_id}}">
<label class="custom-file-label" for="upload_file" data-browse="参照">ファイル選択...</label><input type="file" name="upload_file[{{$frame_id}}]" value="{{old("upload_file.$frame_id")}}" class="custom-file-input" id="upload_file{{$frame_id}}">
<label class="custom-file-label @if ($errors && $errors->has("upload_file.$frame_id")) border-danger @endif" for="upload_file" data-browse="参照">ファイル選択...</label>

<input type="file"><label class="custom-file-label"> 両方に border-danger クラスを追加している画面もありましたので、<label class="custom-file-label"> にだけ追加するよう見直しました。

修正後画面

image

(参考)修正前画面

image

レビュー完了希望日

なし

関連Pull requests/Issues

なし

参考

なし

DB変更の有無

なし

チェックリスト

@akagane99 akagane99 added the bug バグ・不具合連絡 label Oct 24, 2023
@akagane99 akagane99 self-assigned this Oct 24, 2023
@akagane99 akagane99 changed the title [入力エラー時] ファイルアップロードで入力エラー時にファイル参照欄を赤線で囲う対応 [入力エラー時] ファイルアップロードで入力エラー時にファイル参照欄を赤線で囲う対応の見直し Oct 24, 2023
@akagane99 akagane99 changed the title [入力エラー時] ファイルアップロードで入力エラー時にファイル参照欄を赤線で囲う対応の見直し [入力エラー] ファイルアップロードで入力エラー時にファイル参照欄を赤線で囲う対応の見直し Oct 24, 2023
@akagane99 akagane99 added enhancement 機能強化 and removed bug バグ・不具合連絡 labels Oct 24, 2023
@akagane99 akagane99 marked this pull request as ready for review October 24, 2023 12:16
@akagane99 akagane99 merged commit a6430ce into master Oct 24, 2023
1 check passed
@akagane99 akagane99 deleted the custom-file-input-is-invalid branch October 24, 2023 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 機能強化
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant