Skip to content

Commit

Permalink
Use inputmode=url (#1502)
Browse files Browse the repository at this point in the history
Fix #1328 by running:

    grep -RE 'form action="(https://internet.nl)?/(site|mail)/" method="POST"|type="text"' interface -l | xargs -n1 sed -r -i 's@(form action="(https://internet.nl)?/(site|mail)/" method="POST") novalidate@\1@g;s/(type=)"(url|email)"/\1"text" inputmode="url"/g'
  • Loading branch information
bwbroersma authored Sep 19, 2024
1 parent 9319cb0 commit 46b4042
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions interface/templates/base-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ <h2 id="{{probe.name}}" class="{{probe.verdict}}">
<h2>
{% include "string.html" with name="results test website label" %}
</h2>
<form action="/site/" method="POST" novalidate>
<form action="/site/" method="POST">
<label class="text-input" for="web-url">
{% include "string.html" with name="base test website input" %}
<input id="web-url" type="url" name="url" placeholder="www.example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
<input id="web-url" type="text" inputmode="url" name="url" placeholder="www.example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
</label>
<div class="contains-button">
<button>
Expand Down Expand Up @@ -163,11 +163,11 @@ <h3>
<h2>
{% include "string.html" with name="results test email label" %}
</h2>
<form action="/mail/" method="POST" novalidate>
<form action="/mail/" method="POST">
<label class="text-input" for="mail-url">
{% include "string.html" with name="base test mail input" %}
<span class="emailfield before">
<input id="mail-url" class="email" type="url" name="url" placeholder="example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
<input id="mail-url" class="email" type="text" inputmode="url" name="url" placeholder="example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
</span>
</label>
<div class="contains-button">
Expand Down
8 changes: 4 additions & 4 deletions interface/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ <h2>{% include "string.html" with name="base test website label" %}</h2>
<a href="/test-site/">{% include "string.html" with name="base test explain" %}</a>
</p>
</div>
<form action="/site/" method="POST" novalidate>
<form action="/site/" method="POST">
<label class="text-input" for="web-url">{% include "string.html" with name="base test website input" %}
<input id="web-url" type="url" name="url" placeholder="www.example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
<input id="web-url" type="text" inputmode="url" name="url" placeholder="www.example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
</label>
<div class="contains-button">
<button>{% include "string.html" with name="base test start" %}</button>
Expand All @@ -41,10 +41,10 @@ <h2>{% include "string.html" with name="base test mail label" %}</h2>
<a href="/test-mail/">{% include "string.html" with name="base test explain" %}</a>
</p>
</div>
<form action="/mail/" method="POST" novalidate>
<form action="/mail/" method="POST">
<label class="text-input" for="mail-url">{% include "string.html" with name="base test mail input" %}
<span class="emailfield before">
<input id="mail-url" class="email" type="url" name="url" placeholder="example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
<input id="mail-url" class="email" type="text" inputmode="url" name="url" placeholder="example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
</span>
</label>
<div class="contains-button">
Expand Down
4 changes: 2 additions & 2 deletions interface/templates/test-mail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<h1>{% include "string.html" with name="base test mail title" %}</h1>
{% include "content.html" with name="base test mail explain" %}
</div>
<form action="/mail/" method="POST" novalidate>
<form action="/mail/" method="POST">
<label class="text-input" for="mail-url">{% include "string.html" with name="base test mail input" %}
<span class="emailfield before">
<input id="mail-url" class="email" type="url" name="url" placeholder="example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
<input id="mail-url" class="email" type="text" inputmode="url" name="url" placeholder="example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
</span>
</label>
{% if request.GET.invalid != None %}
Expand Down
4 changes: 2 additions & 2 deletions interface/templates/test-site.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<h1>{% include "string.html" with name="base test website title" %}</h1>
{% include "content.html" with name="base test website explain" %}
</div>
<form action="/site/" method="POST" novalidate>
<form action="/site/" method="POST">
<label class="text-input" for="web-url">{% include "string.html" with name="base test website input" %}
<input id="web-url" type="url" name="url" placeholder="www.example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
<input id="web-url" type="text" inputmode="url" name="url" placeholder="www.example.nl" autocorrect="off" autocapitalize="none" spellcheck="false">
</label>
{% if request.GET.invalid != None %}
<div class="invalid-domain">
Expand Down
4 changes: 2 additions & 2 deletions interface/templates/widget-mail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{% include "content.html" with name="widget mail intro" %}
<h2><label for="html-block">HTML</label></h2>
<div>
<textarea id="html-block" readonly>&lt;form action="https://internet.nl/mail/" method="POST" novalidate&gt;
<textarea id="html-block" readonly>&lt;form action="https://internet.nl/mail/" method="POST"&gt;
&lt;p&gt;
&lt;img class="internetnl" src="https://internet.nl/static/logo_en.svg" alt="{% translate 'page sitedescription' %}"/&gt;
{% translate 'widget mail html-block' %}
&lt;/p&gt;
&lt;label for="internetnl-mail-url"&gt;{% translate 'base test mail input'%}&lt;/label&gt;
&lt;span class="internetnl emailfield"&gt;
&lt;input id="internetnl-mail-url" type="url" name="url" placeholder="example.nl"&gt;
&lt;input id="internetnl-mail-url" type="text" inputmode="url" name="url" placeholder="example.nl"&gt;
&lt;/span&gt;
&lt;button class="internetnl"&gt;{% translate 'base test start'%}&lt;/button&gt;
&lt;/form&gt;</textarea>
Expand Down
4 changes: 2 additions & 2 deletions interface/templates/widget-site.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
{% include "content.html" with name="widget site intro" %}
<h2><label for="html-block">HTML</label></h2>
<div>
<textarea id="html-block" readonly>&lt;form action="https://internet.nl/site/" method="POST" novalidate&gt;
<textarea id="html-block" readonly>&lt;form action="https://internet.nl/site/" method="POST"&gt;
&lt;p&gt;
&lt;img class="internetnl" src="https://internet.nl/static/logo_en.svg" alt="{% translate 'page sitedescription' %}"/&gt;
{% translate 'widget site html-block' %}
&lt;/p&gt;
&lt;label for="internetnl-site-url"&gt;{% translate 'base test website input'%}&lt;/label&gt;
&lt;input id="internetnl-site-url" type="url" name="url" placeholder="www.example.nl"&gt;
&lt;input id="internetnl-site-url" type="text" inputmode="url" name="url" placeholder="www.example.nl"&gt;
&lt;button class="internetnl"&gt;{% translate 'base test start'%}&lt;/button&gt;
&lt;/form&gt;</textarea>
</div>
Expand Down

0 comments on commit 46b4042

Please sign in to comment.