fixed geolocation bug
This commit is contained in:
parent
9a87031385
commit
c83e583aa1
|
@ -253,7 +253,7 @@ FormSubmissionSchema.pre('save', function (next){
|
|||
if(this.isModified('ipAddr') || !this.geoLocation){
|
||||
freegeoip.getLocation(this.ipAddr, function(err, location){
|
||||
if(err) return next(err);
|
||||
self.geoLocation = JSON.parse(location);
|
||||
self.geoLocation = location
|
||||
return next();
|
||||
});
|
||||
}
|
||||
|
|
10
public/dist/application.js
vendored
10
public/dist/application.js
vendored
File diff suppressed because one or more lines are too long
4
public/dist/application.min.js
vendored
4
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
10
public/dist/form-application.js
vendored
10
public/dist/form-application.js
vendored
File diff suppressed because one or more lines are too long
4
public/dist/form-application.min.js
vendored
4
public/dist/form-application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,27 +0,0 @@
|
|||
<div class="field row dropdown" ng-click="setActiveField(field._id, index, true)" ng-if="field.fieldOptions.length > 0">
|
||||
<div class="col-xs-12 field-title" ng-style="{'color': design.colors.questionColor}">
|
||||
<h3>
|
||||
<span class="fa fa-angle-double-right"></span>
|
||||
{{field.title}}
|
||||
<span class="required-error" ng-show="!field.required">{{ 'OPTIONAL' | translate }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-xs-12 field-input ">
|
||||
<ui-select ng-model="field.fieldValue"
|
||||
theme="selectize"
|
||||
ng-model-options="{ debounce: 250 }"
|
||||
ng-required="field.required"
|
||||
ng-disabled="field.disabled"
|
||||
ng-focus="setActiveField(field._id, index, true)">
|
||||
<ui-select-match placeholder="Type or select an option">
|
||||
{{$select.selected.option_value}}
|
||||
</ui-select-match>
|
||||
<ui-select-choices
|
||||
repeat="option in field.fieldOptions | filter: $select.search"
|
||||
ng-class="{'active': option.option_value === field.fieldValue }">
|
||||
<span ng-bind-html="option.option_value | highlight: $select.search"></span>
|
||||
</ui-select-choices>
|
||||
</ui-select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
|
@ -25,6 +25,7 @@
|
|||
{{$index+1}}
|
||||
</div>
|
||||
<input ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}"
|
||||
style="visibility:hidden;"
|
||||
type="radio" class="focusOn"
|
||||
ng-focus="setActiveField(field._id, index, true)"
|
||||
value="{{option.option_value}}"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<div class="btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs"
|
||||
<div class="btn btn-lg btn-default hidden-xs"
|
||||
style="padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)">
|
||||
<button ng-disabled="!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid"
|
||||
ng-style="{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}"
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs"
|
||||
<div class="btn btn-lg btn-default hidden-xs"
|
||||
style="padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)">
|
||||
<button ng-disabled="!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid"
|
||||
ng-style="{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
</div>
|
||||
|
||||
<div class="col-xs-12 field-input">
|
||||
<div class="row">
|
||||
<label class="btn btn-default col-md-2 col-sm-3 col-xs-7"
|
||||
<div class="row col-xs-12">
|
||||
<label class="btn btn-default"
|
||||
style="background: rgba(0,0,0,0.1); text-align:left;">
|
||||
<input type="radio" value="true"
|
||||
class="focusOn"
|
||||
|
@ -39,8 +39,8 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 10px;">
|
||||
<label class="btn btn-default col-md-2 col-sm-3 col-xs-7"
|
||||
<div class="row col-xs-12" style="margin-top: 10px;">
|
||||
<label class="btn btn-default"
|
||||
style="background: rgba(0,0,0,0.1); text-align:left;">
|
||||
|
||||
<input type="radio" value="false"
|
||||
|
|
Loading…
Reference in a new issue