From 877cc3c92c199ae747e37b5f72fdb889b7c23c97 Mon Sep 17 00:00:00 2001 From: Thomas JUND Date: Thu, 29 Apr 2021 11:24:05 +0200 Subject: [PATCH 2/2] manager: add styles for weekdays buttons group (#50560) --- chrono/manager/static/css/style.scss | 31 +++++++++++++++++++ .../templates/chrono/widgets/weekdays.html | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/chrono/manager/static/css/style.scss b/chrono/manager/static/css/style.scss index ce9db0e..fe29a20 100644 --- a/chrono/manager/static/css/style.scss +++ b/chrono/manager/static/css/style.scss @@ -446,3 +446,34 @@ $booking-colors: ( form div.widget[id^=id_recurrence] { padding-left: 1em; } + +// weekdays buttons group +// display weeks checkboxs to buttons group +.weekdays-buttons-group { + display: table; + border-collapse: collapse; + font-size: 1.2em; + margin: 0.2em 0px; + overflow: hidden; + input { + display: none; + } + label { + display: table-cell; + border: 1px solid #386ede; + padding: 0.33em 0.66em; + color: #386ede; + cursor: pointer; + font-weight: 500; + line-height: 1; + + &:hover { + background-color: #eee; + } + } + input:checked + label { + background-color: #386ede; + color: white; + border-color: #386ede white; + } +} diff --git a/chrono/manager/templates/chrono/widgets/weekdays.html b/chrono/manager/templates/chrono/widgets/weekdays.html index 23a0a88..338524a 100644 --- a/chrono/manager/templates/chrono/widgets/weekdays.html +++ b/chrono/manager/templates/chrono/widgets/weekdays.html @@ -1,5 +1,5 @@ {% spaceless %} - + {% for group, options, index in widget.optgroups %} {% for option in options %} {% include "django/forms/widgets/input.html" with widget=option %} -- 2.20.1