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.
 
 
 
 
 

38 lines
1.4 KiB

{% extends 'base.html' %}
{% block content %}
<div class="column is-4 is-offset-4">
<h3>Añadir nueva canción en la pista número {{ pista }} para album '{{ album.name }}'</h3>
<div class="box">
<form method="POST" action=" {{ url_for('paginas.add_song2album', album_id=album_id) }}">
<div class="text mb-3">
<label for="title">Título:</label>
<input class="form-control" type="text" id="title" name="title" required>
</div>
<div class="text mb-3">
<label for="lyrics">Letra:</label>
<textarea class="form-control" id="lyrics" name="lyrics" required></textarea>
</div>
<div class="text mb-3">
<button type="submit" class="btn app-btn-primary w-100 theme-btn mx-auto">Añadir canción</button>
</div>
</form>
</div>
<script>
function updateAuthor() {
var albumSelect = document.getElementById("album_id");
var selectedAlbum = albumSelect.options[albumSelect.selectedIndex];
var artist = selectedAlbum.getAttribute("data-artist");
document.getElementById("author").value = artist;
}
// Initialize the author field with the artist of the first album
document.addEventListener('DOMContentLoaded', function() {
updateAuthor();
});
</script>
</div>
{% endblock %}