inputSwitch onLabel and offLabel not working

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
brazao
Posts: 2
Joined: 31 Oct 2013, 20:45

14 Aug 2017, 18:43

Hello,
I'm trying to use the input labels and have noticed that it's not working, use the same form in another project with Spark theme and it works

<p:inputSwitch value="#{value}" onLabel="Sim" offLabel="Não"/>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

17 Aug 2017, 13:52

Ultima and Barcelona have Material design. Please see switch component according to this design; https://material.io/guidelines/componen ... ols-switch

You need to override inputswitch component;

Code: Select all

<style type="text/css">
    body .ui-inputswitch {
        width: 68px !important;
        height: 25px;
        -moz-border-radius: 0px;
        -webkit-border-radius: 0px;
        border-radius: 0px;
    }
    body .ui-inputswitch .ui-inputswitch-off span, body .ui-inputswitch .ui-inputswitch-on span {
        visibility: visible;
    }
    body .ui-inputswitch .ui-inputswitch-handle {
        top: 0;
        width: 31px !important;
        height: 25px !important;
        -moz-border-radius: 0;
        -webkit-border-radius: 0;
        border-radius: 0;
    }
</style>

brazao
Posts: 2
Joined: 31 Oct 2013, 20:45

22 Aug 2017, 19:41

It worked, thanks.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

13 Sep 2017, 09:43

Glad to hear, thanks for the update!

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests