Differences From:
File
src/setup.c
part of check-in
[21cecd209f]
- Fix the user edit screen to work correctly even if one or more
of the "anonymous", "login", or "developer" users is omitted from
the user list.
by
drh on
2008-11-22 19:09:00.
[view]
To:
File
src/setup.c
part of check-in
[adefb6c8db]
- Provide a "Revert to Default" button for editing CSS. Grammar fix on login page.
by
eric on
2008-11-26 22:24:45.
[view]
@@ -815,22 +815,31 @@
login_check_credentials();
if( !g.okSetup ){
login_needed();
}
+ db_begin_transaction();
+ if( P("clear")!=0 ){
+ db_multi_exec("DELETE FROM config WHERE name='css'");
+ cgi_replace_parameter("css", zDefaultCSS);
+ }else{
+ textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS);
+ }
style_header("Edit CSS");
@ <form action="%s(g.zBaseURL)/setup_editcss" method="POST">
login_insert_csrf_secret();
@ Edit the CSS:<br />
textarea_attribute("", 40, 80, "css", "css", zDefaultCSS);
@ <br />
@ <input type="submit" name="submit" value="Apply Changes">
+ @ <input type="submit" name="clear" value="Revert To Default">
@ </form>
@ <hr>
@ Here is the default CSS:
@ <blockquote><pre>
@ %h(zDefaultCSS)
@ </pre></blockquote>
style_footer();
+ db_end_transaction(0);
}
/*
** WEBPAGE: setup_header