euscanwww: Report problems is hided and can be shown with a click
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
d70e4cb617
commit
8268e634f0
@ -168,59 +168,67 @@
|
|||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<h3>Report problems</h3>
|
<h3 class="report-problems-toggle cursor-pointer">Report problems</h3>
|
||||||
|
<div class="report-problems hide">
|
||||||
|
<form action="." method="post" class="form-horizontal">
|
||||||
|
<div class="control-group {% if problem_form.version.errors %}error{% endif %}">
|
||||||
|
<label class="control-label" for="version">{{ problem_form.version.label }}</label>
|
||||||
|
<div class="controls">
|
||||||
|
{{ problem_form.version }}
|
||||||
|
<span class="help-inline">{{ problem_form.version.errors.as_text }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group {% if problem_form.subject.errors %}error{% endif %}">
|
||||||
|
<label class="control-label" for="subject">{{ problem_form.subject.label }}</label>
|
||||||
|
<div class="controls">
|
||||||
|
{{ problem_form.subject }}
|
||||||
|
<span class="help-inline">{{ problem_form.subject.errors.as_text }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group {% if problem_form.message.errors %}error{% endif %}">
|
||||||
|
<label class="control-label" for="message">{{ problem_form.message.label }}</label>
|
||||||
|
<div class="controls">
|
||||||
|
{{ problem_form.message }}
|
||||||
|
<span class="help-inline">{{ problem_form.message.errors.as_text }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form action="." method="post" class="form-horizontal">
|
<div class="control-group">
|
||||||
<div class="control-group {% if problem_form.version.errors %}error{% endif %}">
|
<div class="controls">
|
||||||
<label class="control-label" for="version">{{ problem_form.version.label }}</label>
|
<input class="btn" type="submit" value="Submit" />
|
||||||
<div class="controls">
|
</div>
|
||||||
{{ problem_form.version }}
|
|
||||||
<span class="help-inline">{{ problem_form.version.errors.as_text }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
<div class="control-group {% if problem_form.subject.errors %}error{% endif %}">
|
</div>
|
||||||
<label class="control-label" for="subject">{{ problem_form.subject.label }}</label>
|
|
||||||
<div class="controls">
|
|
||||||
{{ problem_form.subject }}
|
|
||||||
<span class="help-inline">{{ problem_form.subject.errors.as_text }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group {% if problem_form.message.errors %}error{% endif %}">
|
|
||||||
<label class="control-label" for="message">{{ problem_form.message.label }}</label>
|
|
||||||
<div class="controls">
|
|
||||||
{{ problem_form.message }}
|
|
||||||
<span class="help-inline">{{ problem_form.message.errors.as_text }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<div class="controls">
|
|
||||||
<input class="btn" type="submit" value="Submit" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(".refresh-button").click(function() {
|
$(document).ready(function () {
|
||||||
var url = "{% url "refresh_package" "XXX" "YYY" %}";
|
$(".refresh-button").click(function() {
|
||||||
$.post(url.replace("XXX", $(this).data("category")).replace("YYY", $(this).data("package")),
|
var url = "{% url "refresh_package" "XXX" "YYY" %}";
|
||||||
function() {
|
$.post(url.replace("XXX", $(this).data("category")).replace("YYY", $(this).data("package")),
|
||||||
alert("Submitted!");
|
function() {
|
||||||
|
alert("Submitted!");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".favourite-button").click(function() {
|
||||||
|
$.post($(this).data("url"), function() {
|
||||||
|
$(".unfavourite-button").removeClass("hide");
|
||||||
|
$(".favourite-button").addClass("hide");
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$(".favourite-button").click(function() {
|
|
||||||
$.post($(this).data("url"), function() {
|
|
||||||
$(".unfavourite-button").removeClass("hide");
|
|
||||||
$(".favourite-button").addClass("hide");
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
$(".unfavourite-button").click(function() {
|
$(".unfavourite-button").click(function() {
|
||||||
$.post($(this).data("url"), function() {
|
$.post($(this).data("url"), function() {
|
||||||
$(".favourite-button").removeClass("hide");
|
$(".favourite-button").removeClass("hide");
|
||||||
$(".unfavourite-button").addClass("hide");
|
$(".unfavourite-button").addClass("hide");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".report-problems-toggle").click(function () {
|
||||||
|
$(".report-problems").toggle("slow");
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -238,6 +238,10 @@ th {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cursor-pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
width: inherit;
|
width: inherit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user