Skip to content
Permalink
3229e0d67e
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
37 lines (34 sloc) 1.67 KB
<h1 class="password-page-header">Memorable password generator </h1>
<div class="password">
<input type="text" class="generated-password" id="generated-password" value="<%= @password %>"/>
<a href="#" id="copy-generated-password" class="copy-generated-password"><img alt ="copy" src = "images/copy.svg"/> </a>
<p class="copied hidden" id="copied" >Copied</p>
</div>
<div class="password-settings">
<form phx-change="password-generation-details-changed">
<label for="min-words">Minimum words (<%= @min_words %>)</label>
<input type="range" min="<%= min_min_words() %>" max="<%= max_min_words() %>" name="min-words"
id="min-words" class="password-range" value="<%= @min_words %>" />
<label for="min-chars">Minimum total letters (<%= @min_chars %>)</label>
<input type="range" min="<%= min_min_chars() %>" max="<%= max_min_chars() / 2 %>" name="min-chars"
id="min-chars" class="password-range" value="<%= @min_chars %>" />
</form>
<form phx-change="password-decoration-details-changed">
<fieldset class="decoration-details">
<legend>Separator</legend>
<%=radio_selection("separator", @separator, separators()) %>
</fieldset>
<fieldset class="decoration-details">
<legend>Capitalise</legend>
<%= radio_selection("capitalise", @capitalise, capitalisations()) %>
</fieldset>
<fieldset class="decoration-details">
<legend>Append</legend>
<input type="hidden" name="append[]" value=""/>
<%= for append <- ["6", "?", "!", "&"] do %>
<%= append_checkbox(append, append in @append) %>
<% end %>
</fieldset>
</form>
</div>
<button phx-click="generate-password">Generate another</button>