Fixes E ESSE ENTER bug (aka the submit button that is activated by enter in Item Edition Page).

This commit is contained in:
mateuswetah 2018-05-11 17:07:44 -03:00
parent b6fbde7282
commit d9462a38d8
8 changed files with 34 additions and 6 deletions

View File

@ -172,7 +172,8 @@
label: this.$i18n.get('trash')
}],
editFormErrors: {},
formErrorMessage: ''
formErrorMessage: '',
// baseUrl: tainacan_plugin.base_url,
}
},
components: {

View File

@ -193,6 +193,7 @@
<div class="field is-grouped form-submit">
<div class="control">
<button
type="button"
class="button is-outlined"
@click.prevent="cancelEdition()"
slot="trigger">{{ $i18n.get('cancel') }}

View File

@ -87,6 +87,7 @@
<div class="field is-grouped form-submit">
<div class="control">
<button
type="button"
class="button is-outlined"
@click.prevent="cancelEdition()"
slot="trigger">{{ $i18n.get('cancel') }}</button>

View File

@ -38,6 +38,7 @@
<div class="field is-grouped">
<div class="control">
<button
type="button"
id="button-submit-item-creation"
@click.prevent="onSubmit"
class="button is-success">
@ -63,12 +64,14 @@
<div v-if="form.document_type == 'attachment'">
<div v-html="item.document_as_html" />
<button
type="button"
class="button is-primary"
size="is-small"
@click.prevent="setFileDocument($event)">
{{ $i18n.get('edit') }}
</button>
<button
type="button"
class="button is-primary"
size="is-small"
@click.prevent="removeDocument()">
@ -78,12 +81,14 @@
<div v-if="form.document_type == 'text'">
<div v-html="item.document_as_html" />
<button
type="button"
class="button is-primary"
size="is-small"
@click.prevent="setTextDocument()">
{{ $i18n.get('edit') }}
</button>
<button
type="button"
class="button is-primary"
size="is-small"
@click.prevent="removeDocument()">
@ -93,12 +98,14 @@
<div v-if="form.document_type == 'url'">
<div v-html="item.document_as_html" />
<button
type="button"
class="button is-primary"
size="is-small"
@click.prevent="setURLDocument()">
{{ $i18n.get('edit') }}
</button>
<button
type="button"
class="button is-primary"
size="is-small"
@click.prevent="removeDocument()">
@ -108,19 +115,25 @@
</div>
<ul v-else>
<li>
<button @click.prevent="setFileDocument($event)">
<button
type="button"
@click.prevent="setFileDocument($event)">
<b-icon icon="upload"/>
</button>
<p>{{ $i18n.get('label_file') }}</p>
</li>
<li>
<button @click.prevent="setTextDocument()">
<button
type="button"
@click.prevent="setTextDocument()">
<b-icon icon="format-text"/>
</button>
<p>{{ $i18n.get('label_text') }}</p>
</li>
<li>
<button @click.prevent="setURLDocument()">
<button
type="button"
@click.prevent="setURLDocument()">
<b-icon icon="code-tags"/>
</button>
<p>{{ $i18n.get('label_url') }}</p>
@ -242,6 +255,7 @@
</div>
<div class="section-box">
<button
type="button"
class="button is-secondary"
@click.prevent="attachmentMediaFrame.openFrame($event)">
Attatchments (tests)

View File

@ -86,6 +86,7 @@
<div class="field is-grouped form-submit">
<div class="control">
<button
type="button"
class="button is-outlined"
@click.prevent="cancelEdition()"
slot="trigger">

View File

@ -37,7 +37,14 @@
</span>
<span class="controls" >
<!--
<button
class="button is-success is-small"
type="button"
:href="categoryPath + '/' + term.slug">
{{ $i18n.get('label_view_term') }}
</button>
-->
<button
class="button is-secondary is-small"
type="button"
@ -87,7 +94,8 @@ export default {
}
},
props: {
categoryId: String
categoryId: String,
//categoryPath: ''
},
computed: {
termsList() {

View File

@ -85,6 +85,7 @@
:pref-table-fields="prefTableFields"
:is-on-theme="isOnTheme"/>
</div>
<div
:items="items"
id="theme-items-list" />

View File

@ -168,6 +168,7 @@ return [
'label_select_file' => __( 'Select File', 'tainacan' ),
'label_expand_all' => __( 'Expand all', 'tainacan' ),
'label_collapse_all' => __( 'Collapse all', 'tainacan' ),
'label_view_term' => __( 'View Term', 'tainacan' ),
// Instructions. More complex sentences to guide user and placeholders
'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),