haproxy-wi/app/templates/ajax/new_ssh.html

64 lines
2.8 KiB
HTML
Raw Normal View History

{% if adding %}
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% endif %}
2018-06-24 09:31:28 +00:00
{% for ssh in sshs %}
<tr style="width: 50%;" id="ssh-table-{{ssh.id}}" class="ssh-table-{{ssh.id}}">
<td class="first-collumn padding10">
<input type="text" id="ssh_name-{{ssh.id}}" class="form-control" value="{{ssh.name}}" style="margin-bottom: 23px;">
</td>
<td class="first-collumn" valign="top" style="padding-top: 15px;">
2024-08-02 09:50:02 +00:00
{% if ssh.key_enabled == 1 %}
<label for="ssh_enable-{{ssh.id}}">{{lang.words.enable|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="ssh_enable-{{ssh.id}}" checked>
{% else %}
<label for="ssh_enable-{{ssh.id}}">{{lang.words.enable|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="ssh_enable-{{ssh.id}}">
{% endif %}
</td>
{% if g.user_params['role'] == 1 %}
<td>
<select id="sshgroup-{{ssh.id}}" name="sshgroup-{{ssh.id}}">
{% for group in groups %}
2024-08-02 09:50:02 +00:00
{% if ssh.group_id == group.group_id %}
<option value="{{ group.group_id }}" selected>{{ group.name }}</option>
2018-06-24 09:31:28 +00:00
{% else %}
<option value="{{ group.group_id }}">{{ group.name }}</option>
2018-06-24 09:31:28 +00:00
{% endif %}
{% endfor %}
</select>
</td>
{% endif %}
<td class="first-collumn" valign="top" style="padding-top: 15px;">
{% if ssh.shared == 1 %}
<label for="ssh_shared-{{ssh.id}}"></label><input type="checkbox" id="ssh_shared-{{ssh.id}}" checked>
{% else %}
<label for="ssh_shared-{{ssh.id}}"></label><input type="checkbox" id="ssh_shared-{{ssh.id}}">
{% endif %}
</td>
<td style="padding-top: 15px;">
<p>
<input type="text" id="ssh_user-{{ssh.id}}" class="form-control" value="{{ssh.username.replace("'", "")}}">
</p>
2024-08-02 09:50:02 +00:00
{% if ssh.key_enabled == 1 %}
<input type="password" id="ssh_pass-{{ssh.id}}" class="form-control" placeholder="*****" style="display: none;">
{% else %}
<input type="password" id="ssh_pass-{{ssh.id}}" class="form-control" placeholder="*****">
{% endif %}
<br>
</td>
<td>
<a class="delete" onclick="confirmDeleteSsh({{ssh.id}})" title="{{lang.words.delete|title()}} {{ssh.name}}" style="cursor: pointer;"></a>
</td>
</tr>
{% if ssh.shared and g.user_params['group_id']|string() != ssh.group_id|string() %}
<script>
$( function() {
$('#sshgroup-{{ssh.id}}').selectmenu('disable');
$('#ssh_shared-{{ssh.id}}').checkboxradio('disable');
$('#ssh_enable-{{ssh.id}}').checkboxradio('disable');
$('#ssh_name-{{ ssh.id }}').prop('readonly', true);
$('#ssh_user-{{ ssh.id }}').prop('readonly', true);
$('#ssh_pass-{{ ssh.id }}').prop('readonly', true);
});
</script>
{% endif %}
{% endfor %}