# Band registration form for Norsk Urskog Metal Sampler # Copyright (C) 2015-2018 Harald Eilersen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . module SubmitFormHelper def fill_in_form_with(params) fill_in 'Bandnavn:', with: params['name'] fill_in 'Hjemsted:', with: params['city'] fill_in 'Webside:', with: params['website'] fill_in 'Plateselskap:', with: params['label'] fill_in 'Kort bio:', with: params['shortbio'] fill_in 'Medlemmer:', with: params['members'] within '#form-contact-info' do fill_in 'Navn:', with: params['contact']['name'] fill_in 'Adresse:', with: params['contact']['street'] fill_in 'Postnr:', with: params['contact']['postcode'] fill_in 'Sted:', with: params['contact']['city'] fill_in 'Tlf:', with: params['contact']['phone'] fill_in 'E-post:', with: params['contact']['email'] end if params['songs'] within '#form-songs #song-1-info' do 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'] fill_in 'Opphavsmenn:', with: params['songs']['1']['composers'] fill_in 'Andre merknader:', with: params['songs']['1']['notes'] end end click_on 'Send skjema' end end