Replaced autocomplete value new-password with off to prevent browser autocomplete feature in certain fields (only use it for user password now).

This commit is contained in:
Martin Edenhofer 2017-06-20 11:05:16 +02:00
parent a548009b86
commit 284dbb3de8
10 changed files with 16 additions and 17 deletions

View file

@ -229,7 +229,7 @@ class App.ControllerForm extends App.Controller
if attribute.type is 'hidden'
attribute.autocomplete = ''
else
attribute.autocomplete = 'autocomplete="new-password"'
attribute.autocomplete = 'autocomplete="off"'
else
attribute.autocomplete = 'autocomplete="' + attribute.autocomplete + '"'

View file

@ -9,7 +9,7 @@
<label for="application_id">Facebook APP ID <span>*</span></label>
</div>
<div class="controls">
<input id="application_id" type="text" name="application_id" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.application_id %><% end %>" class="form-control" required autocomplete="new-password">
<input id="application_id" type="text" name="application_id" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.application_id %><% end %>" class="form-control" required autocomplete="off">
</div>
</div>
<div class="input form-group">
@ -17,7 +17,7 @@
<label for="application_secret">Facebook App Secret <span>*</span></label>
</div>
<div class="controls">
<input id="application_secret" type="text" name="application_secret" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.application_secret %><% end %>" class="form-control" required autocomplete="new-password">
<input id="application_secret" type="text" name="application_secret" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.application_secret %><% end %>" class="form-control" required autocomplete="off">
</div>
</div>
<h2><%- @T('Your callback URL') %></h2>

View file

@ -1,3 +1,3 @@
<input id="<%= @attribute.id %>" type="hidden" name="<%= @attribute.name %>" value="<%= @attribute.value %>" <%= @attribute.required %> />
<input id="<%= @attribute.id %>_autocompletion" type="text" name="<%= @attribute.name %>_autocompletion" value="<%= @attribute.valueShown %>" class="form-control <%= @attribute.class %>" <%= @attribute.required %> <%= @attribute.autofocus %> <%- @attribute.autocapitalize %> <% if @attribute.placeholder: %>placeholder="<%- @Ti(@attribute.placeholder) %>"<% end %> autocomplete="new-password"/>
<input id="<%= @attribute.id %>_autocompletion" type="text" name="<%= @attribute.name %>_autocompletion" value="<%= @attribute.valueShown %>" class="form-control <%= @attribute.class %>" <%= @attribute.required %> <%= @attribute.autofocus %> <%- @attribute.autocapitalize %> <% if @attribute.placeholder: %>placeholder="<%- @Ti(@attribute.placeholder) %>"<% end %> autocomplete="off"/>
<input id="<%= @attribute.id %>_autocompletion_value_shown" type="hidden" name="<%= @attribute.name %>_autocompletion_value_shown" value="<%= @attribute.valueShown %>"/>

View file

@ -3,7 +3,7 @@
<% if @attribute.multiple: %>
<%- @tokens %>
<% end %>
<input name="<%- @attribute.name %>_completion" class="user-select token-input js-objectSelect" autocapitalize="off" placeholder="<%- @attribute.placeholder %>" autocomplete="new-password" <%= @attribute.autofocus %> role="textbox" aria-autocomplete="list" value="<%= @name %>" aria-haspopup="true">
<input name="<%- @attribute.name %>_completion" class="user-select token-input js-objectSelect" autocapitalize="off" placeholder="<%- @attribute.placeholder %>" autocomplete="off" <%= @attribute.autofocus %> role="textbox" aria-autocomplete="list" value="<%= @name %>" aria-haspopup="true">
<% if @attribute.disableCreateObject isnt true: %><%- @Icon('arrow-down', 'dropdown-arrow') %><% end %>
</div>

View file

@ -11,8 +11,7 @@
class="searchableSelect-main form-control js-input<%= " #{ @class }" if @class %>"
placeholder="<%= @placeholder %>"
value="<%= @valueName %>"
autocomplete="new-password"
name="select_<%= @name %>"
autocomplete="off"
<%= @required %>
>
<div class="searchableSelect-autocomplete">

View file

