change
This commit is contained in:
@ -1,13 +1,35 @@
|
||||
<style>
|
||||
*{
|
||||
* {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<form action="/scripts" method="post">
|
||||
<%
|
||||
let dates = date.split(".");
|
||||
let date2 = `${dates[2]}-${dates[1]}-${dates[0]}`;
|
||||
console.log(date2);
|
||||
%>
|
||||
<input type="hidden" name="name" value="<%= name %>">
|
||||
<input type="text" name="pill" value="<%= pill %>">
|
||||
<input type="text" name="date" value="<%= date %>">
|
||||
<input type="text" name="comment" value="<%= comment %>">
|
||||
<input type="date" name="date" value="<%= date2 %>">
|
||||
<input type="text" name="comment" value="<%= comment %>" placeholder="comment">
|
||||
<!-- <input type="text" name="pill" value="<%= pill %>"> -->
|
||||
<select id="pills" name="pill">
|
||||
<!-- <option value="4/2">4/2</option>
|
||||
<option value="4">4</option>
|
||||
<option value="2">2</option>
|
||||
<option value="0">0</option> -->
|
||||
<%
|
||||
let pills = ["4/2","4/1","4","2","2/1","1","0"];
|
||||
let i=0;
|
||||
pills.forEach(el => {
|
||||
let check = (el==pill)? "selected":"";
|
||||
%>
|
||||
<option class="pill" id="pill-<%= i %>" value="<%= el %>" <%= check %>><%= el %></option>
|
||||
<%
|
||||
i++;
|
||||
});
|
||||
%>
|
||||
</select>
|
||||
<input type="hidden" name="func" value="edit">
|
||||
<input type="submit" name="mode" value="save">
|
||||
<input type="submit" name="mode" value="cancel">
|
||||
|
@ -1,45 +1,50 @@
|
||||
<style>
|
||||
.pill{
|
||||
.pill {
|
||||
border: 1px black solid;
|
||||
display: flex;
|
||||
padding-inline: 3px;
|
||||
}
|
||||
.pill input{
|
||||
|
||||
.pill input {
|
||||
margin: 0px;
|
||||
/* padding: 20px; */
|
||||
}
|
||||
.pill label{
|
||||
|
||||
.pill label {
|
||||
padding-inline: 4px;
|
||||
padding-block: 1px;
|
||||
}
|
||||
.pills{
|
||||
|
||||
.pills {
|
||||
list-style-type: none;
|
||||
display: flex;
|
||||
}
|
||||
.f1{
|
||||
|
||||
.f1 {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
margin-block: 15px;
|
||||
}
|
||||
input{
|
||||
|
||||
input {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<form class="f1" action="/scripts" method="post">
|
||||
<input type="submit" value="add">
|
||||
<ul class="pills">
|
||||
<select id="pills" name="pill">
|
||||
<%
|
||||
let pills = ["4/2","4/1","4","2","2/1","1","0"];
|
||||
let i=0;
|
||||
pills.forEach(el => {
|
||||
let check = (el=="4")? "checked":"";
|
||||
let check = (el=="4")? "selected":"";
|
||||
%>
|
||||
<li class="pill"><label for="<%= i %>"><%= el %></label> <input id="<%= i %>" type="radio" name="pill" value="<%= el %>" <%= check %>></li>
|
||||
<%
|
||||
<option class="pill" id="pill-<%= i %>" value="<%= el %>" <%= check %>><%= el %></option>
|
||||
<%
|
||||
i++;
|
||||
});
|
||||
%>
|
||||
</ul>
|
||||
<input type="text" name="comment" value=" " placeholder="comment">
|
||||
%>
|
||||
</select>
|
||||
<input type="text" name="comment" value="" placeholder="comment">
|
||||
<input type="hidden" name="func" value="save">
|
||||
</form>
|
Reference in New Issue
Block a user