Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Allow for specification of max length of text box and text area in service dialog element creation #1226

Open
Cameronwyatt opened this issue Dec 12, 2014 · 11 comments

Comments

@Cameronwyatt
Copy link

Currently the max length allowed for both text boxes and text areas is hard coded. The values are 50 for a text box and 8196 for a text area. They can be found at vmdb/app/views/miq_ae_customization/_dialog_field_form.html.haml on lines 60 and 49 respectively.

The max length can be too short for a text box, and unnecessarily long for a text area. One of the main issues I have run into with the max length of the text boxes is that URLs can easily be longer than 50 characters. The reason that we want the URLs to be entered in a text box instead of a text area is that a text area will allow for newline characters, which can cause issues if the input is not sanitized correctly. Currently the ability to add a validator rule to a text area (like with a text box) is not implemented.

Max length should be added as an optional field in the "Options" box when creating a new service dialog element. If no value is specified, keep the default.

Mockup attached
screenshot from 2014-12-12 08 22 13

@Fryguy
Copy link
Member

Fryguy commented Dec 12, 2014

@gmcculloug @dclarizio Please take a look.

@gmcculloug
Copy link
Member

Completely agree that we need to expose this property in the dialog editor. To take it a step further we might want to also expose a minimum length as well. While this could be achieved through the regex validation rule we would be able to provide a better error message if it was based off a separate field property.

We are seeing the same requirement coming from other integrations like AWS Cloudformation and Openstack Heat.

cc @bzwei @eclarizio

@dclarizio
Copy link

Looks like a good enhancement and it will then enforce the max when creating the element on the screen as well.

@LorkScorguar
Copy link

Hi,

Is this available now? I have a use case that require more than 50 characters on a textbox.

@miq-bot
Copy link
Member

miq-bot commented Jan 3, 2018

This issue has been automatically marked as stale because it has not been updated for at least 6 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions!

@miq-bot miq-bot added the stale label Jan 3, 2018
@gmcculloug gmcculloug added pinned and removed stale labels Jan 3, 2018
@schmandforke
Copy link

+1
this default behavior is really annoying

@kuklis
Copy link

kuklis commented Feb 5, 2018

Pls implement this.

@kruge002
Copy link
Contributor

kruge002 commented Nov 5, 2018

+1
Weird that this issue is already reported in 2014 and since than nobody has done something about it.
There is a bug report for this at CloudForms Bugzilla too but nobody seems to be interested to fix this either: https://bugzilla.redhat.com/show_bug.cgi?id=1539507

@JPrause
Copy link
Member

JPrause commented Jan 16, 2019

@eclarizio can you provide an update on this issue.

@eclarizio
Copy link
Member

@JPrause as @romanblanco mentioned in the referenced PR, the way that all new dialogs are rendered is through the dialog-user component in the ui-components repository where the max length is no longer limited.

@JPrause
Copy link
Member

JPrause commented Jan 16, 2019

Thanks @eclarizio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests