diff options
-rw-r--r-- | public/styles.css | 1 | ||||
-rw-r--r-- | spec/features/register_band_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/submit_form_helper.rb | 2 | ||||
-rw-r--r-- | views/song.erb | 51 |
4 files changed, 27 insertions, 29 deletions
diff --git a/public/styles.css b/public/styles.css index 3f90273..73f6530 100644 --- a/public/styles.css +++ b/public/styles.css @@ -55,7 +55,6 @@ input[type=text], textarea { } .song-details { - margin-left: 1cm; margin-top: 2mm; } diff --git a/spec/features/register_band_spec.rb b/spec/features/register_band_spec.rb index 249bf3f..a2bd454 100644 --- a/spec/features/register_band_spec.rb +++ b/spec/features/register_band_spec.rb @@ -48,7 +48,7 @@ feature "Submit registration form" do end within '#form-songs #song-1-info' do - expect(find_field('Tittel:').value).to eql(@band_params['songs']['1']['title']) + expect(find_field('Låttittel:').value).to eql(@band_params['songs']['1']['title']) expect(find_field('Lengde:').value).to eql(@band_params['songs']['1']['time']) expect(find_field('ISRC-kode:').value).to eql(@band_params['songs']['1']['isrc']) expect(find_field('Utøvere:').value).to eql(@band_params['songs']['1']['performers']) diff --git a/spec/support/submit_form_helper.rb b/spec/support/submit_form_helper.rb index 3d881cb..30816cf 100644 --- a/spec/support/submit_form_helper.rb +++ b/spec/support/submit_form_helper.rb @@ -16,7 +16,7 @@ module SubmitFormHelper if params['songs'] within '#form-songs #song-1-info' do - fill_in 'Tittel:', with: params['songs']['1']['title'] + fill_in 'Låttittel:', with: params['songs']['1']['title'] fill_in 'Lengde:', with: params['songs']['1']['time'] fill_in 'ISRC-kode:', with: params['songs']['1']['isrc'] fill_in 'Utøvere:', with: params['songs']['1']['performers'] diff --git a/views/song.erb b/views/song.erb index 5dd023a..b97ae37 100644 --- a/views/song.erb +++ b/views/song.erb @@ -1,31 +1,30 @@ <div class="song-info" id="song-<%= song_number %>-info"> - <label><%= song_number %></label> - <span class="field text required"> - <label for="band-song-<%= song_number %>-title">Tittel:</label> - <input type="text" id="band-song-<%= song_number %>-title" - name="band[songs][<%= song_number %>][title]" - value="<%= song.title %>"> - </span> - <span class="field text optional"> - <label for="band-song-<%= song_number %>-time">Lengde:</label> - <input type="text" pattern="[0-9]{1,2}:[0-9]{2}" - title="Spilletid i min:sek (mm:ss)" - id="band-song-<%= song_number %>-time" - name="band[songs][<%= song_number %>][time]" - value="<%= song.time %>" - size="6"> - </span> - <span class="field text optional"> - <label for="band-song-<%= song_number %>-isrc">ISRC-kode:</label> - <input type="text" - title="Dersom låten har vært utgitt før har den en ISRC-kode. Om du vet den så oppgi den her." - id="band-song-<%= song_number %>-isrc" - name="band[songs][<%= song_number %>][isrc]" - value="<%= song.isrc %>" - size="11"> - </span> - <input type="button" id="delete-song-<%= song_number %>" class="delete-song" value="X"> + <label>Låt nr. <%= song_number %></label> <div class="song-details"> + <div class="field text required"> + <label for="band-song-<%= song_number %>-title">Låttittel:</label> + <input type="text" id="band-song-<%= song_number %>-title" + name="band[songs][<%= song_number %>][title]" + value="<%= song.title %>"> + </div> + <div class="field text optional"> + <label for="band-song-<%= song_number %>-time">Lengde:</label> + <input type="text" pattern="[0-9]{1,2}:[0-9]{2}" + title="Spilletid i min:sek (mm:ss)" + id="band-song-<%= song_number %>-time" + name="band[songs][<%= song_number %>][time]" + value="<%= song.time %>" + size="6"> + </div> + <div class="field text optional"> + <label for="band-song-<%= song_number %>-isrc">ISRC-kode:</label> + <input type="text" + title="Dersom låten har vært utgitt før har den en ISRC-kode. Om du vet den så oppgi den her." + id="band-song-<%= song_number %>-isrc" + name="band[songs][<%= song_number %>][isrc]" + value="<%= song.isrc %>" + size="11"> + </div> <div class="field textarea required"> <label for="band-song-<%= song_number %>-performers">Utøvere:</label> <textarea cols="40" rows="5" id="band-song-<%= song_number %>-performers" |