| 1 |
? my $app = shift; |
| 2 |
|
| 3 |
<div id="prefs" class="config"> |
| 4 |
<form id="config_data" onsubmit="return Alice.prefs.submit(this)"> |
| 5 |
<div class="field" style="width:150px"> |
| 6 |
<input type="checkbox"<? if ($app->config->images eq "show") { ?> checked<? } ?> name="images" id="images" /> |
| 7 |
<label>Inline images?</label> |
| 8 |
</div> |
| 9 |
|
| 10 |
<div class="field clear" style="width:150px"> |
| 11 |
<input type="checkbox"<? if ($app->config->avatars eq "show") { ?> checked="checked"<? } ?> name="avatars" id="avatars" /> |
| 12 |
<label>Show avatars?</label> |
| 13 |
</div> |
| 14 |
|
| 15 |
<div class="field clear" style="width:150px"> |
| 16 |
<input type="checkbox"<? if ($app->config->alerts eq "show") { ?> checked="checked"<? } ?> name="alerts" id="alerts" /> |
| 17 |
<label>Enable alerts?</label> |
| 18 |
<a style="font-size:10px" href="javascript:void(0)" onclick="window.webkitNotifications.requestPermission()">Grant permission</a> |
| 19 |
</div> |
| 20 |
|
| 21 |
<div class="field clear" style="width: 150px"> |
| 22 |
<label for="style">Style <span style="font-size:0.8em">(refresh required)</span></label> |
| 23 |
<select name="style" id="style"> |
| 24 |
<option value="default"<? if ($app->config->style eq "default") {?> selected<? } ?>>Default</option> |
| 25 |
<option value="dark"<? if ($app->config->style eq "dark") {?> selected<? } ?>>Dark</option> |
| 26 |
</select> |
| 27 |
</div> |
| 28 |
|
| 29 |
<div class="field clear" style="width: 150px"> |
| 30 |
<label for="timeformat">Time Format</label> |
| 31 |
<select name="timeformat" id="timeformat"> |
| 32 |
<option value="12"<? if ($app->config->timeformat eq "12") {?> selected<? } ?>>12 Hour</option> |
| 33 |
<option value="24"<? if ($app->config->timeformat eq "24") {?> selected<? } ?>>24 Hour</option> |
| 34 |
</select> |
| 35 |
</div> |
| 36 |
|
| 37 |
<div class="field clear" style="width:150px"> |
| 38 |
<label>Highlights</label> |
| 39 |
<select name="highlights" multiple="multiple" id="highlights"> |
| 40 |
<? for my $highlight (@{$app->config->highlights}) { ?> |
| 41 |
<option value="<?= $highlight ?>"><?= $highlight ?></option> |
| 42 |
<? } ?> |
| 43 |
</select> |
| 44 |
<div class="controls"> |
| 45 |
<a href="#" onclick="return Alice.prefs.addHighlight()">Add</a> |
| 46 |
<a href="#" onclick="return Alice.prefs.removeHighlights()">Remove</a> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
|
| 50 |
<div class="buttons"> |
| 51 |
<button type="submit">Save</button> |
| 52 |
<button onclick="Alice.prefs.remove(); return false;">Cancel</button> |
| 53 |
</div> |
| 54 |
|
| 55 |
</form> |
| 56 |
</div> |