add support for cropping image. WIP.
This commit is contained in:
parent
13055c393a
commit
08b97e722b
5 changed files with 105 additions and 52 deletions
|
|
@ -3,8 +3,11 @@
|
|||
|
||||
from dal import autocomplete
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
import os
|
||||
|
||||
from crispy_forms.helper import FormHelper
|
||||
from crispy_forms.bootstrap import Div
|
||||
from crispy_forms.layout import Layout, HTML
|
||||
|
|
@ -27,8 +30,12 @@ class ImageForm(forms.Form):
|
|||
image = forms.ImageField(required = False,
|
||||
label=_('select an image'),
|
||||
help_text=_('Maximal size: 2MB'))
|
||||
x = forms.FloatField(widget=forms.HiddenInput())
|
||||
y = forms.FloatField(widget=forms.HiddenInput())
|
||||
width = forms.FloatField(widget=forms.HiddenInput())
|
||||
height = forms.FloatField(widget=forms.HiddenInput())
|
||||
|
||||
|
||||
|
||||
class TransactionTemplateForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = TransactionTemplate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue