You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.6 KiB

@page "/edit/{id:int}"
<h3>Modification</h3>
<EditForm Model="@musiqueModele" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />
<p>
<label for="titre">
Display titre:
<InputText id="titre" @bind-Value="musiqueModele.titre" />
</label>
</p>
<p>
<label for="autheur">
autheur:
<InputText id="autheur" @bind-Value="musiqueModele.auteur" />
</label>
</p>
<p>
<label for="durée">
Stack durée:
<InputNumber id="durée" @bind-Value="musiqueModele.duree" />
</label>
</p>
<p>
<label>
Current Item image:
<img src="data:image/png;base64, @(musiqueModele.ImageBase64)" class="img-thumbnail" style="min-width: 50px; max-width: 150px"/>
</label>
</p>
<p>
<label>
Item image:
<InputFile OnChange="@LoadImage" accept=".png" />
</label>
</p>
<figure>
<audio controls
src="https://localhost:7028/song/@(musiqueModele.songName)">
<a href="https://localhost:7028/song/@(musiqueModele.songName)">
Audio
</a>
</audio>
</figure>
<p>
<label>
Item song:
<InputFile OnChange="@LoadSong" accept=".mp3" />
</label>
</p>
<p>
<label for="songName">
Name file song:
<InputText id="songName" @bind-Value="musiqueModele.songName" />
</label>
</p>
<button type="submit">Submit</button>
</EditForm>