diff --git a/app/Http/Controllers/Api/FormController.php b/app/Http/Controllers/Api/FormController.php index 81e6f422..e17d977b 100644 --- a/app/Http/Controllers/Api/FormController.php +++ b/app/Http/Controllers/Api/FormController.php @@ -94,6 +94,7 @@ public function update(Request $request, Form $form) 'user_message_text_color', 'interaction_background_color', 'interaction_text_color', + 'use_brighter_inputs', 'show_form_progress', 'cta_link', 'cta_label', diff --git a/app/Http/Resources/PublicFormResource.php b/app/Http/Resources/PublicFormResource.php index d2122146..ec5978b9 100644 --- a/app/Http/Resources/PublicFormResource.php +++ b/app/Http/Resources/PublicFormResource.php @@ -26,6 +26,8 @@ public function toArray($request) 'contrast_color' => $this->contrast_color, 'privacy_link' => $this->privacy_link, 'legal_notice_link' => $this->legal_notice_link, + 'use_brighter_inputs' => $this->use_brighter_inputs, + 'show_form_progress' => $this->show_form_progress, 'eoc_text' => $this->eoc_text, 'eoc_headline' => $this->eoc_headline, 'cta_label' => $this->cta_label, diff --git a/app/Models/Form.php b/app/Models/Form.php index a4095573..49e540bb 100644 --- a/app/Models/Form.php +++ b/app/Models/Form.php @@ -30,6 +30,7 @@ class Form extends BaseModel protected $casts = [ 'is_notification_via_mail' => 'boolean', 'show_cta_link' => 'boolean', + 'use_brighter_inputs' => 'boolean', 'show_form_progress' => 'boolean', 'cta_append_params' => 'boolean', 'cta_append_session_id' => 'boolean', @@ -96,6 +97,7 @@ class Form extends BaseModel 'twitter', 'show_cta_link', 'show_social_links', + 'use_brighter_inputs', 'show_form_progress', ]; diff --git a/database/migrations/2023_11_30_124841_add_use_brighter_inputs_attribute_to_forms.php b/database/migrations/2023_11_30_124841_add_use_brighter_inputs_attribute_to_forms.php new file mode 100644 index 00000000..f33a4245 --- /dev/null +++ b/database/migrations/2023_11_30_124841_add_use_brighter_inputs_attribute_to_forms.php @@ -0,0 +1,18 @@ +boolean('use_brighter_inputs')->default(false)->after('message_background_color'); + }); + } +}; diff --git a/resources/js/components/CharCount.vue b/resources/js/components/CharCount.vue index 63dc1b7a..bf528e5c 100644 --- a/resources/js/components/CharCount.vue +++ b/resources/js/components/CharCount.vue @@ -5,7 +5,7 @@ :class="[ hasMaxChars && charCount > maxChars ? 'font-medium text-red-600' - : 'text-grey-600', + : 'text-content/80', ]" > {{ charCount }} diff --git a/resources/js/components/Factory/Settings/Appearance.vue b/resources/js/components/Factory/Settings/Appearance.vue index 2b27ee8c..0c1c0694 100644 --- a/resources/js/components/Factory/Settings/Appearance.vue +++ b/resources/js/components/Factory/Settings/Appearance.vue @@ -24,6 +24,19 @@ +
+ + +
+
@@ -54,6 +67,7 @@ const brandColor = ref(store?.form?.brand_color); const backgroundColor = ref(store?.form?.background_color); const textColor = ref(store?.form?.text_color); +const useBrighterInputs = ref(store?.form?.use_brighter_inputs); const showFormProgress = ref(store?.form?.show_form_progress); const saveOptions = async () => { @@ -64,6 +78,7 @@ const saveOptions = async () => { background_color: backgroundColor.value, text_color: textColor.value, show_form_progress: showFormProgress.value, + use_brighter_inputs: useBrighterInputs.value, }); isSaving.value = false; diff --git a/resources/js/forms/classic/ClassicForm.vue b/resources/js/forms/classic/ClassicForm.vue index c97c3597..0a33211e 100644 --- a/resources/js/forms/classic/ClassicForm.vue +++ b/resources/js/forms/classic/ClassicForm.vue @@ -108,6 +108,7 @@ const backgroundColor = useThemableColor( store.form?.background_color ?? "#ffffff", ); const textColor = useThemableColor(store.form?.text_color ?? "#000000"); +const brightness = store.form?.use_brighter_inputs ? 1.5 : 1; diff --git a/resources/js/forms/classic/interactions/ButtonAction.vue b/resources/js/forms/classic/interactions/ButtonAction.vue index f6807600..3c45178a 100644 --- a/resources/js/forms/classic/interactions/ButtonAction.vue +++ b/resources/js/forms/classic/interactions/ButtonAction.vue @@ -2,7 +2,7 @@