Skip to content

Beautiful Open-Source Form Builder

remove extra old code + fix middleware JS set layout (#82)

Chirag049649a81e49
diff --git a/app/Http/Requests/UserFormRequest.php b/app/Http/Requests/UserFormRequest.php
index 74925b243..f972c5770 100644
--- a/app/Http/Requests/UserFormRequest.php
+++ b/app/Http/Requests/UserFormRequest.php
@@ -100,13 +100,10 @@ abstract class UserFormRequest extends \Illuminate\Foundation\Http\FormRequest
// Date field
'properties.*.with_time' => 'boolean|nullable',
- 'properties.*.use_am_pm' => 'boolean|nullable',
'properties.*.date_range' => 'boolean|nullable',
'properties.*.prefill_today' => 'boolean|nullable',
'properties.*.disable_past_dates' => 'boolean|nullable',
'properties.*.disable_future_dates' => 'boolean|nullable',
- 'properties.*.simple_date_input' => 'boolean|nullable',
- 'properties.*.simple_date_input_format' => 'string|nullable',
// Select / Multi Select field
'properties.*.allow_creation' => 'boolean|nullable',
diff --git a/resources/js/components/open/forms/OpenForm.vue b/resources/js/components/open/forms/OpenForm.vue
index 4d3e8c227..118649a9b 100644
--- a/resources/js/components/open/forms/OpenForm.vue
+++ b/resources/js/components/open/forms/OpenForm.vue
@@ -435,9 +435,6 @@ export default {
} else if (field.date_range) {
inputProperties.dateRange = true
}
- if (field.use_am_pm) {
- inputProperties.amPm = true
- }
if (field.disable_past_dates) {
inputProperties.disablePastDates = true
} else if (field.disable_future_dates) {
diff --git a/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue b/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue
index b6b6347ed..710856f54 100644
--- a/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue
+++ b/resources/js/components/open/forms/fields/FormFieldOptionsModal.vue
@@ -419,9 +419,6 @@ export default {
if (['text', 'number', 'url', 'email', 'phone_number'].includes(this.field.type) && !this.field.max_char_limit) {
this.field.max_char_limit = 2000
}
- if (this.field.type == 'date' && !this.field.simple_date_input_format) {
- this.field.simple_date_input_format = this.dateFormatOptions[0]['value']
- }
},
methods: {
@@ -463,14 +460,12 @@ export default {
if (this.field.date_range) {
this.$set(this.field, 'with_time', false)
this.$set(this.field, 'prefill_today', false)
- this.$set(this.field, 'simple_date_input', false)
}
},
onFieldWithTimeChange(val) {
this.$set(this.field, 'with_time', val)
if (this.field.with_time) {
this.$set(this.field, 'date_range', false)
- this.$set(this.field, 'simple_date_input', false)
}
},
onFieldGenUIdChange(val) {
@@ -538,13 +533,6 @@ export default {
this.$set(this.field, 'disable_past_dates', false)
this.$set(this.field, 'prefill_today', false)
}
- },
- onFieldSimpleDateInputChange(val) {
- this.$set(this.field, 'simple_date_input', val)
- if (this.field.simple_date_input) {
- this.$set(this.field, 'with_time', false)
- this.$set(this.field, 'date_range', false)
- }
}
}
}
diff --git a/resources/js/router/index.js b/resources/js/router/index.js
index 41a3ea7e5..bbca43496 100644
--- a/resources/js/router/index.js
+++ b/resources/js/router/index.js
@@ -237,10 +237,6 @@ function scrollBehavior (to, from, savedPosition) {
})
}
-/**
- * @param {Object} requireContext
- * @return {Object}
- */
/**
* @param {Object} requireContext
* @return {Object}