comparison src/edit_course.html.luan @ 27:176a182c02cf

add view_course
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 Aug 2025 20:08:13 -0600
parents 3a80ddafe5a4
children d34d709a7a8e
comparison
equal deleted inserted replaced
26:d3f5448743bf 27:176a182c02cf
37 <style> 37 <style>
38 input, 38 input,
39 textarea { 39 textarea {
40 display: block; 40 display: block;
41 } 41 }
42 input[type=text],
43 textarea {
44 width: 100%;
45 }
42 h4 { 46 h4 {
43 margin-top: 22px; 47 margin-top: 22px;
44 margin-bottom: 4px; 48 margin-bottom: 4px;
45 } 49 }
46 input[type=submit] { 50 input[type=submit] {
47 margin-top: 22px; 51 margin-top: 22px;
52 margin-bottom: 22px;
48 } 53 }
49 </style> 54 </style>
50 </head> 55 </head>
51 <body> 56 <body>
52 <% header() %> 57 <% header() %>
57 <% end %> 62 <% end %>
58 <h1>Edit Course</h1> 63 <h1>Edit Course</h1>
59 <h3><%= course.language_name() %></h3> 64 <h3><%= course.language_name() %></h3>
60 65
61 <h4>Course name</h4> 66 <h4>Course name</h4>
62 <input required name=name value="<%=html_encode(course.name)%>"> 67 <input type=text required name=name value="<%=html_encode(course.name)%>">
63 68
64 <h4>AI system prompt</h4> 69 <h4>AI system prompt</h4>
65 <textarea required name=ai_system_prompt><%=html_encode(course.ai_system_prompt)%></textarea> 70 <textarea required name=ai_system_prompt rows=10><%=html_encode(course.ai_system_prompt)%></textarea>
66 71
67 <h4>AI first message (optional)</h4> 72 <h4>AI first message (optional)</h4>
68 <textarea required name=ai_first_message><%=html_encode(course.ai_first_message or "")%></textarea> 73 <textarea required name=ai_first_message><%=html_encode(course.ai_first_message or "")%></textarea>
69 74
70 <input type=submit> 75 <input type=submit>
76
77 <hr>
78
79 <p>Text areas take <a href="/tools/markdown.html">Markdown</a>. AI generally recognizes Markdown.</p>
71 </form> 80 </form>
72 </body> 81 </body>
73 </html> 82 </html>
74 <% 83 <%
75 end 84 end