27 lines
997 B
HTML
27 lines
997 B
HTML
|
@use crate::{templates::layouts::home, nav::NavState};
|
||
|
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title, file_input, statics::{button_js, file_input_js}}, Button, Card, FileInput};
|
||
|
|
||
|
@(file: &FileInput, error: Option<String>, dark: bool, nav_state: &NavState)
|
||
|
|
||
|
@:home("Create Submission", "Upload a file", nav_state, {
|
||
|
<script src="/toolkit/@button_js.name"></script>
|
||
|
<script src="/toolkit/@file_input_js.name"></script>
|
||
|
}, {
|
||
|
@:card(&Card::full_width().dark(dark), {
|
||
|
<form method="POST" action="/submissions/create" enctype="multipart/form-data">
|
||
|
@:card_title({ Select a file to post })
|
||
|
@if let Some(error) = error {
|
||
|
@:card_body({ @error })
|
||
|
}
|
||
|
@:card_body({
|
||
|
@:file_input(file)
|
||
|
})
|
||
|
@:card_body({
|
||
|
@:button_group(&[
|
||
|
&Button::primary("Next").dark(dark),
|
||
|
])
|
||
|
})
|
||
|
</form>
|
||
|
})
|
||
|
})
|