File tree Expand file tree Collapse file tree 3 files changed +14
-16
lines changed
examples/user-authentication Expand file tree Collapse file tree 3 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 11services :
22 web :
33 image : lovasoa/sqlpage:main # main is cutting edge, use sqlpage/SQLPage:latest for the latest stable version
4+ build :
5+ context : " .."
46 ports :
57 - " 8080:8080"
68 volumes :
Original file line number Diff line number Diff line change 1- SELECT ' form' AS component,
1+ SELECT ' login' AS component,
2+ ' login.sql' AS action,
23 ' Sign in' AS title,
3- ' Sign in' AS validate,
4- ' login.sql' AS action;
5-
6- SELECT ' username' AS name;
7- SELECT ' password' AS name, ' password' AS type;
8-
9- SELECT ' alert' as component,
10- ' Sorry' as title,
11- ' We could not authenticate you. Please log in or [create an account](signup.sql).' as description_md,
12- ' alert-circle' as icon,
13- ' red' as color
14- WHERE $error IS NOT NULL ;
4+ ' Username' AS username,
5+ ' Password' AS password,
6+ ' user' AS username_icon,
7+ ' lock' AS password_icon,
8+ case when $error is not null then ' We could not authenticate you. Please log in or [create an account](signup.sql).' end as error_message_md,
9+ ' Sign in' AS validate;
Original file line number Diff line number Diff line change 2020 {{ #if title }}
2121 <h1 class =" text-center mb-3" >{{ title }} </h1 >
2222 {{ /if }}
23- {{ #if error_message }}
23+ {{ #if ( or error_message error_message_md ) }}
2424 <div class =" alert alert-danger mb-3" role =" alert" >
2525 <div class =" alert-icon" >
2626 {{ icon_img ' alert-circle' }}
2727 </div >
28- <div class =" overflow-auto w-100" >
29- {{ error_message }}
28+ <div class =" overflow-auto w-100 remove-bottom-margin" >
29+ {{~ error_message ~}}
30+ {{{ ~markdown error_message_md ~}}}
3031 </div >
3132 </div >
3233 {{ /if }}
You can’t perform that action at this time.
0 commit comments