tazpanel view settings.cgi @ rev 476

settings.cgi: fix typo, tiny edits.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat May 02 05:20:54 2015 +0300 (2015-05-02)
parents 84d34ba7dc06
children df54c758feb8
line source
1 #!/bin/sh
2 #
3 # System settings CGI interface: user, locale, keyboard, date. Since we
4 # don't have multiple pages here there is only one case used to get command
5 # values and the full content is followed directly.
6 #
7 # Copyright (C) 2011-2015 SliTaz GNU/Linux - BSD License
8 #
11 # Common functions from libtazpanel
13 . lib/libtazpanel
14 get_config
16 TITLE=$(_ 'TazPanel - Settings')
19 # Get system database. LDAP compatible.
21 getdb() {
22 getent $1 2>/dev/null || cat /etc/$1
23 }
25 listdb() {
26 for item in $(getdb $1 | cut -d ":" -f 1); do
27 echo "<option>$item</option>\n"
28 done
29 }
31 restart_lxpanel() {
32 # `lxpanelctl restart` exists, but it breaks often leaving us without any panel
33 killall lxpanel; DISPLAY=':0.0' lxpanel &
34 }
38 #
39 # Commands executed before page loading.
40 #
42 case " $(GET) " in
43 *\ do\ *)
44 users=$(echo $QUERY_STRING | awk 'BEGIN{RS="&";FS="="}{if($1=="user") print $2}')
45 groups=$(echo $QUERY_STRING | awk 'BEGIN{RS="&";FS="="}{if($1=="group")print $2}')
47 case $(GET do) in
49 # Groups page
50 delgroups)
51 for i in $groups; do delgroup $i; done ;;
52 addgroup)
53 addgroup $groups ;;
54 addmember)
55 addgroup $(GET member) $groups ;;
56 delmember)
57 delgroup $(GET member) $groups ;;
59 # Users page
60 delusers)
61 for i in $users; do deluser $i; done ;;
62 lockusers)
63 for i in $users; do passwd -l $i | log; done ;;
64 unlockusers)
65 for i in $users; do passwd -u $i | log; done ;;
66 chpasswd)
67 echo "$users:$(GET password)" | chpasswd -m | log ;;
68 adduser)
69 if [ -n "$users" ]; then
70 name=$(GET name); name=${name:-SliTaz User}
71 adduser -D -s /bin/sh -g "$name" -G users -h /home/$users $users
72 echo "$user:$(GET passwd)" | chpasswd -m | log
73 for i in audio cdrom floppy video tty; do addgroup $users $i; done
74 fi ;;
76 # System time
77 settz)
78 GET tz > /etc/TZ;;
79 date) # normalize to two digits
80 date $(printf '%02d%02d%02d%02d%d.%02d' "$(GET month)" "$(GET day)" "$(GET hour)" "$(GET min)" "$(GET year)" "$(GET sec)") >/dev/null;;
81 rdate)
82 rdate -s tick.greyware.com ;;
83 hwclock)
84 hwclock -w -u ;;
86 esac
87 ;;
90 *\ gen_locale\ *)
91 new_locale=$(GET gen_locale) ;;
92 *\ gen_keymap\ *)
93 new_keymap=$(GET gen_keymap) ;;
94 *\ apply_xorg_kbd\ *)
95 sed -i "s/XkbLayout.*/XkbLayout \" \"$(GET apply_xorg_kbd)\"/" \
96 /etc/X11/xorg.conf.d/40-Keyboard.conf ;;
97 *\ style*)
98 sed -i s/'^STYLE.*'/"STYLE=\"$(GET style)\""/ $CONFIG
99 . $CONFIG ;;
102 *\ tweak\ *)
103 HOME="$(awk -F: -vu=$REMOTE_USER '$1==u{print $6}' /etc/passwd)"
104 [ -z "$HOME" ] && exit 0
106 dd="$HOME/.local/share/desktop-directories"; sd="$dd/SliTazMenu.directory"
108 case $REMOTE_USER in
109 root) color=31; ind='#';;
110 *) color=32; ind='$';;
111 esac
113 case $(GET tweak) in
114 monochrome)
115 # PS1='\u@\h:\w\$ '
116 sed -i "s|^PS1=.*|PS1='\\\\u@\\\\h:\\\\w\\\\$ind '|" $HOME/.profile;;
117 colored)
118 # PS1='\[\e[0;32m\]\u@\h\[\e[0m\]:\[\e[0;33m\]\w\[\e[0m\]\$ '
119 sed -i "s|^PS1=.*|PS1='\\\\\\[\\\\e\[0;${color}m\\\\\\]\\\\u@\\\\h\\\\\\[\\\\e\\[0m\\\\\\]:\\\\\\[\\\\e\\[0;33m\\\\\\]\\\\w\\\\\\[\\\\e\\[0m\\\\\\]\\\\$ind '|" $HOME/.profile;;
120 slitaz-*)
121 lxpanel="$HOME/.config/lxpanel"
122 if [ ! -e "$lxpanel" ]; then
123 mkdir -p "$lxpanel"; cp /etc/lxpanel/default /etc/lxpanel/slitaz $lxpanel
124 fi
125 for panel in $(find $lxpanel -type f -iname panel); do
126 awk -vicon="/usr/share/pixmaps/$(GET tweak).png" '
127 BEGIN{ found = "0"; }
128 {
129 if ($1 == "Plugin") { found = "1"; }
131 if (found == "1" && $1 == "type") {
132 if ($3 == "menu") found = "2"; else found = "0";
133 }
135 if (found == "2" && $1 == "Plugin") { found = "0"; }
137 if (found == "2" && index($1, "image")) {
138 printf " image=%s\n", icon;
139 found = 0;
140 } else {
141 print;
142 }
143 }
144 ' $panel > $panel.new
145 mv -f $panel.new $panel
146 done
148 restart_lxpanel;;
149 menu-notext)
150 mkdir -p $dd
151 echo -e '[Desktop Entry]\nType=Directory\nName=' > $sd
152 restart_lxpanel;;
153 menu-text)
154 [ -f "$sd" ] && rm "$sd"
155 restart_lxpanel;;
156 esac
157 exit 0
158 ;;
161 *\ menuIcon\ *)
162 icon="/usr/share/pixmaps/$(GET menuIcon).png"
163 [ ! -r $icon ] && exit 0
164 header "Content-Type: image/png"; cat $icon; exit 0
165 ;;
166 esac
172 #
173 # Default xHTML content
174 #
176 header
177 xhtml_header
179 case " $(GET) " in
180 *\ group*)
181 #
182 # Groups management
183 #
184 check_root_tazpanel
186 cat <<EOT
187 <h2 id="groups">$(_ 'Manage groups')</h2>
190 <section>
191 <form class="wide">
192 <header>
193 <input type="hidden" name="groups"/>
194 <!-- $(_ 'Selection:') -->
195 <button name="do" value="delgroups" data-icon="delete">$(_ 'Delete group')</button>
196 </header>
198 <div class="scroll">
199 <table class="wide zebra scroll">
200 <thead>
201 <tr class="thead">
202 <td>$(_ 'Group')</td>
203 <td>$(_ 'Group ID')</td>
204 <td>$(_ 'Members')</td>
205 </tr>
206 </thead>
207 <tbody>
208 EOT
209 for group in $(getdb group | cut -d ":" -f 1); do
210 IFS=':'
211 set -- $(getdb group | grep "^$group:")
212 unset IFS
213 gid=$3
214 members=$4
215 cat <<EOT
216 <tr>
217 <td><input type="checkbox" name="group" value="$group" id="$group"/>
218 <label for="$group" data-icon="group">$group</label></td>
219 <td>$gid</td>
220 <td>${members//,/, }</td>
221 </tr>
222 EOT
223 done
224 cat <<EOT
225 </tbody>
226 </table>
227 </div>
228 </form>
229 </section>
232 <section>
233 <header>$(_ 'Add a new group')</header>
234 <form>
235 <input type="hidden" name="groups"/>
236 <table>
237 <tr><td>$(_ 'Group name:')</td>
238 <td><input type="text" name="group"/></td>
239 </tr>
240 <tr><td colspan="2">
241 <button type="submit" name="do" value="addgroup" data-icon="add">$(_ 'Create group')</button>
242 </td></tr>
243 </table>
244 </form>
245 </section>
248 <section>
249 <header>$(_ 'Manage group membership')</header>
250 <form>
251 <input type="hidden" name="groups"/>
252 <table>
253 <tr>
254 <td>$(_ 'Group name:')</td>
255 <td><select name="group">$(listdb group)</select></td>
256 <td>$(_ 'User name:')</td>
257 <td><select name="member">$(listdb passwd)</select></td>
258 </tr>
259 <tr>
260 <td colspan="2">
261 <button name="do" value="addmember" data-icon="add">$(_ 'Add user')</button>
262 </td>
263 <td colspan="2">
264 <button name="do" value="delmember" data-icon="delete">$(_ 'Remove user')</button>
265 </td>
266 </tr>
267 </table>
268 </form>
269 </section>
271 EOT
272 ;;
275 *\ user*)
276 #
277 # Users management
278 #
279 check_root_tazpanel
281 cat <<EOT
282 <h2 id="users">$(_ 'Manage users')</h2>
284 <section>
285 <form class="wide">
286 <header>
287 <!--$(_ 'Selection:')-->
288 <button name="do" value="delusers" data-icon="delete">$(_ 'Delete user')</button>
289 <button name="do" value="lockusers" data-icon="lock" >$(_ 'Lock user' )</button>
290 <button name="do" value="unlockusers" data-icon="unlock">$(_ 'Unlock user')</button>
291 </header>
293 <table class="wide zebra center">
294 <thead>
295 <tr>
296 <td>$(_ 'Login')</td>
297 <td>$(_ 'User ID')</td>
298 <td>$(_ 'Name')</td>
299 <td>$(_ 'Home')</td>
300 <td>$(_ 'Shell')</td>
301 </tr>
302 </thead>
303 </tbody>
304 EOT
305 for login in $(getdb passwd | cut -d ":" -f 1); do
306 if [ -d /home/$login ]; then
307 colorlogin=$login
308 grep -qs "^$login:!" /etc/shadow &&
309 colorlogin="<span style='color: red;'>$login</span>"
310 IFS=':'
311 set -- $(getdb passwd | grep "^$login:")
312 unset IFS
313 cat <<EOT
314 <tr>
315 <td style="white-space: nowrap">
316 <input type="checkbox" name="user" value="$login" id="$login"/>
317 <label for="$login" data-icon="user">$colorlogin</label></td>
318 <td>$3:$4</td>
319 <td>$(echo $5 | sed s/,.*//)</td>
320 <td>$6</td>
321 <td>$7</td>
322 </tr>
323 EOT
324 fi
325 done
326 cat <<EOT
327 </tbody>
328 </table>
329 EOT
330 cat <<EOT
331 <footer>
332 <div>
333 $(_ 'Password:')
334 <input type="password" name="password"/>
335 <button type="submit" name="do" value="chpasswd" data-icon="ok">$(_ 'Change password')</button>
336 </div>
337 </footer>
338 </form>
339 </section>
342 <section>
343 <header>$(_ 'Add a new user')</header>
345 <form>
346 <input type="hidden" name="users"/>
347 <table class="summary">
348 <tr><td>$(_ 'User login:')</td>
349 <td><input type="text" name="user" size="30" pattern="[a-z]*"/></td></tr>
350 <tr><td>$(_ 'User name:')</td>
351 <td><input type="text" name="name" size="30"/></td></tr>
352 <tr><td>$(_ 'User password:')</td>
353 <td><input type="password" name="passwd" size="30"/></td></tr>
354 </table>
356 <footer>
357 <button type="submit" name="do" value="adduser" data-icon="add">$(_ 'Create user')</button>
358 </footer>
359 </form>
360 </section>
361 EOT
363 # `who` output is empty in the Live mode
364 if [ -n "$(who)" ]; then
365 cat <<EOT
366 <section>
367 <header>$(_ 'Current user sessions')</header>
368 <pre>$(who)</pre>
369 </section>
370 EOT
371 fi
373 # `last` output is empty (just header) in the Live mode
374 if [ "$(last | wc -l)" != "1" ]; then
375 cat <<EOT
376 <section>
377 <header>$(_ 'Last user sessions')</header>
378 <div class="scroll"><pre>$(last)</pre></div>
379 </section>
380 EOT
381 fi
382 ;;
385 *\ locale*)
386 #
387 # Choose locale
388 #
389 check_root_tazpanel
391 LOADING_MSG="$(_ 'Please wait...')"; loading_msg
393 cur_loc=$(locale | grep LANG | cut -d= -f2)
394 cat <<EOT
395 <h2 id="locale">$(_ 'Choose locale')</h2>
397 <section>
398 <header>$(_ 'Current locale settings:')</header>
399 <div>
400 <pre>$(locale)</pre>
401 </div>
402 </section>
404 <section>
405 <header>$(_ 'Locales that are currently installed on the machine:')</header>
406 <div>
407 <pre>$(locale -a)</pre>
408 </div>
409 </section>
410 EOT
412 is_installed "glibc-locale"
413 [ $? = 1 ] &&
414 msg tip $(_ \
415 "Can't see your language?<br/>You can \
416 <a href='pkgs.cgi?do=Install&amp;glibc-locale'>install glibc-locale</a> \
417 to see a larger list of available locales.")
420 cat <<EOT
421 <section>
422 <header>$(_ 'Available locales:')</header>
423 <form class="wide">
424 <table class="wide zebra">
425 <thead>
426 <tr><td>$(_ 'Code')</td>
427 <td>$(_ 'Language')</td>
428 <td>$(_ 'Territory')</td>
429 <td>$(_ 'Description')</td>
430 </tr>
431 </thead>
432 <tbody>
433 EOT
434 for locale in $(find /usr/share/i18n/locales -type f | sort); do
435 locale_name=$(basename $locale)
436 locale_title=$(grep -m 1 -e '^ *title' $locale | cut -d'"' -f2)
437 if [ -n "$locale_title" ]; then
438 sel=''; [ "$locale_name" == "$cur_loc" ] && sel='checked="checked"'
439 cat <<EOT
440 <tr>
441 <td>
442 <input type="radio" name="gen_locale" value="$locale_name" $sel id="$locale_name"/>
443 <label for="$locale_name">$locale_name</label>
444 </td>
445 <td>$(gettext -d iso_639 "$(grep -m 1 -e '^ *language' $locale | cut -d '"' -f2)")</td>
446 <td>$(gettext -d iso_3166 "$(grep -m 1 -e '^ *territory' $locale | cut -d '"' -f2)")</td>
447 <td>$locale_title</td>
448 </tr>
449 EOT
450 fi
451 done
452 cat <<EOT
453 </tbody>
454 </table>
456 <footer>
457 <button type="submit" data-icon="ok">$(_ 'Activate')</button>
458 </footer>
459 </form>
460 </section>
461 EOT
462 ;;
465 *\ tweaks\ *)
466 #
467 # Small tweaks for user
468 #
470 user="$REMOTE_USER"; host="$(hostname)"
471 HOME="$(awk -F: -vu=$user '$1==u{print $6}' /etc/passwd)"
472 font="${TERM_FONT:-monospace}"; palette=$(echo $TERM_PALETTE | tr A-Z a-z)
473 case $user in
474 root) color=31; ind="#";;
475 *) color=32; ind="$";;
476 esac
478 prompt_bw="$user@$host:/usr/bin$ind"
479 prompt_c="<span class=\"color$color\">$user@$host</span>:<span class=\"color33\">/usr/bin</span>$ind"
480 cursor="<span class=\"color47\">_</span>"
481 cat <<EOT
482 <script type="text/javascript">
483 function tweak(tweakName) {
484 // Send request to the server
485 var hiddenImg = document.createElement('IMG');
486 hiddenImg.src = "settings.cgi?tweak=" + tweakName;
487 }
488 </script>
490 <section>
491 <header>$(_ 'Small quick tweaks for user %s' "$user")</header>
493 <fieldset><legend>$(_ 'Terminal prompt')</legend>
494 <table class="wide">
495 <tr>
496 <td>
497 <label>
498 <input type="radio" name="termPrompt" onclick="tweak('monochrome')"/>
499 $(_ 'Monochrome')
500 </label>
501 <pre class="term $palette" style="font-family: '$font'; height: 5rem;">
502 $prompt_bw uname -r<br/>$(uname -r)<br/>$prompt_bw date<br/>$(date)<br/>$prompt_bw $cursor
503 </pre>
504 </td>
505 <td>
506 <label>
507 <input type="radio" name="termPrompt" onclick="tweak('colored')"/>
508 $(_ 'Colored')
509 </label>
510 <pre class="term $palette" style="font-family: '$font'; height: 5rem;">
511 $prompt_c uname -r<br/>$(uname -r)<br/>$prompt_c date<br/>$(date)<br/>$prompt_c $cursor
512 </pre>
513 </td>
514 </tr>
515 </table>
517 <p>$(_ 'Manual edit: %s' "<a data-icon=\"conf\" href="index.cgi?file=$HOME/.profile">~/.profile</a>")<br/>
518 $(_ 'To take effect: log out and log in to system or execute command in the terminal:')</p>
520 <pre>. ~/.profile</pre>
521 </fieldset>
523 <br/>
525 <fieldset>
526 <legend>$(_ 'Menu button appearance')</legend>
527 <table class="wide">
528 <tr>
529 <td style="vertical-align: top">
530 <fieldset>
531 <legend>$(_ 'Icon:')</legend>
532 <label>
533 <input type="radio" name="menuIcon" onclick="tweak('slitaz-menu-empty')"/>
534 $(_ 'Do not show')
535 </label><br/>
536 <label>
537 <input type="radio" name="menuIcon" onclick="tweak('slitaz-button-red')"/>
538 <img src="?menuIcon=slitaz-button-red"/>
539 </label><br/>
540 <label>
541 <input type="radio" name="menuIcon" onclick="tweak('slitaz-menu')"/>
542 <img src="?menuIcon=slitaz-menu"/>
543 </label><br/>
544 <label>
545 <input type="radio" name="menuIcon" onclick="tweak('slitaz-button')"/>
546 <img src="?menuIcon=slitaz-button"/>
547 </label>
548 </fieldset>
549 </td>
550 <td style="vertical-align: top">
551 <fieldset>
552 <legend>$(_ 'Text:')</legend>
553 <label>
554 <input type="radio" name="menuText" onclick="tweak('menu-notext')"/>
555 $(_ 'Do not show')
556 </label><br/>
557 <label>
558 <input type="radio" name="menuText" onclick="tweak('menu-text')"/>
559 $(_ 'Show text')
560 </label>
561 </fieldset>
562 </td>
563 </tr>
564 </table>
565 <p>$(_ 'Manual edit: %s' \
566 "<a data-icon=\"conf\" href=\"index.cgi?file=$HOME/.local/share/desktop-directories/SliTazMenu.directory\">~/.local/share/desktop-directories/SliTazMenu.directory</a>
567 $(
568 find $HOME/.config/lxpanel -type f -name panel | awk -vh="$HOME" \
569 '{ printf "<a data-icon=\"conf\" href=\"index.cgi?file=%s\">%s</a> ", $1, gensub(h, "~", "")}'
570 )")</p>
571 </fieldset>
572 </section>
573 EOT
574 ;;
577 *)
578 #
579 # Default system settings page
580 #
581 check_root_tazpanel
583 cat <<EOT
584 <h2>$(_ 'System settings')</h2>
586 <p>$(_ 'Manage system time, users or language settings')<p>
588 <form><!--
589 --><button name="users" data-icon="user" >$(_ 'Manage users' )</button><!--
590 --><button name="groups" data-icon="group">$(_ 'Manage groups')</button>
591 </form>
593 <section>
594 <header>$(_ 'System time')</header>
595 <div>
596 <form class="wide">
597 <fieldset><legend>$(_ 'Time zone:')</legend>
598 <select name="tz">
599 $(cd /usr/share/zoneinfo; find * -type f ! -name '*.tab' | sort | \
600 awk -vtz="$(cat /etc/TZ)" \
601 '{printf("<option%s>%s</option>", ($1 == tz)?" selected":"", $1)}')
602 </select>
603 <button name="do" value="settz" data-icon="ok">$(_ 'Change')</button>
604 </fieldset>
606 <fieldset><legend>$(_ 'System time:')</legend>
607 $(date | sed 's|[0-9][0-9]:[0-9:]*|<span id="time">&</span>|')
608 <button name="do" value="rdate" data-icon="sync">$(_ 'Sync online')</button>
609 </fieldset>
611 <fieldset id="hwclock1"><legend>$(_ 'Hardware clock:')</legend>
612 $(hwclock -ur | sed 's|0.000000 seconds||')
613 <button name="do" value="hwclock" id="hwclock" data-icon="clock">$(_ 'Set hardware clock')</button>
614 </fieldset>
616 <fieldset><legend>$(_ 'Set date')</legend>
617 <input type="number" name="day" value="$(date +%d)" min="1" max="31" size="4" required/>
618 <select name="month" value="$(date +%m)">
619 $(for i in $(seq 12); do
620 sel=''; [ "$i" == "$(date +%-m)" ] && sel=' selected'
621 printf "<option value=\"%s\"$sel>%s</option>" $(date -d $i.01-01:01 '+%m %B')
622 done)
623 </select>
624 <input type="number" name="year" value="$(date +%Y)" min="2015" max="2030" size="6" required/>
625 - <input type="number" name="hour" value="$(date +%H)" min="0" max="23" size="4" required/><!--
626 -->:<input type="number" name="min" value="$(date +%M)" min="0" max="59" size="4" required/><!--
627 -->:<input type="number" name="sec" value="00" min="0" max="59" size="4" required/>
628 <button name="do" value="date" data-icon="ok">$(_ 'Set date')</button>
629 </fieldset>
630 </form>
631 </div>
633 <script type="text/javascript">
634 // Live time on page
635 Date.prototype.timeNow = function() {
636 return ((this.getHours() < 10)?"0":"") + this.getHours() + ":" + ((this.getMinutes() < 10)?"0":"") + this.getMinutes() + ":" + ((this.getSeconds() < 10)?"0":"") + this.getSeconds();
637 }
638 setInterval(function(){document.getElementById('time').innerText = new Date().timeNow()}, 1000);
640 //document.getElementById('hwclock').disabled = 'disabled';
641 </script>
642 </section>
643 EOT
646 #
647 # Locale settings
648 #
649 cat <<EOT
650 <section>
651 <header id="locale">$(_ 'System language')</header>
652 <div>
653 <form>
654 EOT
655 # Check if a new locale was requested
656 if [ -n "$new_locale" ]; then
657 rm -rf /usr/lib/locale/$new_locale
658 localedef -i $new_locale -c -f UTF-8 \
659 /usr/lib/locale/$new_locale
660 # System configuration
661 echo "LANG=$new_locale" > /etc/locale.conf
662 echo "LC_ALL=$new_locale" >> /etc/locale.conf
663 msg warn "$(_ \
664 'You must logout and login again to your current session to use %s locale.' $new_locale)"
665 else
666 cat <<EOT
667 $(_ 'Current system locale:')
668 <strong>$(locale | grep LANG | cut -d= -f2)</strong>
669 <button name="locale" data-icon="locale">$(_ 'Change')</button>
670 EOT
671 fi
672 cat <<EOT
673 </div>
674 </form>
675 </section>
678 <section>
679 <header id="keymap">$(_ 'Keyboard layout')</header>
680 <div>
681 EOT
682 # Check if a new keymap was requested
683 if [ -n "$new_keymap" ]; then
684 echo "$new_keymap" > /etc/keymap.conf
685 if [ -x /bin/loadkeys ]; then
686 loadkeys $new_keymap
687 else
688 loadkmap < /usr/share/kmap/$new_keymap.kmap
689 fi
690 fi
692 keymap=$(cat /etc/keymap.conf)
693 _ 'Current console keymap: %s' $keymap
694 if [ -n "$keymap" ]; then
695 case "$keymap" in
696 fr_CH*)
697 keymap="ch" ;;
698 ru)
699 keymap="us,ru" ;;
700 slovene)
701 keymap=si ;;
702 *)
703 keymap=${keymap%-lat*}
704 keymap=${keymap%-abnt2} ;;
705 esac
706 keyboard_config=/etc/X11/xorg.conf.d/40-Keyboard.conf
707 cat <<EOT
708 <form id="settings"></form>
709 <form id="index" action="index.cgi"></form>
710 <br/>
711 $(_ 'Suggested keymap for Xorg:') $keymap
712 <button form="settings" name="apply_xorg_kbd" value="$keymap" data-icon="ok">$(_ 'Activate')</button>
713 <button form="index" name="file" value="$keyboard_config" data-icon="edit">$(_ 'Edit')</button>
714 <br/>
715 EOT
716 fi
717 cat <<EOT
718 <form>
719 $(_ 'Available keymaps:')
720 <select name="gen_keymap">
721 $(list_keymaps)
722 </select>
723 <button type="submit" data-icon="ok">$(_ 'Activate')</button>
724 </form>
725 </div>
726 </section>
729 <section>
730 <header>$(_ 'Panel configuration')</header>
731 <div>
732 <form class="wide">
733 <fieldset><legend>$(_ 'Style:')</legend>
734 <select name="style">$(list_styles)</select>
735 <button data-icon="ok">$(_ 'Activate')</button>
736 </fieldset>
737 </form>
739 <fieldset><legend>$(_ 'Configuration files:')</legend>
740 <button form="index" name="file" value="$CONFIG" data-icon="edit">$(_ 'Panel')</button>
741 <button form="index" name="file" value="$HTTPD_CONF" data-icon="edit">$(_ 'Server')</button>
742 </fieldset>
744 <p>$(_ 'TazPanel provides a debugging mode and page:')
745 <a href="index.cgi?debug">debug</a>
746 </p>
747 </div>
748 </section>
749 EOT
750 ;;
751 esac
753 xhtml_footer
754 exit 0