Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'disabled' option to 'form-position' setting #325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions admin/docs/en-us/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,11 @@ <h1 id="settings">
before the comments, setting this to <code>bottom</code> will cause
the form to appear after the comments but before the end links.
</p>
<p>
The form can also be set to <code>disabled</code> to hide it.
This does not disable comments or form submissions; it just hides
the form from users.
</p>
<p>
This setting is <code>top</code> by default.
</p>
Expand Down
3 changes: 2 additions & 1 deletion admin/settings/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ function ui_array (Setup $setup, Locale $locale)

'options' => array (
'top' => 'Top',
'bottom' => 'Bottom'
'bottom' => 'Bottom',
'disabled' => 'Disabled'
)
),

Expand Down
2 changes: 1 addition & 1 deletion backend/classes/formui.php
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ public function initialHTML ($hashover_wrapper = true)
$form_section->appendChild ($main_form);

// Check if form position setting set to 'top'
if ($this->setup->formPosition !== 'bottom') {
if ($this->setup->formPosition === 'top') {
// Add primary form wrapper to HashOver element
$hashover_element->appendChild ($form_section);
}
Expand Down