Przyklad formularza

Z JoggerWiki
Skocz do: nawigacji, wyszukiwania

Przykład formularza do komentarzy:


<div>
    <COMMENT_FORM_BLOCK>
    <div>
        <h3>Dodaj komentarz:</h3>
    </div>
    
    <div class="komed">
        <form action="<COMMENT_FORM_ACTION/>" method="post" id="formcomment">
            <table>
                <tr>
                    <td><label id="commnicklab" for="commnickid">Podpis:</label></td>
                    <td><input type="text" name="commnickid" id="commnickid" value="<COMMENT_FORM_NICKID/>" /></td>
                </tr>
                
                <COMMENT_FORM_NOUSER_BLOCK>
                <tr>
                    <td><label id="commnickurllab" for="commnickurl">Url:</label></td>
                    <td><input type="text" name="commnickurl" id="commnickurl" value="<COMMENT_FORM_NICKURL/>" /></td>
                </tr>
                </COMMENT_FORM_NOUSER_BLOCK>
                
                <tr>
                    <td><label id="commbodylab" for="commbody">Tresc:</label></td>
                    <td><textarea name="commbody" id="commbody" cols="60" rows="6"><COMMENT_FORM_BODY/></textarea></td>
                </tr>
                
                <COMMENT_FORM_NOTIFY_START_BLOCK>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <input type="checkbox" name="notifystart" id="notifystart" value="notify" checked="checked" />
                        <label id="notifylab" for="notifystart">Śledź ten wątek.</label>
                    </td>
                </tr>
                </COMMENT_FORM_NOTIFY_START_BLOCK>
                
                <COMMENT_FORM_NOTIFY_STOP_BLOCK>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <input type="submit" name="notifystop" id="notifystop" value="Przestań śledzić." />
                        </COMMENT_FORM_NOTIFY_STOP_BLOCK>
                    </td>
                </tr>

                <COMMENT_FORM_NOUSER_BLOCK>
                <tr>
                    <td><label id="codelab" for="code"><img src="<COMMENT_FORM_CODE/>" alt="code"  /></label></td>
                    <td><input type="text" name="code" id="code" /></td>
                </tr>
                </COMMENT_FORM_NOUSER_BLOCK>

                <tr>
                    <td>&nbsp;</td>
                    <td><input type="submit" name="submit" id="submitcomm" value="Wyslij" /></td>
                </tr>
            </table>
        </form>
    </div>
    </COMMENT_FORM_BLOCK>

    <COMMENT_LOGGED_BLOCK>
    <div class="komed">
        <label id="commlogged" for="commlogged">Tylko zalogowani użytkownicy mogą komentować.</label>
    </div>
    </COMMENT_LOGGED_BLOCK>

    <COMMENT_NONE_BLOCK>
    <div class="komed">
        <label id="commnone" for="commnone">Komentarze zablokowane.</label>
    </div>
    </COMMENT_NONE_BLOCK>
</div>