MD5Update attributes cannot handle validation failures with a redirect back to the form, so restore the old values for now

This commit is contained in:
2025-03-16 10:03:26 +11:00
parent 5d3b8609bb
commit 649749f9c1
3 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
<!-- @todo We are not handling redirect backs yet with updated passwords -->
<!-- $o=Password::class -->
<x-attribute.layout :edit="$edit ?? FALSE" :new="$new ?? FALSE" :o="$o">
@foreach($o->values as $value)
@foreach($o->values_old as $value)
@if($edit)
<div class="input-group has-validation mb-3">
<input type="password" @class(['form-control','is-invalid'=>($e=$errors->get($o->name_lc.'.'.$loop->index)),'mb-1','border-focus'=>$o->values->contains($value)]) name="{{ $o->name_lc }}[]" value="{{ md5($value) }}" @readonly(true)>