Add Question.valid_file_portrait as well as crop editor for images

This commit is contained in:
Raphael Michel
2021-04-19 15:39:38 +02:00
parent 638b856f42
commit 24bccf8b9c
24 changed files with 4239 additions and 21 deletions

View File

@@ -567,6 +567,7 @@ var form_handlers = function (el) {
el.find("input[name*=question], select[name*=question]").change(questions_toggle_dependent);
questions_toggle_dependent();
questions_init_photos(el);
};
$(function () {

View File

@@ -105,6 +105,7 @@ $(function () {
$("#valid-date").toggle($("#id_type").val() == "D");
$("#valid-datetime").toggle($("#id_type").val() == "W");
$("#valid-number").toggle($("#id_type").val() == "N");
$("#valid-file").toggle($("#id_type").val() == "F");
show = $("#id_type").val() == "B" && $("#id_required").prop("checked");
$(".alert-required-boolean").toggle(show);

View File

@@ -318,6 +318,21 @@ input[type=number].short {
}
}
.photo-initial {
margin-bottom: 5px;
}
.photo-preview {
max-width: 550px;
width: 100%;
height: auto;
margin-top: 10px;
img {
display: block;
max-width: 100%;
}
}
.propagated-settings-box {
position: relative;

View File

@@ -4,6 +4,7 @@
@import "../../pretixbase/scss/_theme.scss";
@import "../../typeahead/typeahead.scss";
@import "../../charts/morris.scss";
@import "../../cropper/cropper.scss";
@import "../../datetimepicker/_bootstrap-datetimepicker.scss";
@import "_sb-admin-2.scss";
@import "_forms.scss";