From 39dd23b0f1c2e782984072710191e69621ddd98d Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 26 Mar 2018 13:12:22 -0300 Subject: [PATCH 1/4] Begins TermsEditionPage. --- cypress/fixtures/example.json | 5 + .../edition/category-edition-form.vue | 108 ++++++++- .../edition/collection-edition-form.vue | 5 +- .../components/edition/term-edition-form.vue | 219 ++++++++++++++++++ src/admin/tainacan-admin-i18n.php | 2 + 5 files changed, 324 insertions(+), 15 deletions(-) create mode 100644 cypress/fixtures/example.json create mode 100644 src/admin/components/edition/term-edition-form.vue diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 000000000..da18d9352 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} \ No newline at end of file diff --git a/src/admin/components/edition/category-edition-form.vue b/src/admin/components/edition/category-edition-form.vue index 6d7422845..31ddf74a5 100644 --- a/src/admin/components/edition/category-edition-form.vue +++ b/src/admin/components/edition/category-edition-form.vue @@ -98,6 +98,49 @@ + + + + +
+ + + {{ term.name }} + + + + + + + + + + + +
+ +
+ +
- + - -
+
- - {{ term.name }} + class="term-name" + :class="{'is-danger': formWithErrors == term.term_id }"> + {{ term.name }} + + + + {{ $i18n.get('info_not_saved') }} + + v-if="term.term_id == undefined"/> + v-if="term.term_id !== undefined || term.term_id !== 'new'"> +
+ + +
@@ -171,6 +195,7 @@ diff --git a/src/admin/components/edition/term-edition-form.vue b/src/admin/components/edition/term-edition-form.vue index ad775906f..eae0023ab 100644 --- a/src/admin/components/edition/term-edition-form.vue +++ b/src/admin/components/edition/term-edition-form.vue @@ -39,38 +39,6 @@ v-model="editForm.description" @focus="clearErrors('description')" /> - - -
-
+