Skip to content

Commit

Permalink
Add display of extra info from submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ngm committed Nov 9, 2020
1 parent f7479c3 commit 316c666
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
'submission' => 'Gravity Form submission',
'submission_date' => 'Submission date',
'submitted_by_employee' => 'Submitted by employee?',
'submission_extra_info' => 'Anything else we should know about this business?',

'your_role_is' => 'Your role is',

Expand Down
7 changes: 7 additions & 0 deletions resources/views/admin/submissions/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
</div>
</div>

<div class="form-group row">
<label class="col-sm-2 col-form-label">@lang('admin.submission_extra_info')</label>
<div class="col-sm-10">
<textarea readonly class="form-control-plaintext" rows=4>{{ $submission->getExtraInfo() }}</textarea>
</div>
</div>

<p class="form-text text-muted">Note: links are not automatically clickable, in case malicious data has been submitted.</p>

</form>
Expand Down
10 changes: 8 additions & 2 deletions src/Domain/Models/Submission.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,19 @@ public function getReviewSource()
return $this->reviewSource;
}

public function getCreatedAt()
public function getExtraInfo()
{
return $this->createdAt;
return $this->extraInfo;
}

public function getSubmittedByEmployee()
{
return $this->submittedByEmployee;
}

public function getCreatedAt()
{
return $this->createdAt;
}

}

0 comments on commit 316c666

Please # to comment.