[ 
https://issues.apache.org/jira/browse/ATLAS-4116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17277131#comment-17277131
 ] 

Keval Bhatt commented on ATLAS-4116:
------------------------------------

Thanks [~prasadpp13] for the updated patch 
[^0001-ATLAS-4116-UI-V1-UI-should-not-allow-the-user-to-cre.patch]. 

Few review comments, do we need filter inside the binding event?

what if we only bind the *keyup* and with *modal-body input* so that "this" 
will point to input directly.

and the below call is the global pointer better to avoid it when we are 
creating a common listener.
{code:java}
$(".modal-footer").find('button.ok').removeAttr("disabled");
{code}
Example:
{code:java}
$('body').on('keyup', '.modal-body input', function (e) {
        var $this = $(this);
        if (this.getAttribute('placeholder') && 
this.getAttribute('placeholder').indexOf('require') >= 0) {
                        return (this.value.trim() == "");
                }
        var $footerButton = $this.parent(".modal").find('.modal-footer 
button.ok');
        if (requiredInputField.length > 0) {
                $footerButton.attr("disabled", "true");
        } else {
                $footerButton.removeAttr("disabled");   
        }
});
{code}

> UI should not allow the user to create a glossary with blank(" ") name
> ----------------------------------------------------------------------
>
>                 Key: ATLAS-4116
>                 URL: https://issues.apache.org/jira/browse/ATLAS-4116
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: Nixon Rodrigues
>            Assignee: Prasad P. Pawar
>            Priority: Major
>         Attachments: 
> 0001-ATLAS-4116-UI-UI-should-not-allow-the-user-to-create.patch, 
> 0001-ATLAS-4116-UI-V1-UI-should-not-allow-the-user-to-cre.patch, 
> Atlas-4116Fix.png
>
>
> When just space is input the "Create" button is not enabled, but when the 
> space is selected, then the "Create" button is enabled and User is allowed to 
> click on "*Create*".
> This results in un-necessary failures
> *
> {"errorCode":"ATLAS-400-00-079","errorMessage":"Attributes qualifiedName and 
> name are missing. Failed to derive a unique name for Glossary"}
> *
> It is better to not allow clicking on "Create" for such an input via UI



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to