Can create read only clients
This commit is contained in:
		@@ -57,6 +57,7 @@
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <th scope="col">ID</th>
 | 
			
		||||
                    <th scope="col">Description</th>
 | 
			
		||||
                    <th scope="col">Read only</th>
 | 
			
		||||
                    <th scope="col">Network</th>
 | 
			
		||||
                    <th scope="col">Created</th>
 | 
			
		||||
                    <th scope="col">Used</th>
 | 
			
		||||
@@ -68,6 +69,13 @@
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <th scope="row">{{ client.id }}</th>
 | 
			
		||||
                    <td>{{ client.description }}</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        {% if client.readonly_client %}
 | 
			
		||||
                        <strong>YES</strong>
 | 
			
		||||
                        {% else %}
 | 
			
		||||
                        <i>NO</i>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                    </td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        {% if let Some(net) = client.network %}
 | 
			
		||||
                        {{ net }}
 | 
			
		||||
@@ -78,7 +86,9 @@
 | 
			
		||||
                    <td>{{ client.fmt_created() }}</td>
 | 
			
		||||
                    <td>{{ client.fmt_used() }}</td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <button type="button" class="btn btn-danger btn-sm" onclick="deleteClient('{{ client.id }}');">Delete</button>
 | 
			
		||||
                        <button type="button" class="btn btn-danger btn-sm" onclick="deleteClient('{{ client.id }}');">
 | 
			
		||||
                            Delete
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                {% endfor %}
 | 
			
		||||
@@ -111,6 +121,19 @@
 | 
			
		||||
                    <small class="form-text text-muted">Restrict the networks this IP address can be used from.</small>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <br/>
 | 
			
		||||
 | 
			
		||||
                <div class="form-check">
 | 
			
		||||
                    <input class="form-check-input" type="checkbox" value="" checked id="readonly_client"
 | 
			
		||||
                           name="readonly_client"/>
 | 
			
		||||
                    <label class="form-check-label" for="readonly_client">
 | 
			
		||||
                        Readonly client
 | 
			
		||||
                    </label>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <br/>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                <input type="submit" class="btn btn-primary" value="Create client"/>
 | 
			
		||||
            </form>
 | 
			
		||||
        </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user