Skip to content

Commit

Permalink
Search terms should not be spellchecked.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Mar 7, 2021
1 parent ca3f049 commit 48ba341
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 32 deletions.
11 changes: 6 additions & 5 deletions autoassign.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,12 @@ function divClass($name, $classes = null) {
if (!isset($Qreq->q)) { // XXX redundant
$Qreq->q = join(" ", $SSel->selection());
}
echo Ht::entry("q", $Qreq->q,
array("id" => "autoassignq", "placeholder" => "(All)",
"size" => 40, "title" => "Enter paper numbers or search terms",
"class" => Ht::control_class("q", "papersearch js-autosubmit need-suggest"),
"data-autosubmit-type" => "requery")), "  in  ";
echo Ht::entry("q", $Qreq->q, [
"id" => "autoassignq", "placeholder" => "(All)",
"size" => 40, "aria-label" => "Search",
"class" => Ht::control_class("q", "papersearch js-autosubmit need-suggest"),
"data-autosubmit-type" => "requery", "spellcheck" => false
]), "  in  ";
if (count($tOpt) > 1) {
echo Ht::select("t", $tOpt, $Qreq->t);
} else {
Expand Down
4 changes: 2 additions & 2 deletions conflictassign.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Copyright (c) 2006-2020 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
require_once("src/papersearch.php");
if (!$Me->is_manager())
if (!$Me->is_manager()) {
$Me->escape();
}
$Me->add_overrides(Contact::OVERRIDE_CONFLICT);

$Conf->header("Assignments", "assignpc", ["subtitle" => "Conflicts"]);
Expand Down
5 changes: 2 additions & 3 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) 2006-2020 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
require_once("src/papersearch.php");

$Graph = $Qreq->g;
if (!$Graph
Expand Down Expand Up @@ -43,7 +42,7 @@
function echo_graph($searchable, $fg, $h2) {
echo '<div class="has-hotgraph" style="max-width:960px;margin-bottom:4em">';
if ($searchable) {
echo Ht::entry("q", "", ["placeholder" => "Find on graph", "class" => "uii js-hotgraph-highlight papersearch float-right need-autogrow need-suggest"]);
echo Ht::entry("q", "", ["placeholder" => "Find on graph", "class" => "uii js-hotgraph-highlight papersearch float-right need-autogrow need-suggest", "spellcheck" => false]);
}
if ($h2) {
echo "<h2>", $h2, "</h2>\n";
Expand All @@ -70,7 +69,7 @@ function formulas_qrow($i, $q, $s, $status) {
$q = "";
}
$klass = MessageSet::status_class($status, "papersearch");
$t = '<tr><td class="lentry">' . Ht::entry("q$i", $q, array("size" => 40, "placeholder" => "(All)", "class" => $klass, "id" => "q$i"));
$t = '<tr><td class="lentry">' . Ht::entry("q$i", $q, ["size" => 40, "placeholder" => "(All)", "class" => $klass, "id" => "q$i", "spellcheck" => false]);
$t .= " <span style=\"padding-left:1em\">Style:</span> &nbsp;" . Ht::select("s$i", array("default" => "default", "plain" => "plain", "redtag" => "red", "orangetag" => "orange", "yellowtag" => "yellow", "greentag" => "green", "bluetag" => "blue", "purpletag" => "purple", "graytag" => "gray"), $s !== "" ? $s : "by-tag");
$t .= ' <span class="nb btnbox aumovebox" style="margin-left:1em"><a href="#" class="ui btn qx row-order-ui moveup" tabindex="-1">'
. Icons::ui_triangle(0)
Expand Down
2 changes: 1 addition & 1 deletion log.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ function searchbar(LogRowGenerator $lrg, $page) {
'</div></div><div class="', Ht::control_class("p", "entryi medium"),
'"><label for="p">Concerning paper(s)</label><div class="entry">',
Ht::render_feedback_at("p"),
Ht::entry("p", $Qreq->p, ["id" => "p", "class" => "need-suggest papersearch", "autocomplete" => "off", "size" => 40]),
Ht::entry("p", $Qreq->p, ["id" => "p", "class" => "need-suggest papersearch", "autocomplete" => "off", "size" => 40, "spellcheck" => false]),
'</div></div><div class="', Ht::control_class("u", "entryi medium"),
'"><label for="u">Concerning user(s)</label><div class="entry">',
Ht::render_feedback_at("u"),
Expand Down
9 changes: 4 additions & 5 deletions mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) 2006-2021 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
require_once("src/papersearch.php");
require_once("src/mailclasses.php");
if (!$Me->is_manager() && !$Me->isPC) {
$Me->escape();
Expand Down Expand Up @@ -667,10 +666,10 @@ private function run() {
else
echo '<td class="nw">Papers: &nbsp;</td><td>',
Ht::hidden("plimit", 1), '<span>';
echo Ht::entry("q", (string) $Qreq->q,
array("id" => "q", "placeholder" => "(All)",
"class" => "papersearch need-suggest", "size" => 36)),
" &nbsp;in&nbsp;";
echo Ht::entry("q", (string) $Qreq->q, [
"id" => "q", "placeholder" => "(All)", "spellcheck" => false,
"class" => "papersearch need-suggest", "size" => 36
]), " &nbsp;in&nbsp;";
if (count($tOpt) == 1) {
echo htmlspecialchars($tOpt[$Qreq->t]);
} else {
Expand Down
10 changes: 5 additions & 5 deletions manualassign.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) 2006-2021 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
require_once("src/papersearch.php");
if (!$Me->is_manager()) {
$Me->escape();
}
Expand Down Expand Up @@ -173,10 +172,11 @@ function saveAssignments($qreq, $reviewer) {

// Paper selection
echo "<tr><td>Paper selection: &nbsp;</td><td>",
Ht::entry("q", $Qreq->q,
["id" => "manualassignq", "size" => 40, "placeholder" => "(All)",
"title" => "Paper numbers or search terms"]),
" &nbsp;in &nbsp;";
Ht::entry("q", $Qreq->q, [
"id" => "manualassignq", "size" => 40, "placeholder" => "(All)",
"class" => "papersearch want-focus need-suggest", "aria-label" => "Search",
"spellcheck" => false
]), " &nbsp;in &nbsp;";
if (count($tOpt) > 1) {
echo Ht::select("t", $tOpt, $Qreq->t);
} else {
Expand Down
7 changes: 4 additions & 3 deletions reviewprefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) 2006-2021 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
require_once("src/papersearch.php");
if (!$Me->privChair && !$Me->isPC) {
$Me->escape();
}
Expand Down Expand Up @@ -282,8 +281,10 @@ function parseUploadedPreferences($text, $filename, $apply) {
}

echo '<div class="entryi"><label for="htctl-prefs-q">Search</label><div class="entry">',
Ht::entry("q", $Qreq->q, ["id" => "htctl-prefs-q", "size" => 32]),
'  ', Ht::submit("redisplay", "Redisplay"), '</div></div>';
Ht::entry("q", $Qreq->q, [
"id" => "htctl-prefs-q", "size" => 32, "placeholder" => "(All)",
"class" => "papersearch want-focus need-suggest", "spellcheck" => false
]), '  ', Ht::submit("redisplay", "Redisplay"), '</div></div>';

function show_pref_element($pl, $name, $text, $extra = []) {
return '<li class="' . rtrim("checki " . ($extra["item_class"] ?? ""))
Expand Down
7 changes: 3 additions & 4 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (c) 2006-2021 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
require_once("src/papersearch.php");
if ($Me->is_empty()) {
$Me->escape();
}
Expand Down Expand Up @@ -308,11 +307,11 @@ function checkbox_item($column, $type, $title, $options = []) {
'<div class="entryi medium"><label for="htctl-advanced-qt">Search</label><div class="entry">',
Ht::select("qt", $qtOpt, $Qreq->get("qt", "n"), ["id" => "htctl-advanced-qt"]), '</div></div>',
'<div class="entryi medium"><label for="htctl-advanced-qa">With <b>all</b> the words</label><div class="entry">',
Ht::entry("qa", $Qreq->get("qa", $Qreq->get("q", "")), ["id" => "htctl-advanced-qa", "size" => 60, "class" => "papersearch want-focus need-suggest"]), '</div></div>',
Ht::entry("qa", $Qreq->get("qa", $Qreq->get("q", "")), ["id" => "htctl-advanced-qa", "size" => 60, "class" => "papersearch want-focus need-suggest", "spellcheck" => false]), '</div></div>',
'<div class="entryi medium"><label for="htctl-advanced-qo">With <b>any</b> of the words</label><div class="entry">',
Ht::entry("qo", $Qreq->get("qo", ""), ["id" => "htctl-advanced-qo", "size" => 60]), '</div></div>',
Ht::entry("qo", $Qreq->get("qo", ""), ["id" => "htctl-advanced-qo", "size" => 60, "spellcheck" => false]), '</div></div>',
'<div class="entryi medium"><label for="htctl-advanced-qx"><b>Without</b> the words</label><div class="entry">',
Ht::entry("qx", $Qreq->get("qx", ""), ["id" => "htctl-advanced-qx", "size" => 60]), '</div></div>';
Ht::entry("qx", $Qreq->get("qx", ""), ["id" => "htctl-advanced-qx", "size" => 60, "spellcheck" => false]), '</div></div>';
if (!$Search->limit_explicit()) {
echo '<div class="entryi medium"><label for="htctl-advanced-q">In</label><div class="entry">',
PaperSearch::limit_selector($tOpt, $Search->limit(), ["id" => "htctl-advanced-q"]), '</div></div>';
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ function goPaperForm($baseUrl = null, $args = array()) {
$list = Conf::$main->active_list();
$x = Ht::form(Conf::$main->hoturl($baseUrl ? : "paper"), ["method" => "get", "class" => "gopaper"]);
if ($baseUrl == "profile") {
$x .= Ht::entry("u", "", array("id" => "quicklink-search", "size" => 15, "placeholder" => "User search", "aria-label" => "User search", "class" => "usersearch need-autogrow"));
$x .= Ht::entry("u", "", ["id" => "quicklink-search", "size" => 15, "placeholder" => "User search", "aria-label" => "User search", "class" => "usersearch need-autogrow", "spellcheck" => false]);
} else {
$x .= Ht::entry("p", "", array("id" => "quicklink-search", "size" => 10, "placeholder" => "(All)", "aria-label" => "Search", "class" => "papersearch need-suggest need-autogrow"));
$x .= Ht::entry("p", "", ["id" => "quicklink-search", "size" => 10, "placeholder" => "(All)", "aria-label" => "Search", "class" => "papersearch need-suggest need-autogrow", "spellcheck" => false]);
}
foreach ($args as $k => $v) {
$x .= Ht::hidden($k, $v);
Expand Down
2 changes: 1 addition & 1 deletion src/partials/p_home.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function render_search(Contact $user, Qrequest $qreq, $gx) {
Ht::entry("q", (string) $qreq->q, [
"id" => "homeq", "size" => 32, "title" => "Enter paper numbers or search terms",
"class" => "papersearch need-suggest flex-grow-1",
"placeholder" => "(All)",
"placeholder" => "(All)", "spellcheck" => false,
"aria-labelledby" => "homesearch-label"
]), '<div class="form-basic-search-in"> in ',
PaperSearch::limit_selector($tOpt, key($tOpt), ["class" => "ml-1"]),
Expand Down
2 changes: 1 addition & 1 deletion src/settings/s_reviewform.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ static function render_presence_property(SettingValues $sv, ReviewField $f, $xpo
. Ht::select("rf_{$xpos}_ec", $ecsel, $ecv, ["id" => "rf_{$xpos}_ec", "class" => "uich js-foldup"])
. ' &nbsp;'
. Ht::entry("rf_{$xpos}_ecs", $ecs,
$sv->sjs("rf_{$xpos}_ecs", ["class" => "papersearch fx need-autogrow need-tooltip", "placeholder" => "Search", "data-tooltip-info" => "settings-review-form", "data-tooltip-type" => "focus", "size" => 30]))
$sv->sjs("rf_{$xpos}_ecs", ["class" => "papersearch fx need-autogrow need-tooltip", "placeholder" => "Search", "data-tooltip-info" => "settings-review-form", "data-tooltip-type" => "focus", "size" => 30, "spellcheck" => false]))
. '</div></div>';
}

Expand Down

0 comments on commit 48ba341

Please sign in to comment.