/** * Create configuration dialog from .json file */ function step4() { $branch = $_GET['branch']; $installDetails = json_decode(file_get_contents('install.json')); // Create dialog echo '<form method="post" action="?step=5">'; foreach ($installDetails->configuration as $entry) { $fieldName = $entry[0]; $fieldDetails = $entry[1]; createField($fieldName, $fieldDetails); } echo '<input type="hidden" name="branch" value="' . $branch . '" />'; echo '<input type="submit" class="btn btn-default" value="Install" />'; echo '</form>'; }
public function addSurvey($username, $token, $survey_id, $edit_btn, $field, $field_type, $firstname, $lastname, $email, $address, $address2, $city, $state, $country, $zip, $mc1, $mc2, $mc3, $log_btn) { // Add New Survey Details $I = $this; $I->amGoingTo('ADD NEW SURVEY'); /*$I->see('Survey'); $I->click('Survey'); //$I->fillField('#surveys-form input[name=username]', $username); $I->fillField(['name' => 'username'], $username); //$I->fillField('#surveys-form input[name=token]', $token); $I->fillField(['name' => 'token'], $token); $I->click('#edit-submit-two'); // Clicking on Save/Update Credentials*/ // Adding New Survey $I->see('+ Add a New Survey'); $I->click('+ Add a New Survey'); $I->fillField('#popup-survey-form inpu[name=sid]', $survey_id); $I->fillField(['name' => 'sid'], $survey_id); $I->dontSeeCheckboxIsChecked(''); $I->checkOption('new_survey_id_checkbox'); $I->click('Add Survey'); $I->dontsee('Enter Survey ID field is required.'); $I->click($edit_btn); // Edit option for Selected Survey Id //$I->click($remove_btn); // Remove option for Selected Survey Id $I->selectOption('#edit-td40', $firstname); if ($firstname == 'Create Field') { Surveydetails::createField($field, $field_type); $I->seeInField($field, '#edit-td40'); } //$I->seeInField($lastname, '#edit-td41'); $I->selectOption('#edit-td41', $lastname); //wait(1); if ($lastname == 'Create Field') { Surveydetails::createField($field1, $field_type1); $I->seeInField($field1, '#edit-td41'); } //$I->seeInField($email, '#edit-td42'); $I->selectOption('#edit-td42', $email); if ($email == 'Create Field') { Surveydetails::createField($field2, $field_type2); $I->seeInField($field2, '#edit-td42'); } $I->selectOption('#edit-td43', $address); if ($address == 'Create Field') { Surveydetails . createField($field3, $field_type3); $I->seeInField($field3, '#edit-td43'); } $I->selectOption('#edit-td44', $address2); if ($address2 == 'Create Field') { Surveydetails . createField($field4, $field_type4); $I->seeInField($field4, '#edit-td44'); } $I->selectOption('#edit-td45', $city); if ($city == 'Create Field') { Surveydetails . createField($field5, $field_type6); $I->seeInField($field6, '#edit-td45'); } $I->selectOption('#edit-td46', $state); if ($state == 'Create Field') { Surveydetails . createField($field6, $field_type6); $I->seeInField($field6, '#edit-td46'); } $I->selectOption('#edit-td47', $country); if ($country == 'Create Field') { Surveydetails . createField($field7, $field_type7); $I->seeInField($field7, '#edit-td47'); } $I->selectOption('#edit-td48', $zip); if ($zip == 'Create Field') { Surveydetails . createField($field8, $field_type8); $I->seeInField($field8, '#edit-td48'); } $I->selectOption('#edit-td49', $mc1); if ($mc1 == 'Create Field') { Surveydetails . createField($field9, $field_type9); $I->seeInField($field9, '#edit-td49'); } $I->selectOption('#edit-td410', $mc2); if ($mc2 == 'Create Field') { Surveydetails . createField($field10, $field_type10); $I->seeInField($field10, '#edit-td410'); } $I->selectOption('#edit-td411', $mc3); if ($mc3 == 'Create Field') { Surveydetails . createField($field11, $field_type11); $I->seeInField($field11, '#edit-td411'); } $man_field = $I->grabTextFrom($name); $man_field2 = $I->grabTextFrom($mail); if ($man_field == 'name' && $man_field2 == 'mail') { $I->click('Test Configuration'); $I->see('Successfully Configured!', '.alert-box.success'); } else { if ($man_field != 'name' && $man_field2 != 'mail') { $I->see(''); } } $I->click('Save Configuration'); $I->click('#sort-table'); $I->click('Save/Update Credentials'); $I->see('Qualtrics Survey Details Successfully Updated In Drupal.'); $I->click($log_btn); // View Log option for Selected Survey Id $I->expect('SURVEY CREATED SUCCESSFULLY'); }
</tr> <tr> <th> <img src="images/ico_required.gif" alt="必須" class="icnRequired" /> <label for="fld-body">お問い合わせ内容</label> </th> <td> <?php if (!empty($error_html['body'])) { echo $error_html['body']; } ?> <?php $arg = array('type' => 'textarea', 'name' => 'body', 'id' => 'fld-body', 'check' => '-1000', 'required' => 1, 'option1' => 80, 'option2' => 20); createField($arg); ?> </td> </tr> </table> <div id="submit"> <input type="image" src="/carsharing/lp/contact/images/btn_confirm.gif" alt="入力内容を確認する" class="btnConfirm" /> <!-- / id submit --></div> <input type="hidden" name="mode" value="check" /> <input type="hidden" name="id" value="<?php echo $INPUT_id; ?> " />