Allow users to select their own default engine
Also, add this default engine and the repo to the users view
This commit is contained in:
1 parent
3b574fb62a
commit
0090b64510
6 files changed
+34
-18
No files matched your search
@@ -57,13 +57,14 @@
|
||||
<h3> Engine </h3>
|
||||
<label> Name </label>
|
||||
<select id="enginename" name="enginename" onchange="configure(testMode)">
|
||||
{% for name, data in config.engines.items %}
|
||||
{% if data.default %}
|
||||
<option selected value="{{name}}">{{data.name}}</option>
|
||||
{% for engine in config.engines %}
|
||||
{% if engine == profile.engine %}
|
||||
<option selected value="{{engine}}">{{engine}}</option>
|
||||
{% else %}
|
||||
<option value="{{name}}">{{data.name}}</option>
|
||||
<option value="{{engine}}">{{engine}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<option value="{{engine}}">{{engine}}</option>
|
||||
</select><br>
|
||||
<label> Source </label>
|
||||
<input value="{{profile.repo}}" name="source"></br>
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<th class="numeric">Tests</th>
|
||||
<th>Enabled</th>
|
||||
<th>Approver</th>
|
||||
<th>Engine</th>
|
||||
<th>Repo</th>
|
||||
</tr>
|
||||
{% for profile in profiles %}
|
||||
<tr>
|
||||
@@ -22,10 +24,16 @@
|
||||
<td class="numeric">{{profile.tests}}</td>
|
||||
{% if profile.enabled %}
|
||||
<td class="numeric">X</td>
|
||||
{% else %}
|
||||
<td class="numeric"></td>
|
||||
{% endif %}
|
||||
{% if profile.approver %}
|
||||
<td class="numeric">X</td>
|
||||
{% else %}
|
||||
<td class="numeric"></td>
|
||||
{% endif %}
|
||||
<td>{{profile.engine}}</td>
|
||||
<td><a href="{{profile.repo}}">{{profile.repo}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<table>
|
||||
|
||||
@@ -8,20 +8,28 @@
|
||||
<form method="POST" action="/editProfile/">
|
||||
{% csrf_token %}
|
||||
<label>Username</label>
|
||||
<input readonly value="{{profile.user.username}}" name="username">
|
||||
</br>
|
||||
<input readonly value="{{profile.user.username}}" name="username"></br>
|
||||
<label>Email</label>
|
||||
<input value="{{profile.user.email}}" name="email">
|
||||
</br>
|
||||
<input value="{{profile.user.email}}" name="email"></br>
|
||||
<label>New Password</label>
|
||||
<input type="password" name="password1">
|
||||
</br>
|
||||
<input type="password" name="password1"></br>
|
||||
<label>New Password</label>
|
||||
<input type="password" name="password2">
|
||||
</br>
|
||||
<input type="password" name="password2"></br>
|
||||
<label>Source Repo</label>
|
||||
<input value="{{profile.repo}}" name="repo">
|
||||
</br>
|
||||
<input value="{{profile.repo}}" name="repo"></br>
|
||||
<label>Engine</label>
|
||||
<select id="enginename" name="enginename" onchange="configure(testMode)">
|
||||
{% for engine in config.engines %}
|
||||
{% if profile.engine == engine %}
|
||||
<option selected value="{{engine}}">{{engine}}</option>
|
||||
{% else %}
|
||||
<option value="{{engine}}">{{engine}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not profile.engine %}
|
||||
<option selected value=""></option>
|
||||
{% endif %}
|
||||
</select><br>
|
||||
<input type="submit" name="submit" value="Update Profile">
|
||||
</form>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user