From 420a25872e0453a5f2787e8146ebfe5967821d5a Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Mon, 14 Nov 2022 23:12:39 +0100 Subject: [PATCH] Allow input placeholder in theme settings --- app/controllers/settings/theme_controller.rb | 2 +- app/views/settings/theme/edit.html.haml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/controllers/settings/theme_controller.rb b/app/controllers/settings/theme_controller.rb index 22b702a2..14d6457b 100644 --- a/app/controllers/settings/theme_controller.rb +++ b/app/controllers/settings/theme_controller.rb @@ -19,7 +19,7 @@ class Settings::ThemeController < ApplicationController raised_background raised_accent background_color body_text muted_text input_color - input_text + input_text input_placeholder ]) if current_user.theme.nil? diff --git a/app/views/settings/theme/edit.html.haml b/app/views/settings/theme/edit.html.haml index 03623b73..51caa6fe 100644 --- a/app/views/settings/theme/edit.html.haml +++ b/app/views/settings/theme/edit.html.haml @@ -87,6 +87,14 @@ = f.text_field :input_color, class: "color", data: { default: 0xFFFFFF } .col-sm-6 = f.text_field :input_text, class: "color", data: { default: 0x000000 } + + .row + .col-sm-6 + = f.text_field :input_placeholder, class: "color", data: { default: 0x6C757D } + .col-sm-6 + .form-group + %label Example Input + %input.form-control{ placeholder: "A test placeholder" } .card .card-body %h2= t(".raised.heading") @@ -105,4 +113,4 @@ = f.primary - provide(:title, generate_title(t(".title"))) -- parent_layout "user/settings" \ No newline at end of file +- parent_layout "user/settings"