Skip to content

Commit

Permalink
prevent browser from suggesting stored credentials for "search" input…
Browse files Browse the repository at this point in the history
… field

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle committed Oct 13, 2023
1 parent 5b53a7a commit 2370356
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
22 changes: 11 additions & 11 deletions ui/modules/environments/authorization.html
Expand Up @@ -23,17 +23,17 @@ <h5>Main authentication</h5>
<hr />
<div class="row">
<div class="col-md-5">
<input type="radio" id="main-userpass" name="main-auth" value="basic"></input>
<input type="radio" id="main-userpass" name="main-auth" value="basic" />
<label for="main-userpass">Basic</label>
</div>
<div class="col-md-7">
<div class="input-group input-group-sm mb-1">
<label for="userName" class="input-group-text">Username</label>
<input type="text" class="form-control form-control-sm" id="userName"></input>
<input type="text" class="form-control form-control-sm" id="userName" name="username" />
</div>
<div class="input-group input-group-sm mb-1">
<label for="password" class="input-group-text">Password</label>
<input type="password" class="form-control form-control-sm" id="password"></input>
<input type="password" class="form-control form-control-sm" id="password" name="password" />
</div>
</div>
</div>
Expand All @@ -45,13 +45,13 @@ <h5>Main authentication</h5>
<div class="col-md-7">
<div class="input-group input-group-sm mb-1">
<label for="bearer" class="input-group-text">Bearer</label>
<input type="password" class="form-control form-control-sm" id="bearer"></input>
<input type="password" class="form-control form-control-sm" id="bearer" name="bearer" />
</div>
</div>
</div>
<div class="row pt-2">
<div class="col-md-5">
<input type="radio" id="main-pre" name="main-auth" value="pre"></input>
<input type="radio" id="main-pre" name="main-auth" value="pre" />
<label for="main-pre">Pre authenticated<br />
<small>(via HTTP header 'x-ditto-pre-authenticated', must take the form
<code>prefix:suffix</code>)</small>
Expand All @@ -60,7 +60,7 @@ <h5>Main authentication</h5>
<div class="col-md-7">
<div class="input-group input-group-sm mb-1">
<label for="dittoPreAuthenticatedUsername" class="input-group-text">prefix:suffix</label>
<input type="text" class="form-control form-control-sm" id="dittoPreAuthenticatedUsername"></input>
<input type="text" class="form-control form-control-sm" id="dittoPreAuthenticatedUsername" name="pre-authenticated-username" />
</div>
</div>
</div>
Expand All @@ -71,29 +71,29 @@ <h5>DevOps authentication</h5>
<hr />
<div class="row">
<div class="col-md-5">
<input type="radio" id="devops-userpass" name="devops-auth" value="basic"></input>
<input type="radio" id="devops-userpass" name="devops-auth" value="basic" />
<label for="devops-userpass">Basic<br /></label>
</div>
<div class="col-md-7">
<div class="input-group input-group-sm mb-1">
<label for="devOpsUserName" class="input-group-text">DevOps Username</label>
<input type="text" class="form-control form-control-sm" id="devOpsUserName"></input>
<input type="text" class="form-control form-control-sm" id="devOpsUserName" name="username" />
</div>
<div class="input-group input-group-sm mb-1">
<label for="devOpsPassword" class="input-group-text">DevOps Password</label>
<input type="password" class="form-control form-control-sm" id="devOpsPassword"></input>
<input type="password" class="form-control form-control-sm" id="devOpsPassword" name="password" />
</div>
</div>
</div>
<div class="row pt-2">
<div class="col-md-5">
<input type="radio" id="devops-bearer" name="devops-auth" value="bearer"></input>
<input type="radio" id="devops-bearer" name="devops-auth" value="bearer" />
<label for="devops-bearer">Bearer<br /><small>(JWT OAuth2.0 Bearer token)</small></label>
</div>
<div class="col-md-7">
<div class="input-group input-group-sm mb-1">
<label for="bearerDevOps" class="input-group-text">DevOps Bearer</label>
<input type="password" class="form-control form-control-sm" id="bearerDevOps"></input>
<input type="password" class="form-control form-control-sm" id="bearerDevOps" name="devops-bearer" />
</div>
<div class="input-group input-group-sm mb-1">
</div>
Expand Down
15 changes: 8 additions & 7 deletions ui/modules/things/things.html
Expand Up @@ -14,30 +14,31 @@
<div>
<div class="row resizable_pane" style="height: 40vh;">
<div class="col-md-7 resizable_flex_column">
<div class="input-group input-group-sm mb-1 mt-1">
<form class="input-group input-group-sm mb-1 mt-1" autocomplete="off">
<div class="btn-group dropend">
<button id="searchFavorite" class="btn btn-outline-secondary btn-sm" data-bs-toggle="tooltip"
title="Toggle favorite for search filter">
<i id="favIcon" class="bi bi-star"></i>
</button>
</div>
<input type="search" class="form-control form-control-sm"
id="searchFilterEdit" spellcheck=false autocomplete="off"></input>
<button id="searchThings" class="btn btn-outline-secondary btn-sm" data-bs-toggle="tooltip"
<input autocomplete="false" name="hidden" type="text" style="display:none;">
<input type="text" class="form-control form-control-sm" id="searchFilterEdit" name="search"
spellcheck=false autocomplete="off" />
<button type="button" id="searchThings" class="btn btn-outline-secondary btn-sm" data-bs-toggle="tooltip"
title="Search things by thingId or valid ditto search filter">
search
</button>
<button id="pinnedThings" class="btn btn-outline-secondary btn-sm me-3 button_round_right"
<button type="button" id="pinnedThings" class="btn btn-outline-secondary btn-sm me-3 button_round_right"
data-bs-toggle="tooltip" title="Pinned things: get the list of all individually pinned things">
pinned
</button>
<button id="tableSettings" class="btn btn-outline-secondary btn-sm button_round_both"
<button type="button" id="tableSettings" class="btn btn-outline-secondary btn-sm button_round_both"
data-bs-toggle="modal" data-bs-target="#fieldsModal">
<span data-bs-toggle="tooltip" title="Adjust fields for things table">
<i class="bi bi-gear"></i>
</span>
</button>
</div>
</form>
<div class="table-wrap">
<table class="table table-striped table-hover table-sm">
<thead>
Expand Down
3 changes: 2 additions & 1 deletion ui/modules/utils.ts
Expand Up @@ -14,7 +14,7 @@
/* eslint-disable quotes */
import autoComplete from '@tarekraafat/autocomplete.js';
import * as ace from 'ace-builds/src-noconflict/ace';
import {Toast, Modal} from 'bootstrap';
import { Modal, Toast } from 'bootstrap';


const dom = {
Expand Down Expand Up @@ -65,6 +65,7 @@ export const addTableRow = function(table, key, selected, withClipBoardCopy = fa
export function addCheckboxToRow(row, id, checked, onToggle) {
const td = row.insertCell(0);
td.style.verticalAlign = 'middle';
td.style.width = '25px';
const checkBox = document.createElement('input');
checkBox.type = 'checkbox';
checkBox.id = id;
Expand Down

0 comments on commit 2370356

Please sign in to comment.