Skip to content

Commit

Permalink
fix(form): purge message if answers exist
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jan 7, 2020
1 parent bb1f2e4 commit fa0c1dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,22 @@ public function showForm($ID, $options = []) {
echo '</td>';
echo '</tr>';

echo '<tr>';
echo '<td>'.__('Default form in service catalog', 'formcreator').'</td>';
echo '<td>';
Dropdown::showYesNo("is_default", $this->fields["is_default"]);
echo '</td>';
echo '</tr>';

if (!$this->canPurgeItem()) {
echo '<tr>';
echo '<td colspan="4">'
. '<i class="fas fa-exclamation-triangle"></i>&nbsp;'
. __('To delete this form you must delete all its answers first.', 'formcreator')
. '</td>';
echo '</tr>';
}

$this->showFormButtons($options);
}

Expand Down

0 comments on commit fa0c1dd

Please sign in to comment.