Commit 48a28dec by Dányi Bence

webui: password display implementation changed

parent dcd8639d
...@@ -179,24 +179,14 @@ $(function() { ...@@ -179,24 +179,14 @@ $(function() {
$('#new-group-semester').change(updateSummary); $('#new-group-semester').change(updateSummary);
$('#new-group-members').change(updateSummary); $('#new-group-members').change(updateSummary);
}); });
$('#vm-password-show').click(function() {
$('#vm-password-show').hide();
$('#vm-password').show();
});
$('.hidden-password').each(function() {
$(this).val('******');
});
$('.hidden-password').click(function() { $('.hidden-password').click(function() {
if(!$(this).hasClass('shown')) { if($(this).attr('type') == 'password'){
$(this).val($(this).data('value')); $(this).attr('type', 'text');
$(this).addClass('shown');
} else { } else {
$(this).val('******'); $(this).attr('type', 'password');
$(this).removeClass('shown');
} }
}) });
toggleDetails.apply($('.selected-summary')); $('.selected-summary').next().show();
toggleDetails.apply($('.selected-summary'));
/** /**
* Connect button new window * Connect button new window
*/ */
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</tr> </tr>
<tr> <tr>
<th>{% trans "Password" %}:</th> <th>{% trans "Password" %}:</th>
<td><input type="text" class="hidden-password" data-value="{{ i.pw }}" /></td> <td><input type="password" class="hidden-password" value="{{ i.pw }}" /></td>
</tr> </tr>
</table> </table>
</div> </div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment