Commit 9145bafac6bb13dbb6bf2d659e1af94906c996af
1 parent
3c487799
Exists in
master
and in
2 other branches
Ticket #143: Adding field for youth council
Showing
4 changed files
with
27 additions
and
1 deletions
Show diff stats
www/html/_profile.html
@@ -46,6 +46,9 @@ | @@ -46,6 +46,9 @@ | ||
46 | <h2>Etnia</h2> | 46 | <h2>Etnia</h2> |
47 | <p>{{profile.etnia | etniaFilter}}</p> | 47 | <p>{{profile.etnia | etniaFilter}}</p> |
48 | 48 | ||
49 | + <h2>É membro de conselho municipal ou estadual da juventude?</h2> | ||
50 | + <p>{{profile.membro_conselho | membroConselhoFilter}}</p> | ||
51 | + | ||
49 | <h2><span ng-show="profile.transgenero == 'false'">Não</span> Sou Transgênero</h2> | 52 | <h2><span ng-show="profile.transgenero == 'false'">Não</span> Sou Transgênero</h2> |
50 | </ion-content> | 53 | </ion-content> |
51 | </div> | 54 | </div> |
www/html/_signup_person_fields.html
@@ -53,4 +53,17 @@ | @@ -53,4 +53,17 @@ | ||
53 | </select> | 53 | </select> |
54 | </label> | 54 | </label> |
55 | </div> | 55 | </div> |
56 | + | ||
57 | + <div> | ||
58 | + <label> | ||
59 | + <div class="input-label"> | ||
60 | + É membro de conselho municipal ou estadual da juventude? | ||
61 | + </div> | ||
62 | + <select ng-model="profile.membro_conselho" required class="item"> | ||
63 | + <option value="" ng-selected="!profile.membro_conselho">É membro de conselho municipal ou estadual da juventude?</option> | ||
64 | + <option value="1">{{ 1 | membroConselhoFilter}}</option> | ||
65 | + <option value="2">{{ 2 | membroConselhoFilter}}</option> | ||
66 | + </select> | ||
67 | + </label> | ||
68 | + </div> | ||
56 | </div> | 69 | </div> |
www/js/controllers.js
@@ -229,6 +229,7 @@ angular.module('confjuvapp.controllers', []) | @@ -229,6 +229,7 @@ angular.module('confjuvapp.controllers', []) | ||
229 | 'password_confirmation': data.password_confirmation, | 229 | 'password_confirmation': data.password_confirmation, |
230 | 'tipo': $scope.registerFormType, | 230 | 'tipo': $scope.registerFormType, |
231 | 'orientacao_sexual': data.orientacao_sexual, | 231 | 'orientacao_sexual': data.orientacao_sexual, |
232 | + 'membro_conselho': data.membro_conselho, | ||
232 | 'identidade_genero': data.identidade_genero, | 233 | 'identidade_genero': data.identidade_genero, |
233 | 'transgenero': data.transgenero, | 234 | 'transgenero': data.transgenero, |
234 | 'etnia': data.etnia, | 235 | 'etnia': data.etnia, |
@@ -1472,6 +1473,7 @@ angular.module('confjuvapp.controllers', []) | @@ -1472,6 +1473,7 @@ angular.module('confjuvapp.controllers', []) | ||
1472 | 'private_token': $scope.token, | 1473 | 'private_token': $scope.token, |
1473 | 'person[name]': profile.name, | 1474 | 'person[name]': profile.name, |
1474 | 'person[orientacao_sexual]': profile.orientacao_sexual, | 1475 | 'person[orientacao_sexual]': profile.orientacao_sexual, |
1476 | + 'person[membro_conselho]': profile.membro_conselho, | ||
1475 | 'person[identidade_genero]': profile.identidade_genero, | 1477 | 'person[identidade_genero]': profile.identidade_genero, |
1476 | 'person[transgenero]': profile.transgenero, | 1478 | 'person[transgenero]': profile.transgenero, |
1477 | 'person[etnia]': profile.etnia | 1479 | 'person[etnia]': profile.etnia |
@@ -1500,7 +1502,7 @@ angular.module('confjuvapp.controllers', []) | @@ -1500,7 +1502,7 @@ angular.module('confjuvapp.controllers', []) | ||
1500 | $scope.profileComplete = true; | 1502 | $scope.profileComplete = true; |
1501 | $scope.hideProfileWarning = !!window.localStorage['hide_profile_warning']; | 1503 | $scope.hideProfileWarning = !!window.localStorage['hide_profile_warning']; |
1502 | $scope.checkCompleteness = function(p) { | 1504 | $scope.checkCompleteness = function(p) { |
1503 | - if (!!!p.name || !!!p.orientacao_sexual || !!!p.identidade_genero || !!!p.etnia || !!!p.city) { | 1505 | + if (!!!p.name || !!!p.orientacao_sexual || !!!p.identidade_genero || !!!p.etnia || !!!p.city || !!!p.membro_conselho) { |
1504 | $scope.profileComplete = false; | 1506 | $scope.profileComplete = false; |
1505 | } | 1507 | } |
1506 | }; | 1508 | }; |
www/js/filters.js
@@ -46,4 +46,12 @@ filter('generoFilter', function() { | @@ -46,4 +46,12 @@ filter('generoFilter', function() { | ||
46 | genero[2] = 'Feminino'; | 46 | genero[2] = 'Feminino'; |
47 | return genero[type]; | 47 | return genero[type]; |
48 | }; | 48 | }; |
49 | +}). | ||
50 | +filter('membroConselhoFilter', function() { | ||
51 | + return function(type) { | ||
52 | + var membro = {}; | ||
53 | + membro[1] = 'Sim'; | ||
54 | + membro[2] = 'Não'; | ||
55 | + return membro[type]; | ||
56 | + }; | ||
49 | }); | 57 | }); |