mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
Image capture parameter
This commit is contained in:
@@ -215,6 +215,7 @@
|
||||
"preview": "Preview",
|
||||
"attachmentField": "Attachment Field",
|
||||
"maxFileSize": "Max File Size (Mb)",
|
||||
"capture": "Capture",
|
||||
"isPersonalData": "Is Personal Data",
|
||||
"useIframe": "Use Iframe",
|
||||
"useNumericFormat": "Use Numeric Format",
|
||||
@@ -359,6 +360,10 @@
|
||||
"labelType": {
|
||||
"state": "State",
|
||||
"regular": "Regular"
|
||||
},
|
||||
"capture": {
|
||||
"user": "User",
|
||||
"environment": "Environment"
|
||||
}
|
||||
},
|
||||
"logicalOperators": {
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"imageCapture": "Specifies which camera to use for capture of image data.",
|
||||
"optionsReference": "Re-use options from another field.",
|
||||
"currencyDecimal": "Use the Decimal DB type. In the app, values will be represented as strings. Check this parameter if precision is required.",
|
||||
"cutHeight": "A text higher then a specified value will be cut with a 'show more' button displayed.",
|
||||
|
||||
@@ -32,6 +32,16 @@
|
||||
"tooltip": true,
|
||||
"min": 0
|
||||
},
|
||||
{
|
||||
"name": "capture",
|
||||
"type": "enum",
|
||||
"options": [
|
||||
"",
|
||||
"user",
|
||||
"environment"
|
||||
],
|
||||
"tooltip": "imageCapture"
|
||||
},
|
||||
{
|
||||
"name": "readOnly",
|
||||
"type": "bool"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
type="file"
|
||||
class="file pull-right"
|
||||
{{#if acceptAttribute}}accept="{{acceptAttribute}}"{{/if}}
|
||||
{{#if capture}} capture="{{capture}}" {{/if}}
|
||||
tabindex="-1"
|
||||
>
|
||||
</label>
|
||||
|
||||
@@ -62,6 +62,12 @@ export interface FileParams extends LinkParams {
|
||||
* A max file size (in Mb).
|
||||
*/
|
||||
maxFileSize?: number;
|
||||
/**
|
||||
* Specifies which camera to use for capture of image data.
|
||||
*
|
||||
* @since 10.0.0
|
||||
*/
|
||||
capture?: null | 'user' | 'environment';
|
||||
}
|
||||
|
||||
export interface FileOptions extends LinkOptions {
|
||||
@@ -128,6 +134,7 @@ class FileFieldView<
|
||||
...super.data(),
|
||||
id: this.model.get(this.idName),
|
||||
acceptAttribute: this.acceptAttribute,
|
||||
capture: this.params.capture,
|
||||
} as any;
|
||||
|
||||
if (this.mode === this.MODE_EDIT) {
|
||||
|
||||
Reference in New Issue
Block a user