How to add mask for component input text bootsfaces? - input

I would like to know how to add mask for component input text bootsfaces

Are you perhaps looking for the inputSecret? https://showcase.bootsfaces.net/forms/inputSecret.jsf

Update May, 23 2017: Jasper de Vries provided a pull request to BootsFaces implemting the input mask. So the feature will be part of BootsFaces 1.1.1+ (i.e. 1.1.2 or higher).
Original answer:
We haven't implemented this feature yet (see https://github.com/TheCoder4eu/BootsFaces-OSP/issues/267). But I'm sure you can add it using the input mask of Robin Herbots.
If you want the BootsFaces team to prioritize the feature, please tell us on our bug tracker. Thanks!

Examples of predifined Mask:
<b:inputText value="#{bean.val}" mask="numeric" label="numeric input"/>
<b:inputText value="#{bean.val2}" mask="alphabetical" label="alphabetical input"/>
<b:inputText value="#{bean.val3}" mask="alphanumeric" label="alphanumeric input" />

Related

Control/filter to show/hide on Data Studio

I'm trying to make a line chart on Data Studio but I'm going crazy.
I need to do a control/filter for METR_1, METR_2, METR_3, to hide/show them or just one of them.
DIMEN
METR_1
METR_2
METR_3
DIMEN1
Metr_1a
Metr_2a
Metr_3a
DIMEN2
Metr_1b
Metr_2b
Metr_3b
DIMEN3
Metr_1c
Metr_2c
Metr_3c
In all my solutions, I have to replace the dimension but I need it.
Do you have any advice?
Thanks anyway
Not sure if this solves your problem (could you share a screenshot of your line chart?) but you might be looking for the optional metric feature. More instructions at the link, but you can enable this by flipping a switch in the 'Metrics' panel.
Your report users will be able to select any combination of metrics (METR_1, METR_2, METR_3) for display, from the chart header.

Is using Javascript in odoo.fields.HTML possible?

I want to integrate Adobe Captivate Content (Export: index.html, along with src-folder) into ODOO Community Edition v13 e-Learning Module (website_slides).
The slide.slide model already offers slide_type 'webpage' alongside the field 'html_content'.
The field 'html_content' is of type odoo.fields.HTML. To get the requirement stated above to work, I need to embed Javascript in the given html_content. It seems like the JS-scripts are not working. I also tried with a simple Hello World script.
Can someone help?
Best regards,
Lars
I found the solution already.
Looking at odoo/fields.py -> class Html, you can see that by default the given value is being sanitized using odoo/tools/mail.py -> html_sanitize(), which removes the HTML-Elements in 'tags_to_kill'. 'tags_to_kill' also contains "script".
After overriding html_content in slide.slide with the following, the Javascript-code is being executed:
html_content = fields.Html(
sanitize=False,
sanitize_tags=False,
sanitize_attributes=False)

Using datepicker in DotNetNuke-7 module

I'm a DNN beginner. I am currently building a module in which I can display statistics. My DotNetNuke Version is 7.0. The statistic is from Chartjs. For this statistic I would like to implement filters. These filters should be datepickers. As UI element I have now included a textbox with TextMode='Date'. But currently I have problems to set the default value of this field. The default value should be 01.01. of the current year.
I have already tried to set the value via C# server side. Unfortunately without success. I also tried to set the value on the client side via JavaScript. Unfortunately also without success.
These are some lines I tried in JavaScript:
document.getElementById(<%= this.DatumVon.AccessKey %>).value = "01.01.2019";
document.getElementById(<%= this.DatumVon.AccessKey %>).innerText = "01.01.2019";
document.getElementById("DatumVon").value = "01.01.2019";
These are some lines I tried in C# in the method "Page_Load" (server side):
this.DatumVon.Text = "01.01.2019";
I expected the value of the TextBox to be 01.01.2019. However, it currently only contains dd.mmm.yyyy. How can I change this?
Thank you.
There is something wrong with your localization. Please refer to the jQuery UI datepicker documentation (the "Localization" section), this should give you the answer.
wow... I solved it. I made it. Sometimes the solution is right in front of you and you don't see it. Michael Tobisch was absolutely right. When setting the value, the format is very important. I have always used the German format. A DNN TextBox with TextMode="Date" can't handle that. DNN converts this TextBox into an HTML input field. But this input field can only be clear with the format "yyyy-mm-dd". Depending on the geographical position of the client (at least that's what I think) the text displayed in the input field will be formatted. But the value of the input field always has the same format ("yyyy-mm-dd"). So very important here: the displayed text and the actual value have different formats.
Many thanks again to Michael Tobisch for the mental inspiration and the patience with me.
What is also important is that the access to the actual ID of a DNN element works as follows: this.Element.ClientID and not as I assumed before this.Element.AccessKey. This was also buggy.

Update MKPF text during save in MB1A tcode

I am working on a requirement to update MKPF-BKTXT during save in MB1A tcode. I found MB_DOCUMENT_BADI, but the methods of the BADI only allows importing parameters and does not allow changing MKPF.
Has anyone in the community worked on similar? How to do this?
You can use BTE event 00001120 to do that and substitute BKTXT. Here is the detailed guide:
https://wiki.scn.sap.com/wiki/display/ERPFI/Example+for+BTE+00001120
Just create Product, register your custom FM as process module and code your substitution.

Drupal Views - Custom / Modded SQL

I am having an issue with the "Profile Checkboxes" module which stores custom profile fields comma separated.
The issue is if I create a view to filter by a value. The SQL result ends up being something like this:
...AND (profile_values_profile_interests.value in ('Business and Investment'))...
Which will not return any data since the value is stored like this:
"Business and Investment, Case Law, Labor Law, Tax Law"
I just need to adjust the SQL so that it is making sure the field contains the selected value
Is there anything I can do to adjust this?
For a 'quick hack' solution, you could try implementing hook_views_query_alter(&$view, &$query) in a custom module, check $view->name (and eventually also $view->current_display) to ensure you are dealing with the right view/display, and then manipulate $query as needed.
EDIT: Looks like the underlying problem has been addressed by the module maintainer in the meantime - see John's answer ...
I'm the creator and maintainer of Profile Checkboxes and thought you might be interested to know that the new version of the module now stores the values as serialized and includes Views support. The feature is available in the current release version.
Check out the Views modify query module.