{% import 'macros_form.html' as form with context %}
{% if cropper_widget %}
{% call form.box(table=False, title=trans('label_croppict')) %} {{ cropper_widget }} {% endcall %}
{% endif %}
{% call form.box(table=False, title=trans('label_presentpict'), title_field_extra=htmlstr(' %s onchange="refreshCropArea()"') % ('checked="checked"' if picmethodpresent else ''), title_field_name='%spicmethod' % uid, title_field_id='%sradiopresent' % uid, title_field_type='radio', title_field_value='present') %} {% endcall %} {% if image_url %} {% call form.box(table=False) %} {% call form.innerbtngroup() %} {{ form.innerbtn(name='%sdelpict.x' % uid, type='submit', value=trans('label_delpict_button')) }} {% endcall %} {% endcall %} {% endif %}

{% call form.box(table=True, title=trans('label_externalpict'), title_field_extra=htmlstr(' %s onchange="refreshCropArea()"') % ('checked="checked"' if picmethodurl else ''), title_field_name='%spicmethod' % uid, title_field_id='%sradiourl' % uid, title_field_type='radio', title_field_value='url') %} {{ form.tablefield(label=trans('label_url'), errorid='image', extra=htmlstr(' onfocus="return picdetails_checkradio(\'%sradiourl\')" onchange="refreshCropArea()" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();"') % uid, name='%simage' % uid, type='text', value=image) }} {% endcall %} {% call form.box(table=True, title=trans('label_newpict'), title_field_extra=htmlstr(' %s onchange="refreshCropArea()"') % ('checked="checked"' if picmethodfile else ''), title_field_name='%spicmethod' % uid, title_field_id='%sradiofile' % uid, title_field_type='radio', title_field_value='file') %} {{ form.tablefield(label=trans('local_file'), errorid='files', extra=htmlstr(' onchange="return picdetails_checkradio(\'%sradiofile\')"') % uid, name='%sfiles' % uid, type='file') }} {% endcall %}