Skip to content

Commit

Permalink
add accessible label
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Oct 31, 2024
1 parent 5e0f0f1 commit f839362
Showing 1 changed file with 87 additions and 87 deletions.
174 changes: 87 additions & 87 deletions views/lot-search.ejs
Original file line number Diff line number Diff line change
@@ -1,90 +1,68 @@
<%- include('_header'); -%>

<nav class="breadcrumb">
<ul>
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
<li class="is-active">
<a href="#" aria-current="page">
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
<span><%= configFunctions.getConfigProperty("aliases.lots") %></span>
</a>
</li>
</ul>
<ul>
<li><a href="<%= urlPrefix %>/dashboard">Home</a></li>
<li class="is-active">
<a href="#" aria-current="page">
<span class="icon is-small"><i class="fas fa-vector-square" aria-hidden="true"></i></span>
<span><%= configFunctions.getConfigProperty("aliases.lots") %></span>
</a>
</li>
</ul>
</nav>

<h1 class="title is-1">
Find a <%= configFunctions.getConfigProperty("aliases.lot") %>
Find a <%= configFunctions.getConfigProperty("aliases.lot") %>
</h1>

<% if (user.userProperties.canUpdate) { %>
<div class="fixed-container is-fixed-bottom-right mx-4 my-4 has-text-right is-hidden-print">
<a class="button is-circle is-primary has-tooltip-left"
data-tooltip="Create a New <%= configFunctions.getConfigProperty("aliases.lot") %>"
href="<%= urlPrefix %>/lots/new"
accesskey="n">
<i class="fas fa-plus" aria-hidden="true"></i>
<span class="sr-only">Create a New <%= configFunctions.getConfigProperty("aliases.lot") %></span>
</a>
</div>
<div class="fixed-container is-fixed-bottom-right mx-4 my-4 has-text-right is-hidden-print">
<a class="button is-circle is-primary has-tooltip-left"
data-tooltip="Create a New <%= configFunctions.getConfigProperty("aliases.lot") %>"
href="<%= urlPrefix %>/lots/new"
accesskey="n">
<i class="fas fa-plus" aria-hidden="true"></i>
<span class="sr-only">Create a New <%= configFunctions.getConfigProperty("aliases.lot") %></span>
</a>
</div>
<% } %>

