Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <template name="personality">
  2.  
  3. <h1 class=personalityIntro>I see myself as someone who...</h1>
  4. <div class="test">
  5.  
  6. {{> quickForm
  7. collection="Big5"
  8. id="insertPersonality"
  9. type="method"
  10. meteormethod="submitBig5Scale"}}
  11.  
  12. </div>
  13.  
  14. <div class="userRe">
  15. <hr>
  16. {{#each big5s}}
  17. {{> showResult}}
  18. {{/each}}
  19.  
  20. </div>
  21. </template>
  22. <template name="showResult">
  23. <div class=testResult>
  24. <h2>Neuroticism: {{>neurotic cons8}}</h2>
  25. </div>
  26. </template>
  27.  
  28. Big5.attachSchema(new SimpleSchema({
  29. cons8: {
  30. label: "...is talkative",
  31. type: Number,
  32. optional: false,
  33. autoform: {
  34. afFormGroup: {
  35. type: "select-radio-inline",
  36. 'formgroup-class': 'custom-radio-class',
  37. options: function () {
  38. return [
  39. {label: "1", value: 1},
  40. {label: "2", value: 2},
  41. {label: "3", value: 3},
  42. {label: "4", value: 4},
  43. {label: "5", value: 5}
  44.  
  45. ];
  46. }
  47. }
  48. }
  49. },
  50. })
  51. )
  52.  
  53. big5s: function (){
  54. return Big5.find()
  55. }
  56. })
  57.  
  58. Template.neurotic.helpers({
  59. add: function(cons8){
  60. return Meteor.user().big5s.cons8
  61. }
  62. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement