Mercurial Hosting > lang
comparison src/edit_course.html.luan @ 25:3a80ddafe5a4
courses work
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 01 Aug 2025 00:33:51 -0600 |
parents | 87fe70201aa8 |
children | 176a182c02cf |
comparison
equal
deleted
inserted
replaced
24:87fe70201aa8 | 25:3a80ddafe5a4 |
---|---|
33 <!doctype html> | 33 <!doctype html> |
34 <html lang="en"> | 34 <html lang="en"> |
35 <head> | 35 <head> |
36 <% head() %> | 36 <% head() %> |
37 <style> | 37 <style> |
38 label, | |
39 input, | 38 input, |
40 textarea { | 39 textarea { |
41 display: block; | 40 display: block; |
41 } | |
42 h4 { | |
43 margin-top: 22px; | |
44 margin-bottom: 4px; | |
45 } | |
46 input[type=submit] { | |
47 margin-top: 22px; | |
42 } | 48 } |
43 </style> | 49 </style> |
44 </head> | 50 </head> |
45 <body> | 51 <body> |
46 <% header() %> | 52 <% header() %> |
47 <form content onsubmit="ajaxForm('/save_course.js',this)" action="javascript:"> | 53 <form content onsubmit="ajaxForm('/save_course.js',this)" action="javascript:"> |
54 <input type=hidden name=language value="<%=course.language%>"> | |
55 <% if course_id ~= nil then %> | |
56 <input type=hidden name=course value="<%=course_id%>"> | |
57 <% end %> | |
48 <h1>Edit Course</h1> | 58 <h1>Edit Course</h1> |
49 <p> | 59 <h3><%= course.language_name() %></h3> |
50 Language: <%= course.language_name() %> | 60 |
51 <input type=hidden name=language value="<%=course.language%>"> | 61 <h4>Course name</h4> |
52 <% if course_id ~= nil then %> | 62 <input required name=name value="<%=html_encode(course.name)%>"> |
53 <input type=hidden name=course value="<%=course_id%>"> | 63 |
54 <% end %> | 64 <h4>AI system prompt</h4> |
55 </p> | 65 <textarea required name=ai_system_prompt><%=html_encode(course.ai_system_prompt)%></textarea> |
56 <p> | 66 |
57 <label prompt>Course name</label> | 67 <h4>AI first message (optional)</h4> |
58 <input required name=name value="<%=html_encode(course.name)%>"> | 68 <textarea required name=ai_first_message><%=html_encode(course.ai_first_message or "")%></textarea> |
59 </p> | 69 |
60 <p> | 70 <input type=submit> |
61 <label prompt>AI system prompt</label> | |
62 <textarea required name=ai_system_prompt><%=html_encode(course.ai_system_prompt)%></textarea> | |
63 </p> | |
64 <p> | |
65 <input type=submit> | |
66 </p> | |
67 </form> | 71 </form> |
68 </body> | 72 </body> |
69 </html> | 73 </html> |
70 <% | 74 <% |
71 end | 75 end |