-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassword_live.html.leex
37 lines (34 loc) · 1.67 KB
/
password_live.html.leex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<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>