ข้ามไปเนื้อหา

ผลต่างระหว่างรุ่นของ "CuneiForm"

เพิ่มขึ้น 122 ไบต์ ,  11 เมษายน 2567
บรรทัดที่ 484: บรรทัดที่ 484:
** The ''revert'' button [[ไฟล์:Cuneifox revert btn.png|25px|frameless|alt=Revert button|Revert button]] undoes the change made to the file field and restore its original file/value.
** The ''revert'' button [[ไฟล์:Cuneifox revert btn.png|25px|frameless|alt=Revert button|Revert button]] undoes the change made to the file field and restore its original file/value.
** The ''unselect'' button [[ไฟล์:Cuneifox file delete btn.png|25px|frameless|alt=Unselect button|Unselect button]] clears the file field. This button only appears if the form has a BooleanField named {{code|lang=python|'<file_field_name>_isdel'}} drawn ''(can be hidden)'' on the page.
** The ''unselect'' button [[ไฟล์:Cuneifox file delete btn.png|25px|frameless|alt=Unselect button|Unselect button]] clears the file field. This button only appears if the form has a BooleanField named {{code|lang=python|'<file_field_name>_isdel'}} drawn ''(can be hidden)'' on the page.
* The image box is not drawn as a part of the Jinja2 macro. Developers must create the {{code|lang=html|<img>}} manually and assign to it the id {{code|lang=javascript|'<field_id>-imgbox'}} ''before running {{code|general_form_tail}}''. The tail macro shall automatically link the image box with the form field.
** The ''image box'' triggers the ''view'' button. Note that the image box is not drawn automatically via the {{code|render_upload}} macro. Should it be needed, developers must create the {{code|lang=html|<img>}} element manually and give it the id {{code|lang=javascript|'<file_field_name>-imgbox'}} ''before running {{code|general_form_tail}}''. The tail macro shall automatically detect and link the image box with the form field.


==== Buttons & Submits ====
==== Buttons & Submits ====