Files
old-web/app/views/publishAdditionalData.ejs
2020-03-09 23:30:37 +01:00

52 lines
1.5 KiB
Plaintext

<br>
<div class="row">
<% for (const input of additionalInputInputs){ %>
<div class="input-field col s12">
<textarea
id="<%= input.dbField %>"
form="publishForm"
name="<%= input.dbField %>"
cols="80" rows="15"
value="<%= additionalInputValues[input.dbField] !== undefined ? additionalInputValues[input.dbField] : ""%>"
></textarea>
<label for="<%= input.dbField %>"><%= input.title %></label>
</div>
<% } %>
</div>
<br>
<div class="col s12">
<% for (const input of additionalBooleanPublishInputs){ %>
<p class="col s3">
<label class="checkbox-label">
<input type="checkbox" class="filled-in" name="<%= input.dbField %>"
<% if (additionalBooleanPublishValues[input.dbField]) { %>
checked
<% } %>>
<span><%= input.title %></span>
</label>
</p>
<% } %>
</div>
<br>
<br>
<br>
<% for (const input of additionalSegmentSelectInputs){ %>
<div>
<br>
<label class="checkbox-label"><%= input.title %>: </label><br><br>
<span class="segmented small">
<% for (const segmentObject of input.values) { %>
<% if (segmentObject.id!=="ANY") { %>
<label>
<input type="radio" name="<%= input.dbField %>" value="<%= segmentObject.id %>"
<% if (additionalSegmentSelectValues[input.dbField] === segmentObject.id) { %>
checked
<% } %>>
<span class="label"><%= segmentObject.title %></span>
</label>
<% } %>
<% } %>
</span>
</div>
<% } %>