43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
use Illuminate\Http\Request;
|
|
use App\Http\Requests\LambdaRequest;
|
|
use DB;
|
|
|
|
use League\Csv\Reader;
|
|
use Auth;
|
|
|
|
class FormdataController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
$this->_service = 'form';
|
|
$this->_module = 'formentity';
|
|
$this->_viewname = 'formdata';
|
|
$this->_title = 'Form Data';
|
|
$this->_base_url = '/formdata';
|
|
}
|
|
|
|
protected function get_list_fields(){
|
|
return [
|
|
'actions' => ['title' => 'Actions', 'buttons' => ['submission' => ['icon' => 'form-select', 'querystring' => 'id={ID}'] ] ],
|
|
'title' => ['title' => 'Title', 'type' => 'text'],
|
|
'workflow' => ['title' => 'Workflow', 'type' => 'text'],
|
|
'status' => ['title' => 'Status', 'type' => 'select'],
|
|
|
|
];
|
|
}
|
|
|
|
public function submission(Request $request) {
|
|
$entity_id = $request->input('id', 0);
|
|
if($entity_id === 0) {
|
|
return redirect('/formdatas')->withError('Form not found!');
|
|
} else {
|
|
$request->session()->put('entity_id', $entity_id);
|
|
return redirect('/formsubmissions');
|
|
}
|
|
}
|
|
}
|