@ -9,15 +9,15 @@
<fieldset>
<div class="form-group">
<label><%- @T('Full Name') %></label>
<input type="text" class="form-control" value="" name="realname" placeholder="<%- @Ti('Organization Support') %>" required autocomplete="new-password">
<input type="text" class="form-control" value="" name="realname" placeholder="<%- @Ti('Organization Support') %>" required autocomplete="off">
</div>
<div class="form-group">
<label><%- @T('Email') %></label>
<input type="email" class="form-control" value="" name="email" placeholder="<%- @Ti('support@example.com') %>" required autocomplete="new-password">
<input type="email" class="form-control" value="" name="email" placeholder="<%- @Ti('support@example.com') %>" required autocomplete="off">
</div>
<div class="form-group">
<label><%- @T('Password') %></label>
<input type="password" class="form-control" name="password" value="" required autocomplete="new-password">
<input type="password" class="form-control" name="password" value="" required autocomplete="off">
</div>
</fieldset>
</div>

View file

@ -9,7 +9,7 @@
<label for="api_token"><%- @T('%s Api Token', 'Telegram') %> <span>*</span></label>
</div>
<div class="controls">
<input id="api_token" type="text" name="api_token" value="" class="form-control" required autocomplete="new-password">
<input id="api_token" type="text" name="api_token" value="" class="form-control" required autocomplete="off">
</div>
</div>
<h2><%- @T('Settings') %></h2>
@ -18,7 +18,7 @@
<label for="welcome"><%- @T('Welcome message') %> <span>*</span></label>
</div>
<div class="controls">
<input id="welcome" type="text" name="welcome" value="" placeholder="<%- @Ti('You are welcome! Just ask me something!') %>" class="form-control" required autocomplete="new-password">
<input id="welcome" type="text" name="welcome" value="" placeholder="<%- @Ti('You are welcome! Just ask me something!') %>" class="form-control" required autocomplete="off">
</div>
</div>
<div class="input form-group">

View file

@ -6,7 +6,7 @@
<label for="api_token"><%- @T('%s Api Token', 'Telegram') %> <span>*</span></label>
</div>
<div class="controls">
<input id="api_token" type="text" name="api_token" value="<%= @channel.options.api_token %>" class="form-control" required autocomplete="new-password">
<input id="api_token" type="text" name="api_token" value="<%= @channel.options.api_token %>" class="form-control" required autocomplete="off">
</div>
</div>
<h2><%- @T('Settings') %></h2>
@ -15,7 +15,7 @@
<label for="welcome"><%- @T('welcome message') %> <span>*</span></label>
</div>
<div class="controls">
<input id="welcome" type="text" name="welcome" value="<%= @channel.options.welcome %>" placeholder="<%- @Ti('You are welcome! Just ask me something!') %>" class="form-control" required autocomplete="new-password">
<input id="welcome" type="text" name="welcome" value="<%= @channel.options.welcome %>" placeholder="<%- @Ti('You are welcome! Just ask me something!') %>" class="form-control" required autocomplete="off">
</div>
</div>
<div class="input form-group">

View file

@ -9,7 +9,7 @@
<label for="consumer_key">Twitter Consumer Key <span>*</span></label>
</div>
<div class="controls">
<input id="consumer_key" type="text" name="consumer_key" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.consumer_key %><% end %>" class="form-control" required autocomplete="new-password" >
<input id="consumer_key" type="text" name="consumer_key" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.consumer_key %><% end %>" class="form-control" required autocomplete="off" >
</div>
</div>
<div class="input form-group">
@ -17,7 +17,7 @@
<label for="consumer_secret">Twitter Consumer Secret <span>*</span></label>
</div>
<div class="controls">
<input id="consumer_secret" type="text" name="consumer_secret" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.consumer_secret %><% end %>" class="form-control" required autocomplete="new-password" >
<input id="consumer_secret" type="text" name="consumer_secret" value="<% if @external_credential && @external_credential.credentials: %><%= @external_credential.credentials.consumer_secret %><% end %>" class="form-control" required autocomplete="off" >
</div>
</div>
<h2><%- @T('Your callback URL') %></h2>

View file

@ -4,7 +4,7 @@
<%- @T( 'Search' ) %>
<br>
-->
<input type="text" name="" id="text-module-search" class="span2" value="<%= @search %>" autocomplete="new-password"/>
<input type="text" name="" id="text-module-search" class="span2" value="<%= @search %>" autocomplete="off"/>
<a href="#" class="close">&times;</a>
<br>
<div id="form-text-module" class="max-size-scroll"></div>