...
 
Commits (2)
......@@ -6,4 +6,5 @@ node_modules/
*.log
.vagrant/
Public/js/dist/*
!Public/js/dist/.gitkeep
\ No newline at end of file
!Public/js/dist/.gitkeep
v8-compile-cache-0/
......@@ -94,6 +94,7 @@ class GravityScoresAdmin extends AdminController
public function menuAddTest(array $config, array $environment): void
{
$this->setup(__FUNCTION__);
$this->putVariable('forms', $form = \GFAPI::get_forms());
$post_json = json_decode(file_get_contents('php://input'));
if (!empty($post_json)) {
$this->addTest($post_json);
......
......@@ -49,11 +49,11 @@ window.app = new Vue({
},
created: () => {
Axios
/*Axios
.get(api.forms)
.then(response => {
window.app.forms = response.data
})
})*/
jQuery('.wrap').css('display', 'block')
Vue.nextTick(() => {
......@@ -350,4 +350,4 @@ window.app = new Vue({
}
}
})
\ No newline at end of file
})
......@@ -5,8 +5,10 @@
<form class="wizard_step_1" v-if="wizard_step >= 1">
<h2 class="step-select-form__section-headline" >Select Form</h2>
<select v-bind:disabled="wizard_step != 1" class="step-select-form__select-form" title="Select a Form from Gravity Forms" @change="wizard_step_one_select_form" ref="input">
<option selected disabled value="" class="select-form__option--default">Please choose a Gravity Forms form</option>
<option v-for="form in forms" :value="form.id">{{ "{{ form.id }}. {{ form.title }}" }}</option>
<option selected disabled value="" class="select-form__option--default">Please choose a Gravity Forms form</option>
{% for form in forms %}
<option value="{{ form.id }}">{{ form.id }}. {{ form.title }}</option>
{% endfor %}
</select>
<button v-bind:disabled="wizard_step != 1 || form_data['formId'] === -1" type="button" class="step-select-form__btn-select-form wp-core-ui button" @click="wizard_step_one_complete">Select & Finish Step</button>
</form>
......