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

CustomerTicketMessage not submittable, with ACL-hidden dynamic field attachment #1

Open
wetzf opened this issue Jun 12, 2024 · 0 comments

Comments

@wetzf
Copy link

wetzf commented Jun 12, 2024

Hello OTOBO Team,

if a visible dynamic field of type attachment gets hidden via ACL in CustomerTicketMessage, the form can not be submitted anymore. If the field is hidden from the start, there is no problem. Clicking on the submit button does nothing, no message, no redirect.

It seems the cause of this behavior is the HTML class "Validate_DnDUpload" which is not removed when the field gets hidden. As a workaround i added the following lines to "var/httpd/htdocs/js/Core.AJAX.js" around line 470. That seems to solve the issue, but changes a OTOBO core file.

I also attached exports of my test ACL and dynamic fields.

...
    else if ( Field.hasClass("Validate_DependingRequiredOR") ) {
        Field.removeClass("Validate_DependingRequiredOR");
        Field.addClass("Validate_DependingRequired_IfVisibleOR");
    }
    else if ( Field.hasClass("Validate_DnDUpload") ) {
        Field.removeClass("Validate_DnDUpload");
        Field.addClass("Validate_DnDUpload_IfVisible");
    }
}
// field has to be shown again
else if ( Field.closest('div.Row').hasClass("oooACLHidden") ) {
    Field.closest('div.Row').show();
    // if it was hidden via autoselect before
     
...

    else if ( Field.hasClass("Validate_DependingRequired_IfVisibleOR") ) {
        Field.removeClass("Validate_DependingRequired_IfVisibleOR");
        Field.addClass("Validate_DependingRequiredOR");
    }
    else if ( Field.hasClass("Validate_DnDUpload_IfVisible") ) {
        Field.removeClass("Validate_DnDUpload_IfVisible");
        Field.addClass("Validate_DnDUpload");
    }
...

Best regards

Attachment-Example.zip

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

No branches or pull requests

1 participant