Sha256: 90cfd05cc38943cbf84992a553b548dec83bfea372257f5af8a0b2a07d890e9c
Contents?: true
Size: 1.74 KB
Versions: 13
Compression:
Stored size: 1.74 KB
Contents
<h1>Over the PAST DAY, how much have you felt each of these emotions?</h1> <table class="table" style="background-color: #FFF;"> <thead> <tr> <th></th> <% ratings.each do |rating| %> <th> <%= rating.description %> </th> <% end %> </tr> </thead> <tbody> <% emotional_ratings.each do |emotional_rating| %> <tr data-emotion-id="<%= emotional_rating.emotion_id %>" data-is-positive="<%= emotional_rating.is_positive %>"> <th> <label for="emotional_rating_<%= emotional_rating.emotion_id %>_<%= ratings.first.value %>"> <%= emotional_rating.name %> </label> </th> <% ratings.each do |rating| %> <td> <input id="emotional_rating_<%= emotional_rating.emotion_id %>_<%= rating.value %>" name="emotional_rating_<%= emotional_rating.emotion_id %>" type="radio" value="<%= rating.value %>"> </td> <% end %> </tr> <% end %> </tbody> </table> <div class="btn-toolbar"> <%= submit_tag t(:next), class: "btn btn-primary", id: "submit_emotions" %> </div> <script type="text/javascript"> $(document).on("page:change", function() { $('#submit_emotions').on('click', function() { var $rows_of_emotions = $('table.table tbody tr'); var count = $rows_of_emotions.length; var options = { rows_of_emotions: $rows_of_emotions, index: 0, count: count, participant_id: '<%= current_participant.id %>', post_path: '<%= create_path %>', redirect_path: '<%= main_app.root_path %>', _window: window }; sc.createEmotionalRating(options); }); }); </script>
Version data entries
13 entries across 13 versions & 1 rubygems