add some api method
This commit is contained in:
@ -144,8 +144,11 @@ class DocumentController extends Controller
|
||||
|
||||
public function actionCreateDocument($id)
|
||||
{
|
||||
$documentService = new DocumentService($id);
|
||||
$documentService->setFields();
|
||||
$documentService->downloadDocument();
|
||||
if(!empty($this->findModel($id)->template->template_file_name)){
|
||||
$documentService = new DocumentService($id);
|
||||
$documentService->setFields();
|
||||
$documentService->downloadDocument();
|
||||
}
|
||||
return $this->redirect(['view', 'id' => $id]);
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,10 @@ class DocumentFieldValueController extends Controller
|
||||
$documentFieldValues = [];
|
||||
|
||||
if (empty($fieldsIdTitleList)) {
|
||||
$documentFieldValues = [new DocumentFieldValue()];
|
||||
return $this->redirect([
|
||||
'document/view',
|
||||
'id' => $document_id,
|
||||
]);
|
||||
}
|
||||
else {
|
||||
foreach ($fieldsIdTitleList as $fieldsIdTitle){
|
||||
|
Reference in New Issue
Block a user