removed complex form save logic
This commit is contained in:
parent
22fab93a55
commit
ef9265576c
@ -264,6 +264,14 @@ function formFieldsAllHaveIds(form_fields){
|
||||
return true;
|
||||
}
|
||||
|
||||
FormSchema.pre('save', function (next) {
|
||||
this.form_fields = this.form_fields.filter(function(field){
|
||||
return !field.deletePreserved;
|
||||
});
|
||||
next();
|
||||
});
|
||||
|
||||
/*
|
||||
FormSchema.pre('save', function (next) {
|
||||
var that = this;
|
||||
var _original;
|
||||
@ -374,6 +382,7 @@ FormSchema.pre('save', function (next) {
|
||||
next();
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
FormSchema.index({created: 1});
|
||||
|
||||
|
||||
@ -176,6 +176,7 @@ describe('FormSubmission Model Unit Tests:', function() {
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
describe('Test FormField and Submission Logic', function() {
|
||||
|
||||
beforeEach(function(done){
|
||||
@ -245,6 +246,7 @@ describe('FormSubmission Model Unit Tests:', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
afterEach(function(done) {
|
||||
Form.remove().exec(function() {
|
||||
|
||||
@ -112,30 +112,30 @@
|
||||
/*
|
||||
** Edit Modal
|
||||
*/
|
||||
.admin-form .edit-modal-window .modal-dialog {
|
||||
.edit-modal-window .modal-dialog {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.admin-form .edit-modal-window .modal-body {
|
||||
.edit-modal-window .modal-body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.admin-form .edit-modal-window .edit-panel {
|
||||
.edit-modal-window .edit-panel {
|
||||
background-color: #F1F1F1;
|
||||
padding: 0 35px 0 35px;
|
||||
}
|
||||
|
||||
.admin-form .edit-modal-window .preview-field-panel {
|
||||
.edit-modal-window .preview-field-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.admin-form .edit-modal-window .preview-field-panel form {
|
||||
.edit-modal-window .preview-field-panel form {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.admin-form .edit-modal-window .preview-field {
|
||||
.edit-modal-window .preview-field {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
|
||||
@ -186,7 +186,6 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Edit EndPage Modal Dialog Template -->
|
||||
<script type="text/ng-template" id="editEndPageModal.html" class="edit-endpage-modal">
|
||||
<div class="modal-body">
|
||||
@ -527,7 +526,7 @@
|
||||
|
||||
<div class="panel-group dropzone col-xs-12" ui-sortable="sortableOptions" ng-model="myform.form_fields">
|
||||
|
||||
<div class="col-xs-12 field-row" ng-repeat="field in myform.form_fields track by $id($index)" ng-if="!field.deletePreserved">
|
||||
<div class="col-xs-12 field-row" ng-repeat="field in myform.form_fields track by $index" ng-hide="field.deletePreserved">
|
||||
<div class="col-xs-10">
|
||||
<div class="panel panel-default" ng-click="openEditModal(field, true, $index)">
|
||||
<div class="panel-heading">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user