<div class="formArea">
    <fieldset>
        <legend>{PROPERTIES_LEGEND}</legend>
        <table class="formFields" cellspacing="0" width="100%">
            <tr>
                <td class="name"><label for="fid-status">{RULESTATUS_ENABLED}</label></td>
                <td>
                    <input name="p[enable]" value="false" type="hidden">
                    <input name="p[enable]" value="true" type="checkbox" class="checkbox" id="fid-status" {RULESTATUS_CHECKED}>
                </td>
            </tr>

            <!-- BEGIN DYNAMIC BLOCK: editable_name -->
            <tr {NAME_ERROR}>
                <td class="name"><label for="fid-name">{NAME_TEXT}</label>&nbsp;{REQ}</td>
                <td><input type="text" id="fid-name" name="p[name]" value="{NAME_VALUE}" size="24"></td>
            </tr>
            <!-- END DYNAMIC BLOCK: editable_name -->
            <!-- BEGIN DYNAMIC BLOCK: readonly_name -->
            <tr>
                <td class="name">{NAME_TEXT}</td>
                <td>{NAME_VALUE}</td>
            </tr>
            <!-- END DYNAMIC BLOCK: readonly_name -->

            <!-- BEGIN DYNAMIC BLOCK: editable_profiles -->
            <tr {PROFILES_ERROR}>
                <td class="name">{PROFILES_TEXT}&nbsp;{REQ}</td>
                <td>
                    <input type="checkbox" name="p[profiles][domain]" id="fid-profiles-domain" value="true" {PROFILES_DOMAIN_CHECKED} /> <label
                            for="fid-profiles-domain">{PROFILES_DOMAIN_TEXT}</label><br>
                    <input type="checkbox" name="p[profiles][private]" id="fid-profiles-private" value="true" {PROFILES_PRIVATE_CHECKED} /> <label
                            for="fid-profiles-private">{PROFILES_PRIVATE_TEXT}</label><br>
                    <input type="checkbox" name="p[profiles][public]" id="fid-profiles-public" value="true" {PROFILES_PUBLIC_CHECKED} /> <label
                            for="fid-profiles-public">{PROFILES_PUBLIC_TEXT}</label>
                    <div class="hint">{PROFILES_HINT}</div>
                </td>
            </tr>
            <!-- END DYNAMIC BLOCK: editable_profiles -->
            <!-- BEGIN DYNAMIC BLOCK: readonly_profiles -->
            <tr>
                <td class="name">{PROFILES_TEXT}</td>
                <td>{PROFILES_READONLY_VALUE}</td>
            </tr>
            <!-- END DYNAMIC BLOCK: readonly_profiles -->

            <!-- BEGIN DYNAMIC BLOCK: editable_action -->
            <tr id="p[action]">
                <td class="name">{ACTION_TEXT}</td>
                <td>
                    <input type="radio" id="fid-action-allow" name="p[action]" value="allow" {ACTION_ALLOW_CHECKED}> <label for="fid-action-allow">{ACTION_ALLOW_TEXT}</label><br>
                    <input type="radio" id="fid-action-deny" name="p[action]" value="block" {ACTION_DENY_CHECKED}> <label for="fid-action-deny">{ACTION_DENY_TEXT}</label>
                </td>
            </tr>
            <!-- END DYNAMIC BLOCK: editable_action -->
            <!-- BEGIN DYNAMIC BLOCK: readonly_action -->
            <tr id="p[action]">
                <td class="name">{ACTION_TEXT}</td>
                <td>{ACTION_READONLY_VALUE}</td>
            </tr>
            <!-- END DYNAMIC BLOCK: readonly_action -->

            <!-- BEGIN DYNAMIC BLOCK: editable_port -->
            <tr {PORT_ERROR}>
                <td class="name"><label for="fid-port">{PORT_TEXT}</label>&nbsp;{REQ}</td>
                <td>
                    <input type="text" name="p[port]" id="fid-port" value="{PORT_VALUE}" size=14 maxlength=11>
                    <div class="hint">{PORT_HINT}</div>
                    <input type="radio" id="fid-protocol_tcp" name="p[protocol]" value="TCP" {PROTOCOL_TCP_CHECKED}> <label for="fid-protocol_tcp">{PROTOCOL_TCP_TEXT}</label><br>
                    <input type="radio" id="fid-protocol_udp" name="p[protocol]" value="UDP" {PROTOCOL_UDP_CHECKED}> <label for="fid-protocol_udp">{PROTOCOL_UDP_TEXT}</label>
                </td>
            </tr>
            <!-- END DYNAMIC BLOCK: editable_port -->
            <!-- BEGIN DYNAMIC BLOCK: readonly_port -->
            <tr {PORT_ERROR}>
                <td class="name">{PORT_TEXT}</td>
                <td>{PORT_VALUE}<input type="hidden" id="fid-port" name="p[port]" value="{PORT_VALUE}">/{PROTOCOL_VALUE}<input type="hidden" name="p[protocol]"
                                                                                                                               value="{PROTOCOL_VALUE}"></td>
            </tr>
            <!-- END DYNAMIC BLOCK: readonly_port -->
        </table>
    </fieldset>
</div>
<input type="hidden" name="rule_id" value="{RULE_ID}">

<!-- BEGIN DYNAMIC BLOCK: editable_from -->
<div class="formArea" id="from_block">
    <fieldset>
        <legend>{FROM_LEGEND}</legend>
        <table class="formFields" cellspacing="0" width="100%">
            <tr id="p[from]">
                <td class="name">
                    <select id="p[from][select]" size="{SELECT_SIZE}" style="width:100%" multiple>
                        {FROM_OPTIONS}
                    </select>
                </td>
                <td>
                    <p>
                        <label for="p[from][ip]">{FROM_ADD_TEXT}</label>
                        <input type="text" size=25 maxlength=50 id="p[from][ip]">
                    <div class="hint">{FROM_HINT}</div>
                    </p>
                    {FROM_ADD_BUTTON}
                    {FROM_REMOVE_BUTTON}
                    {FROM_CLEAR_BUTTON}
                </td>
            </tr>
        </table>
        <div style="display:none" id="p[from][data]"></div>
    </fieldset>
</div>
<!-- END DYNAMIC BLOCK: editable_from -->
<!-- BEGIN DYNAMIC BLOCK: readonly_from -->
<div class="formArea" id="from_block">
    <fieldset>
        <legend>{FROM_LEGEND}</legend>
        <table class="formFields" cellspacing="0" width="100%">
            <tr id="p[from]">
                <td class="name">
                    <select id="p[from][select]" size="{SELECT_SIZE}" style="width:100%" multiple disabled>
                        {FROM_OPTIONS}
                    </select>
                </td>
                <td>&nbsp;</td>
            </tr>
        </table>
        <div style="display:none" id="p[from][data]"></div>
    </fieldset>
</div>
<!-- END DYNAMIC BLOCK: readonly_from -->
