Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Model/Registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,20 @@ public function afterFind($results, $primary = false) {
return $results;
}

/**
* afterFrameSave
*
* @param array $frame Frame data
* @return void
*/
public function afterFrameSave($frame) {
// フレームに紐づく登録フォームがあるのにdefault_actionが設定されてなかったら設定する
if ($frame['Frame']['block_id'] && empty($frame['Frame']['default_action'])) {
$frame['Frame']['default_action'] = 'registration_answers/view';
$this->Frame->save($frame, false);
}
}

/**
* ブロック作成
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,11 @@ public function dataProviderEditGetByEditable() {
'assert' => array('method' => 'assertInput', 'type' => 'input', 'name' => 'data[RegistrationPage][{{pageIndex}}][RegistrationQuestion][{{qIndex}}][question_value]', 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'input', 'name' => 'data[RegistrationPage][{{pageIndex}}][RegistrationQuestion][{{qIndex}}][question_type]', 'value' => null),
'assert' => array('method' => 'assertInput', 'type' => 'select', 'name' => 'data[RegistrationPage][{{pageIndex}}][RegistrationQuestion][{{qIndex}}][question_type]', 'value' => null),
)));
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'textarea', 'name' => 'data[RegistrationPage][{{pageIndex}}][RegistrationQuestion][{{qIndex}}][description]', 'value' => null),
)));
//10
array_push($results, Hash::merge($results[$base], array(
'assert' => array('method' => 'assertInput', 'type' => 'input', 'name' => 'data[RegistrationPage][{{pageIndex}}][RegistrationQuestion][{{qIndex}}][is_choice_random]', 'value' => null),
)));
Expand Down