mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-12 13:46:51 +00:00
success page
This commit is contained in:
parent
bc2c7a7583
commit
faf5432b99
5 changed files with 43 additions and 3 deletions
|
|
@ -56,6 +56,6 @@ func handleRequestBooking(bs *booking.Service) echo.HandlerFunc {
|
||||||
|
|
||||||
bs.CreateRequest(from, to, name, phoneNumber, email, itemStr, 1)
|
bs.CreateRequest(from, to, name, phoneNumber, email, itemStr, 1)
|
||||||
|
|
||||||
return renderTempl(c, http.StatusSeeOther, view.BaseLayout())
|
return renderTempl(c, http.StatusSeeOther, view.Success())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,6 @@ templ RequestBookingForm(rbvm *RequestBookingViewModel) {
|
||||||
Message
|
Message
|
||||||
<textarea name="message" id="message"></textarea>
|
<textarea name="message" id="message"></textarea>
|
||||||
</label>
|
</label>
|
||||||
<button type="submit">Book</button>
|
<button type="submit">Reservez</button>
|
||||||
</form>
|
</form>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ func RequestBookingForm(rbvm *RequestBookingViewModel) templ.Component {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("></label></fieldset><label for=\"message\">Message <textarea name=\"message\" id=\"message\"></textarea></label> <button type=\"submit\">Book</button></form>")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("></label></fieldset><label for=\"message\">Message <textarea name=\"message\" id=\"message\"></textarea></label> <button type=\"submit\">Reservez</button></form>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
internal/view/success.templ
Normal file
5
internal/view/success.templ
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
package view
|
||||||
|
|
||||||
|
templ Success() {
|
||||||
|
<strong>Done</strong>
|
||||||
|
}
|
||||||
35
internal/view/success_templ.go
Normal file
35
internal/view/success_templ.go
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Code generated by templ - DO NOT EDIT.
|
||||||
|
|
||||||
|
// templ: version: v0.2.543
|
||||||
|
package view
|
||||||
|
|
||||||
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||||
|
|
||||||
|
import "github.com/a-h/templ"
|
||||||
|
import "context"
|
||||||
|
import "io"
|
||||||
|
import "bytes"
|
||||||
|
|
||||||
|
func Success() templ.Component {
|
||||||
|
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
|
||||||
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
|
||||||
|
if !templ_7745c5c3_IsBuffer {
|
||||||
|
templ_7745c5c3_Buffer = templ.GetBuffer()
|
||||||
|
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
|
||||||
|
}
|
||||||
|
ctx = templ.InitializeContext(ctx)
|
||||||
|
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
|
||||||
|
if templ_7745c5c3_Var1 == nil {
|
||||||
|
templ_7745c5c3_Var1 = templ.NopComponent
|
||||||
|
}
|
||||||
|
ctx = templ.ClearChildren(ctx)
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<strong>Done</strong>")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
if !templ_7745c5c3_IsBuffer {
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W)
|
||||||
|
}
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
})
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue