2024-09-16 07:56:24 +00:00
|
|
|
{% if adding %}
|
2023-02-14 16:46:41 +00:00
|
|
|
{% import 'languages/'+lang|default('en')+'.html' as lang %}
|
2024-09-16 07:56:24 +00:00
|
|
|
{% endif %}
|
2018-06-24 09:31:28 +00:00
|
|
|
{% for ssh in sshs %}
|
2021-08-02 08:19:22 +00:00
|
|
|
<tr style="width: 50%;" id="ssh-table-{{ssh.id}}" class="ssh-table-{{ssh.id}}">
|
2023-04-15 07:33:00 +00:00
|
|
|
<td class="first-collumn padding10">
|
2021-08-02 08:19:22 +00:00
|
|
|
<input type="text" id="ssh_name-{{ssh.id}}" class="form-control" value="{{ssh.name}}" style="margin-bottom: 23px;">
|
2018-06-28 05:55:07 +00:00
|
|
|
</td>
|
|
|
|
<td class="first-collumn" valign="top" style="padding-top: 15px;">
|
2024-08-02 09:50:02 +00:00
|
|
|
{% if ssh.key_enabled == 1 %}
|
2023-02-14 16:46:41 +00:00
|
|
|
<label for="ssh_enable-{{ssh.id}}">{{lang.words.enable|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="ssh_enable-{{ssh.id}}" checked>
|
2018-06-28 05:55:07 +00:00
|
|
|
{% else %}
|
2023-02-14 16:46:41 +00:00
|
|
|
<label for="ssh_enable-{{ssh.id}}">{{lang.words.enable|title()}} SSH {{lang.words.key}}</label><input type="checkbox" id="ssh_enable-{{ssh.id}}">
|
2018-06-28 05:55:07 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
2024-06-16 16:20:18 +00:00
|
|
|
{% if g.user_params['role'] == 1 %}
|
2018-06-28 05:55:07 +00:00
|
|
|
<td>
|
2021-08-02 08:19:22 +00:00
|
|
|
<select id="sshgroup-{{ssh.id}}" name="sshgroup-{{ssh.id}}">
|
2018-06-28 05:55:07 +00:00
|
|
|
{% for group in groups %}
|
2024-08-02 09:50:02 +00:00
|
|
|
{% if ssh.group_id == group.group_id %}
|
2021-08-02 08:19:22 +00:00
|
|
|
<option value="{{ group.group_id }}" selected>{{ group.name }}</option>
|
2018-06-24 09:31:28 +00:00
|
|
|
{% else %}
|
2021-08-02 08:19:22 +00:00
|
|
|
<option value="{{ group.group_id }}">{{ group.name }}</option>
|
2018-06-24 09:31:28 +00:00
|
|
|
{% endif %}
|
2018-06-28 05:55:07 +00:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
2024-09-16 07:56:24 +00:00
|
|
|
<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>
|
2018-06-28 05:55:07 +00:00
|
|
|
<td style="padding-top: 15px;">
|
|
|
|
<p>
|
2024-06-16 16:20:18 +00:00
|
|
|
<input type="text" id="ssh_user-{{ssh.id}}" class="form-control" value="{{ssh.username.replace("'", "")}}">
|
2018-06-28 05:55:07 +00:00
|
|
|
</p>
|
2024-08-02 09:50:02 +00:00
|
|
|
{% if ssh.key_enabled == 1 %}
|
2021-08-02 08:19:22 +00:00
|
|
|
<input type="password" id="ssh_pass-{{ssh.id}}" class="form-control" placeholder="*****" style="display: none;">
|
2018-06-28 05:55:07 +00:00
|
|
|
{% else %}
|
2021-08-02 08:19:22 +00:00
|
|
|
<input type="password" id="ssh_pass-{{ssh.id}}" class="form-control" placeholder="*****">
|
2018-06-28 05:55:07 +00:00
|
|
|
{% endif %}
|
|
|
|
<br>
|
|
|
|
</td>
|
|
|
|
<td>
|
2024-06-16 16:20:18 +00:00
|
|
|
<a class="delete" onclick="confirmDeleteSsh({{ssh.id}})" title="{{lang.words.delete|title()}} {{ssh.name}}" style="cursor: pointer;"></a>
|
2018-06-28 05:55:07 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2024-09-16 07:56:24 +00:00
|
|
|
{% 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 %}
|
2023-02-14 16:46:41 +00:00
|
|
|
{% endfor %}
|