mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-15 09:34:13 +00:00
Fix form meta controls validation and translations
This commit is contained in:
parent
2d31165bbc
commit
1247f9c547
3 changed files with 23 additions and 8 deletions
web-frontend
|
@ -80,6 +80,7 @@
|
|||
"minValueField": "The field must be greater than or equal to {min}.",
|
||||
"maxValueField": "The field must be less than or equal to {max}.",
|
||||
"minMaxValueField": "The field value must be between {min} and {max}.",
|
||||
"invalidURL": "Please enter a valid URL.",
|
||||
"email": "The field must be an email."
|
||||
},
|
||||
"permission": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<FormGroup
|
||||
class="margin-bottom-3"
|
||||
small-label
|
||||
label="When the form is submitted"
|
||||
:label="$t('formViewMetaControls.whenSubmittedLabel')"
|
||||
required
|
||||
>
|
||||
<ul class="choice-items choice-items--inline">
|
||||
|
@ -27,7 +27,7 @@
|
|||
view.submit_action !== 'MESSAGE' &&
|
||||
$emit('updated-form', { submit_action: 'MESSAGE' })
|
||||
"
|
||||
><span>Show a message</span>
|
||||
><span>{{ $t('formViewMetaControls.showMessage') }}</span>
|
||||
<i
|
||||
v-if="view.submit_action === 'MESSAGE'"
|
||||
class="choice-items__icon-active iconoir-check-circle"
|
||||
|
@ -46,7 +46,7 @@
|
|||
view.submit_action !== 'REDIRECT' &&
|
||||
$emit('updated-form', { submit_action: 'REDIRECT' })
|
||||
"
|
||||
><span>Redirect to URL</span>
|
||||
><span>{{ $t('formViewMetaControls.urlRedirect') }}</span>
|
||||
<i
|
||||
v-if="view.submit_action === 'REDIRECT'"
|
||||
class="choice-items__icon-active iconoir-check-circle"
|
||||
|
@ -58,14 +58,14 @@
|
|||
|
||||
<FormGroup
|
||||
v-if="view.submit_action === 'MESSAGE'"
|
||||
label="The message"
|
||||
:label="$t('formViewMetaControls.theMessage')"
|
||||
small-label
|
||||
required
|
||||
>
|
||||
<FormTextarea
|
||||
v-model="submit_action_message"
|
||||
class="form-view__meta-message-textarea"
|
||||
placeholder="The message"
|
||||
:placeholder="$t('formViewMetaControls.theMessage')"
|
||||
:rows="3"
|
||||
:disabled="readOnly"
|
||||
@blur="
|
||||
|
@ -79,13 +79,19 @@
|
|||
<FormGroup
|
||||
v-if="view.submit_action === 'REDIRECT'"
|
||||
small-label
|
||||
label="The URL"
|
||||
:error="$v.submit_action_redirect_url.$error"
|
||||
:error-message="
|
||||
$v.submit_action_redirect_url.$error ? $t('error.invalidURL') : ''
|
||||
"
|
||||
:label="$t('formViewMetaControls.theURL')"
|
||||
:helper-text="$t('formViewMeta.includeRowId')"
|
||||
required
|
||||
>
|
||||
<FormInput
|
||||
v-model="submit_action_redirect_url"
|
||||
placeholder="The URL"
|
||||
:placeholder="$t('formViewMetaControls.theURL')"
|
||||
:disabled="readOnly"
|
||||
:error="$v.submit_action_redirect_url.$error"
|
||||
@blur="
|
||||
;[
|
||||
$v.submit_action_redirect_url.$touch(),
|
||||
|
@ -95,7 +101,8 @@
|
|||
}),
|
||||
]
|
||||
"
|
||||
></FormInput>
|
||||
>
|
||||
</FormInput>
|
||||
</FormGroup>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -633,6 +633,13 @@
|
|||
"formViewMeta": {
|
||||
"includeRowId": "Use {row_id} to include the newly created row id in the URL."
|
||||
},
|
||||
"formViewMetaControls": {
|
||||
"whenSubmittedLabel": "When the form is submitted",
|
||||
"showMessage": "Show a message",
|
||||
"urlRedirect": "Redirect to URL",
|
||||
"theMessage": "The message",
|
||||
"theURL": "The URL"
|
||||
},
|
||||
"previewAny": {
|
||||
"externalWarning": "Opening your file via an external service exposes your file to their servers."
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue