App Post-Function Unexpected Behavior

Hi

I’m trying todo a simple postfunction and I’m using AUI and Velocity template. Ihave 2 weird behaviour that I’m not able to solve.

1- If I do not add and empty form, the form styling i not working, JIRA to not ssems to apply AUI styling to it.

2- When I have input tag all my params and send back to getDescriptorParams so I can use them but once I added the input and labels in a it no longer works.

Any Idea ?

<html lang="en">
    <head>
        $webResourceManager.requireResourcesForContext("integration-pf")
    </head>
    <body>
    <!--Do not work if first empty form is removed-->
        <form class="aui">
        </form>

        <form action="#" name="jiraform" class="aui">
            <div class="field-group">
                <label for="assignementGroup"> Group Assignment </label>
                <input class="text medium-field" 
                        type="text" id="assignementGroup" 
                        name="assignementGroup" 
                        value="$textutils.htmlEncode($!assignementGroup)"/>
            </div>
            #foreach ($option in ${options.entrySet()})
                <div class="field-group">
                    <label for="$option.getKey()">Template Name For $option.getKey()</label>
                    <input type="text"
                            class="text long-field" 
                            id="$option.getKey()" 
                            name="$option.getKey()" 
                            value="$textutils.htmlEncode(${descriptor.getText($!option.getValue())})" />
                </div>
            #end
        </form>
    </body>
</html>