Skip to content

Commit 2369755

Browse files
committed
Merge branch 'release/1.9.26'
2 parents ec34a9a + 9714067 commit 2369755

File tree

19 files changed

+179
-814
lines changed

19 files changed

+179
-814
lines changed

Config/instanceConfigurator/src/org/akvo/flow/InstanceConfigurator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ public static void main(String[] args) throws Exception {
209209
apkData.put("awsAccessKeyId", accessKeys.get(apkUser).getAccessKeyId());
210210
apkData.put("awsSecretKey", accessKeys.get(apkUser).getSecretAccessKey());
211211
apkData.put("serverBase", "https://" + gaeId + ".appspot.com");
212+
apkData.put("instanceUrl", "https://" + alias);
212213
apkData.put("restApiKey", apiKey);
213214

214215
Template t3 = cfg.getTemplate("survey.properties.ftl");

Config/instanceConfigurator/src/org/akvo/flow/templates/survey.properties.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ awsBucket = ${awsBucket}
22
awsAccessKeyId = ${awsAccessKeyId}
33
awsSecretKey = ${awsSecretKey}
44
serverBase = ${serverBase}
5+
instanceUrl = ${instanceUrl}
56
apiKey = ${restApiKey}

Dashboard/app/js/lib/views/surveys/question-view.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,12 @@ FLOW.QuestionView = FLOW.View.extend({
113113
}
114114
}.property('this.type').cacheable(),
115115

116-
amNoOptionsType: function () {
116+
hasExtraSettings: function () {
117117
var val;
118118
if (!Ember.none(this.type)) {
119119
val = this.type.get('value');
120-
return val === 'PHOTO' || val === 'VIDEO' || val === 'DATE' || val === 'SIGNATURE';
120+
return val === 'GEOSHAPE' || val === 'CASCADE' || val === 'NUMBER' || val === 'GEO'
121+
|| val === 'FREE_TEXT' || val === 'SCAN' || val === 'OPTION' || val === 'CADDISFLY';
121122
}
122123
}.property('this.type').cacheable(),
123124

@@ -141,12 +142,11 @@ FLOW.QuestionView = FLOW.View.extend({
141142
return (this.content && this.content.get('type') === 'SIGNATURE')
142143
|| (this.type && this.type.get('value') === 'SIGNATURE');
143144
}.property('this.type'),
144-
145-
amCaddisflyType: function () {
146-
return (this.content && this.content.get('type') === 'CADDISFLY'
147-
|| (this.type && this.type.get('value') === 'CADDISFLY'));
148-
}.property('this.type').cacheable(),
149-
145+
146+
amCaddisflyType: function(){
147+
return this.type && this.type.get('value') == 'CADDISFLY';
148+
}.property('this.type').cacheable(),
149+
150150
showLocaleName: function () {
151151
if (!this.type) {
152152
return false;
@@ -219,7 +219,6 @@ FLOW.QuestionView = FLOW.View.extend({
219219
FLOW.selectedControl.set('selectedCaddisflyResource',caddResource);
220220
}
221221
}
222-
223222
// if the dependentQuestionId is not null, get the question
224223
if (!Ember.empty(FLOW.selectedControl.selectedQuestion.get('dependentQuestionId'))) {
225224
dependentQuestion = FLOW.store.find(FLOW.Question, FLOW.selectedControl.selectedQuestion.get('dependentQuestionId'));
@@ -860,7 +859,7 @@ FLOW.QuestionView = FLOW.View.extend({
860859
this.set('showAddAttributeDialogBool', false);
861860
},
862861

863-
validateQuestionObserver: function(){
862+
validateQuestionObserver: function () {
864863
this.set('questionValidationFailure', (this.text != null && this.text.length > 500));
865864
}.observes('this.text'),
866865

Dashboard/app/js/templates/navData/cascade-resources.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
{{/view}}
9393
{{/each}}
9494
</ul>
95-
<div class="addLevelBtn"><a {{action "addLevel" target="this"}} class="addLevel btn addBtn">{{t _add_level}}</a></div>
95+
<div class="addLevelBtn"><a {{action "addLevel" target="this"}} class="smallButton">{{t _add_level}}</a></div>
9696
</nav>
9797
</section>
9898
<section {{bindAttr class="view.showImportDialog:hidden:shown :levelColumns :floats-in"}}>

Dashboard/app/js/templates/navReports/export-reports.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<section class="exportContainer">
3535
<ul class="exportSelect">
3636
<li class="dataCleanExp trigger" onclick="openExportOptions(event, 'dataCleanExp_options')">
37-
<h2>{{t _data_cleaning_export }}</h2>
37+
<h2>{{t _data_cleaning_export}}</h2>
3838
<h6>{{t _importable_back_to_akvo_flow}}</h6>
3939
<p class="expDescr">{{t _combines_options}}</p>
4040
<div id="dataCleanExp_options" class="options">
@@ -94,7 +94,7 @@
9494
</div>
9595
</li>
9696
<li class="surveyFormExp trigger" onclick="openExportOptions(event, 'surveyFormExp_options')">
97-
<h2>{{t _survey_form }}</h2>
97+
<h2>{{t _survey_form}}</h2>
9898
<p class="expDescr">{{t _printable}}</p>
9999
<div id="surveyFormExp_options" class="options">
100100
<a {{action showSurveyForm target="this"}} class="button trigger2">{{t _download}}</a>

Dashboard/app/js/templates/navSurveys/question-view.handlebars

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@
6262
{{/if}}
6363

6464
<!-- Question specific material -->
65+
{{#if view.hasExtraSettings}}
6566
<div class="questionOption floats-in">
66-
6767
{{#if view.amOptionType}}
68+
6869
<h1 class="answerNbr">{{t _settings}}: </h1>
6970
<ul>
7071
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowMultipleFlag"}}{{t _allow_multiple}} </label></li>
@@ -149,14 +150,9 @@
149150
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.geoLocked"}}{{t _disable_manual_geo_edit}} </label></li>
150151
</ul>
151152
{{/if}}
152-
153-
{{#if view.amNoOptionsType}}
154-
<p class="noOptions">
155-
{{t _no_additional_settings_for_this_type_of_question}}
156-
</p>
157-
{{/if}}
158-
159153
</div>
154+
{{/if}}
155+
<!-- End of question specific material -->
160156
<div class="dependencyBlock">
161157
<label class="labelcheckbox">{{view Ember.Checkbox checkedBinding="view.dependentFlag"}}{{t _dependent}}
162158
</label>

GAE/src/com/gallatinsystems/surveyal/app/web/SurveyalRestServlet.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,6 @@ private void ingestSurveyInstance(SurveyInstance surveyInstance) {
292292
// TODO: move this to survey instance processing logic
293293
// if we have a geoPlace, set it on the instance
294294
surveyInstance.setCountryCode(geoPlace.getCountryCode());
295-
surveyInstance.setSublevel1(geoPlace.getSub1());
296-
surveyInstance.setSublevel2(geoPlace.getSub2());
297-
surveyInstance.setSublevel3(geoPlace.getSub3());
298-
surveyInstance.setSublevel4(geoPlace.getSub4());
299-
surveyInstance.setSublevel5(geoPlace.getSub5());
300-
surveyInstance.setSublevel6(geoPlace.getSub6());
301295
}
302296

303297
// add surveyInstanceId to list of contributed surveyInstances
@@ -416,12 +410,6 @@ private GeoPlace getGeoPlace(Double lat, Double lon) {
416410
private void setGeoData(GeoPlace geoPlace, SurveyedLocale l) {
417411
if (geoPlace != null) {
418412
l.setCountryCode(geoPlace.getCountryCode());
419-
l.setSublevel1(geoPlace.getSub1());
420-
l.setSublevel2(geoPlace.getSub2());
421-
l.setSublevel3(geoPlace.getSub3());
422-
l.setSublevel4(geoPlace.getSub4());
423-
l.setSublevel5(geoPlace.getSub5());
424-
l.setSublevel6(geoPlace.getSub6());
425413
}
426414
}
427415

@@ -533,12 +521,6 @@ private List<SurveyalValue> constructValues(SurveyedLocale l) {
533521
}
534522
// TODO: resolve score
535523
val.setOrganization(l.getOrganization());
536-
val.setSublevel1(l.getSublevel1());
537-
val.setSublevel2(l.getSublevel2());
538-
val.setSublevel3(l.getSublevel3());
539-
val.setSublevel4(l.getSublevel4());
540-
val.setSublevel5(l.getSublevel5());
541-
val.setSublevel6(l.getSublevel6());
542524
val.setSurveyInstanceId(ans.getSurveyInstanceId());
543525
val.setSystemIdentifier(l.getSystemIdentifier());
544526

GAE/src/com/gallatinsystems/surveyal/domain/SurveyalValue.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ public class SurveyalValue extends BaseDomain {
6060
private Double numericValue;
6161
private String organization;
6262
private String countryCode;
63-
private String sublevel1;
64-
private String sublevel2;
65-
private String sublevel3;
66-
private String sublevel4;
67-
private String sublevel5;
68-
private String sublevel6;
6963
private String localeType;
7064
private String systemIdentifier;
7165
private String questionType;
@@ -110,54 +104,6 @@ public void setCountryCode(String countryCode) {
110104
this.countryCode = countryCode;
111105
}
112106

113-
public String getSublevel1() {
114-
return sublevel1;
115-
}
116-
117-
public void setSublevel1(String sublevel1) {
118-
this.sublevel1 = sublevel1;
119-
}
120-
121-
public String getSublevel2() {
122-
return sublevel2;
123-
}
124-
125-
public void setSublevel2(String sublevel2) {
126-
this.sublevel2 = sublevel2;
127-
}
128-
129-
public String getSublevel3() {
130-
return sublevel3;
131-
}
132-
133-
public void setSublevel3(String sublevel3) {
134-
this.sublevel3 = sublevel3;
135-
}
136-
137-
public String getSublevel4() {
138-
return sublevel4;
139-
}
140-
141-
public void setSublevel4(String sublevel4) {
142-
this.sublevel4 = sublevel4;
143-
}
144-
145-
public String getSublevel5() {
146-
return sublevel5;
147-
}
148-
149-
public void setSublevel5(String sublevel5) {
150-
this.sublevel5 = sublevel5;
151-
}
152-
153-
public String getSublevel6() {
154-
return sublevel6;
155-
}
156-
157-
public void setSublevel6(String sublevel6) {
158-
this.sublevel6 = sublevel6;
159-
}
160-
161107
public String getLocaleType() {
162108
return localeType;
163109
}

GAE/src/com/gallatinsystems/surveyal/domain/SurveyedLocale.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ public class SurveyedLocale extends BaseDomain {
5757
private String identifier;
5858
private String displayName;
5959
private String countryCode;
60-
private String sublevel1;
61-
private String sublevel2;
62-
private String sublevel3;
63-
private String sublevel4;
64-
private String sublevel5;
65-
private String sublevel6;
6660
private Set<Long> surveyInstanceContrib;
6761
private List<String> geocells;
6862
private String localeType;
@@ -129,54 +123,6 @@ public void setCountryCode(String countryCode) {
129123
this.countryCode = countryCode;
130124
}
131125

132-
public String getSublevel1() {
133-
return sublevel1;
134-
}
135-
136-
public void setSublevel1(String sublevel1) {
137-
this.sublevel1 = sublevel1;
138-
}
139-
140-
public String getSublevel2() {
141-
return sublevel2;
142-
}
143-
144-
public void setSublevel2(String sublevel2) {
145-
this.sublevel2 = sublevel2;
146-
}
147-
148-
public String getSublevel3() {
149-
return sublevel3;
150-
}
151-
152-
public void setSublevel3(String sublevel3) {
153-
this.sublevel3 = sublevel3;
154-
}
155-
156-
public String getSublevel4() {
157-
return sublevel4;
158-
}
159-
160-
public void setSublevel4(String sublevel4) {
161-
this.sublevel4 = sublevel4;
162-
}
163-
164-
public String getSublevel5() {
165-
return sublevel5;
166-
}
167-
168-
public void setSublevel5(String sublevel5) {
169-
this.sublevel5 = sublevel5;
170-
}
171-
172-
public String getSublevel6() {
173-
return sublevel6;
174-
}
175-
176-
public void setSublevel6(String sublevel6) {
177-
this.sublevel6 = sublevel6;
178-
}
179-
180126
public String getLocaleType() {
181127
return localeType;
182128
}

0 commit comments

Comments
 (0)