Skip to content

Commit

Permalink
Better admin form layout
Browse files Browse the repository at this point in the history
  • Loading branch information
svivian committed Dec 13, 2018
1 parent efb58af commit c143856
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions qa-tagging-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,30 +128,34 @@ public function admin_form(&$qa_content)

return [
'ok' => $savedMsg,
'style' => 'wide',

'fields' => [
[
'style' => 'tall',
'label' => qa_lang_html('taggingtools/admin_synonyms'),
'tags' => 'name="tagging_tools_synonyms" id="tagging_tools_synonyms"',
'value' => qa_opt('tagging_tools_synonyms'),
'type' => 'textarea',
'rows' => 20,
'note' => qa_lang_html('taggingtools/admin_synonyms_note'),
'note' => preg_replace('/`(.+?)`/', '<code>$1</code>', qa_lang_html('taggingtools/admin_synonyms_note')),
],
[
'style' => 'tall',
'label' => qa_lang_html('taggingtools/admin_convert'),
'tags' => 'name="tagging_tools_convert" id="tagging_tools_convert"',
'value' => '',
'type' => 'checkbox',
],
['type' => 'blank'],
[
'label' => qa_lang_html('taggingtools/admin_prevent'),
'tags' => 'name="tagging_tools_prevent" id="tagging_tools_prevent"',
'value' => qa_opt('tagging_tools_prevent'),
'type' => 'checkbox',
],
[
'label' => qa_lang_html('taggingtools/admin_minpoints'),
'label' => qa_lang_html('taggingtools/admin_min_points'),
'id' => 'tagging_tools_rep',
'value' => qa_opt('tagging_tools_rep'),
'tags' => 'name="tagging_tools_rep"',
Expand All @@ -164,6 +168,7 @@ public function admin_form(&$qa_content)
'type' => 'checkbox',
],
[
'style' => 'tall',
'type' => 'custom',
'html' => '<script>' . $js . '</script>',
],
Expand Down
4 changes: 2 additions & 2 deletions qa-tt-lang-default.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
return [

'admin_convert' => 'Also convert existing tags using above rules',
'admin_minpoints' => 'Minimum reputation to create new tags',
'admin_min_points' => 'Minimum reputation to create new tags',
'admin_prevent' => 'Prevent new users from creating new tags',
'admin_redirect' => 'Add 301 (permanent) redirects for tag synonyms',
'admin_synonyms' => 'Tag Synonyms',
'admin_synonyms_note' => 'Put each pair of synonyms on a new line. <code>q2a,question2answer</code> means that a tag of <code>q2a</code> will be replaced by <code>question2answer</code>, while <code>help</code> on its own means that tag will be removed.',
'admin_synonyms_note' => 'Put each pair of synonyms on a new line. `q2a,question2answer` means that a tag of `q2a` will be replaced by `question2answer`, while `help` on its own means that tag will be removed.',

'recalc_done' => 'All tags edited!',
'recalc_error' => 'There was an error editing the tags.',
Expand Down

0 comments on commit c143856

Please sign in to comment.