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' if attribute.type is 'hidden'
attribute.autocomplete = '' attribute.autocomplete = ''
else else
attribute.autocomplete = 'autocomplete="new-password"' attribute.autocomplete = 'autocomplete="off"'
else else
attribute.autocomplete = 'autocomplete="' + attribute.autocomplete + '"' attribute.autocomplete = 'autocomplete="' + attribute.autocomplete + '"'

View file

@ -9,7 +9,7 @@
<label for="application_id">Facebook APP ID <span>*</span></label> <label for="application_id">Facebook APP ID <span>*</span></label>
</div> </div>
<div class="controls"> <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> </div>
<div class="input form-group"> <div class="input form-group">
@ -17,7 +17,7 @@
<label for="application_secret">Facebook App Secret <span>*</span></label> <label for="application_secret">Facebook App Secret <span>*</span></label>
</div> </div>
<div class="controls"> <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>
</div> </div>
<h2><%- @T('Your callback URL') %></h2> <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 %>" 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 %>"/> <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: %> <% if @attribute.multiple: %>
<%- @tokens %> <%- @tokens %>
<% end %> <% 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 %> <% if @attribute.disableCreateObject isnt true: %><%- @Icon('arrow-down', 'dropdown-arrow') %><% end %>
</div> </div>

View file

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

View file

@ -9,15 +9,15 @@
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
<label><%- @T('Full Name') %></label> <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>
<div class="form-group"> <div class="form-group">
<label><%- @T('Email') %></label> <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>
<div class="form-group"> <div class="form-group">
<label><%- @T('Password') %></label> <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> </div>
</fieldset> </fieldset>
</div> </div>

View file

@ -9,7 +9,7 @@
<label for="api_token"><%- @T('%s Api Token', 'Telegram') %> <span>*</span></label> <label for="api_token"><%- @T('%s Api Token', 'Telegram') %> <span>*</span></label>
</div> </div>
<div class="controls"> <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>
</div> </div>
<h2><%- @T('Settings') %></h2> <h2><%- @T('Settings') %></h2>
@ -18,7 +18,7 @@
<label for="welcome"><%- @T('Welcome message') %> <span>*</span></label> <label for="welcome"><%- @T('Welcome message') %> <span>*</span></label>
</div> </div>
<div class="controls"> <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> </div>
<div class="input form-group"> <div class="input form-group">

View file

@ -6,7 +6,7 @@
<label for="api_token"><%- @T('%s Api Token', 'Telegram') %> <span>*</span></label> <label for="api_token"><%- @T('%s Api Token', 'Telegram') %> <span>*</span></label>
</div> </div>
<div class="controls"> <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>
</div> </div>
<h2><%- @T('Settings') %></h2> <h2><%- @T('Settings') %></h2>
@ -15,7 +15,7 @@
<label for="welcome"><%- @T('welcome message') %> <span>*</span></label> <label for="welcome"><%- @T('welcome message') %> <span>*</span></label>
</div> </div>
<div class="controls"> <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> </div>
<div class="input form-group"> <div class="input form-group">

View file

@ -9,7 +9,7 @@
<label for="consumer_key">Twitter Consumer Key <span>*</span></label> <label for="consumer_key">Twitter Consumer Key <span>*</span></label>
</div> </div>
<div class="controls"> <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> </div>
<div class="input form-group"> <div class="input form-group">
@ -17,7 +17,7 @@
<label for="consumer_secret">Twitter Consumer Secret <span>*</span></label> <label for="consumer_secret">Twitter Consumer Secret <span>*</span></label>
</div> </div>
<div class="controls"> <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>
</div> </div>
<h2><%- @T('Your callback URL') %></h2> <h2><%- @T('Your callback URL') %></h2>

View file

@ -4,7 +4,7 @@
<%- @T( 'Search' ) %> <%- @T( 'Search' ) %>
<br> <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> <a href="#" class="close">&times;</a>
<br> <br>
<div id="form-text-module" class="max-size-scroll"></div> <div id="form-text-module" class="max-size-scroll"></div>