templates/preferences.tmpl
author Tero Marttila <terom@fixme.fi>
Wed, 11 Feb 2009 23:22:13 +0200
changeset 113 9fc0eb751b6a
parent 92 74f6a0b01ddf
child 129 67a30d680f60
permissions -rw-r--r--
add <form> for month/year to calendar header
<%inherit file="layout.tmpl" />

<div id="title">Edit Preferences</div>

<form action="${urls.preferences.build(req)}" method="POST">
    <fieldset>
        <legend>Dates / Times</legend>
        
        <p>
            <label for="timezone">Timezone:</label>
            <select name="timezone">
            ${h.select_options(((None, tz_name) for tz_name in timezones), prefs['timezone'].zone)}
            </select>
            <span class="example">(${h.tz_name(prefs['timezone'])})</span>
        </p>

        <p>
            <label for="date_format">Date format:</label>
            <input type="text" name="date_format" value="${prefs['date_format']}" />
            <span class="example">(${h.fmt_date()})</span>
        </p>
        
        <p>
            <label for="time_format">Time format:</label>
            <input type="text" name="time_format" value="${prefs['time_format']}" />
            <span class="example">(${h.fmt_time()})</span>
        </p>

    </fieldset>

    <fieldset>
        <legend>Log Output</legend>
        
        <p>
            <label for="formatter">Formatter:</label>
            <select name="formatter">
                ${h.select_options(((fmt_name, fmt.title) for fmt_name, fmt in preferences.formatter.formatters.iteritems()), prefs['formatter'].name)}
            </select>
        </p>

        <p>
            <label for="count">Lines / Page:</label>
            <input type="text" name="count" value="${prefs['count']}" />
<!--            <span class="example">(Blank for infinite)</span> -->
        </p>
    </fieldset>
    
    <fieldset>
        <legend>Image Options</legend>

        <p>
            <label for="image_font">Font:</label>
            <select name="image_font">
                ${h.select_options(((name, title) for name, (path, title) in config.FORMATTER_IMAGE_FONTS.iteritems()), prefs['image_font'][0])}
            </select>
        </p>

        <p>
            <label for="image_font_size">Font size:</label>
            <input type="text" name="image_font_size" value="${prefs['image_font_size']}" />
            <span class="example">pt</span>
        </p>
    </fieldset>

    <input type="submit" value="Save" />
</form>