<div class="box">
<form id="form--searchFilters">
<input id="searchFilter--limit" name="limit" type="hidden" value="100" />
<input id="searchFilter--offset" name="offset" type="hidden" value="0" />
<div class="columns">
<div class="column">
<label class="label" for="searchFilter--lotName"><%= configFunctions.getConfigProperty("aliases.lot") %></label>
<div class="field has-addons">
<div class="control has-icons-left">
<div class="select">
<select id="selectFilter--lotNameSearchType" name="lotNameSearchType">
<option value="">contains</option>
<option value="startsWith">starts with</option>
<option value="endsWith">ends with</option>
</select>
</div>
<span class="icon is-small is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</div>
<div class="control is-expanded">
<input class="input" id="searchFilter--lotName" name="lotName" />
</div>
</div>
<form id="form--searchFilters">
<input id="searchFilter--limit" name="limit" type="hidden" value="100" />
<input id="searchFilter--offset" name="offset" type="hidden" value="0" />
<div class="columns">
<div class="column">
<label class="label" for="searchFilter--lotName"><%= configFunctions.getConfigProperty("aliases.lot") %></label>
<div class="field has-addons">
<div class="control has-icons-left">
<div class="select">
<select id="selectFilter--lotNameSearchType" name="lotNameSearchType" aria-label="<%= configFunctions.getConfigProperty("aliases.lot") %> Filter Type">
<option value="">contains</option>
<option value="startsWith">starts with</option>
<option value="endsWith">ends with</option>
</select>
</div>
<span class="icon is-small is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</div>
<div class="column">
<div class="field">
<label class="label" for="searchFilter--lotTypeId"><%= configFunctions.getConfigProperty("aliases.lot") %> Type</label>
<div class="control has-icons-left">
<div class="select is-fullwidth">
<select id="searchFilter--lotTypeId" name="lotTypeId">
<option value="">(All <%= configFunctions.getConfigProperty("aliases.lot") %> Types)</option>
<% for (const lotType of lotTypes) { %>
<option value="<%= lotType.lotTypeId %>" <%= (lotType.lotTypeId.toString() === lotTypeId) ? " selected" : "" %>>
<%= lotType.lotType || "(No Name)" %>
</option>
<% } %>
</select>
</div>
<span class="icon is-small is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</div>
</div>
<div class="control is-expanded">
<input class="input" id="searchFilter--lotName" name="lotName" />
</div>
</div>
</div>
<div class="columns">
<div class="column">
<div class="field">
<label class="label" for="searchFilter--mapId"><%= configFunctions.getConfigProperty("aliases.map") %></label>
<label class="label" for="searchFilter--lotTypeId"><%= configFunctions.getConfigProperty("aliases.lot") %> Type</label>
<div class="control has-icons-left">
<div class="select is-fullwidth">
<select id="searchFilter--mapId" name="mapId">
<option value="">(All <%= configFunctions.getConfigProperty("aliases.maps") %>)</option>
<% for (const map of maps) { %>
<option value="<%= map.mapId %>" <%= (map.mapId.toString() === mapId) ? " selected" : "" %>>
<%= map.mapName || "(No Name)" %>
<select id="searchFilter--lotTypeId" name="lotTypeId">
<option value="">(All <%= configFunctions.getConfigProperty("aliases.lot") %> Types)</option>
<% for (const lotType of lotTypes) { %>
<option value="<%= lotType.lotTypeId %>" <%= (lotType.lotTypeId.toString() === lotTypeId) ? " selected" : "" %>>
<%= lotType.lotType || "(No Name)" %>
</option>
<% } %>
</select>
Expand All @@ -95,28 +73,50 @@
</div>
</div>
</div>
<div class="column">
<div class="field">
<label class="label" for="searchFilter--lotStatusId">Status</label>
<div class="control has-icons-left">
<div class="select is-fullwidth">
<select id="searchFilter--lotStatusId" name="lotStatusId">
<option value="">(All Statuses)</option>
<% for (const lotStatus of lotStatuses) { %>
<option value="<%= lotStatus.lotStatusId %>" <%= (lotStatus.lotStatusId.toString() === lotStatusId) ? " selected" : "" %>>
<%= lotStatus.lotStatus %>
</option>
<% } %>
</select>
</div>
<span class="icon is-small is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</div>
</div>
<div class="columns">
<div class="column">
<div class="field">
<label class="label" for="searchFilter--mapId"><%= configFunctions.getConfigProperty("aliases.map") %></label>
<div class="control has-icons-left">
<div class="select is-fullwidth">
<select id="searchFilter--mapId" name="mapId">
<option value="">(All <%= configFunctions.getConfigProperty("aliases.maps") %>)</option>
<% for (const map of maps) { %>
<option value="<%= map.mapId %>" <%= (map.mapId.toString() === mapId) ? " selected" : "" %>>
<%= map.mapName || "(No Name)" %>
</option>
<% } %>
</select>
</div>
<span class="icon is-small is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</div>
</div>
</form>
</div>
<div class="column">
<div class="field">
<label class="label" for="searchFilter--lotStatusId">Status</label>
<div class="control has-icons-left">
<div class="select is-fullwidth">
<select id="searchFilter--lotStatusId" name="lotStatusId">
<option value="">(All Statuses)</option>
<% for (const lotStatus of lotStatuses) { %>
<option value="<%= lotStatus.lotStatusId %>" <%= (lotStatus.lotStatusId.toString() === lotStatusId) ? " selected" : "" %>>
<%= lotStatus.lotStatus %>
</option>
<% } %>
</select>
</div>
<span class="icon is-small is-left">
<i class="fas fa-search" aria-hidden="true"></i>
</span>
</div>
</div>
</div>
</div>
</form>
</div>

<div id="container--searchResults"></div>
Expand Down

0 comments on commit f839362

Please sign in to comment.