Node.js based forum software built for the modern web
template in composer #2569
Julian Lam7dc309fc1608
diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.jsonindex 88b1662e3b..5488475e10 100644--- a/public/language/en_GB/topic.json+++ b/public/language/en_GB/topic.json@@ -90,6 +90,7 @@"fork_success": "Successfully forked topic! Click here to go to the forked topic.","composer.title_placeholder": "Enter your topic title here...",+ "composer.handle_placeholder": "Enter your guest handle","composer.discard": "Discard","composer.submit": "Submit","composer.replying_to": "Replying to %1",diff --git a/public/src/modules/composer.js b/public/src/modules/composer.jsindex e9ae8e8b5d..1a62a5e6e6 100644--- a/public/src/modules/composer.js+++ b/public/src/modules/composer.js@@ -224,7 +224,8 @@ define('composer', [var data = {allowTopicsThumbnail: allowTopicsThumbnail,showTags: isTopic || isMain,- isTopic: isTopic+ isTopic: isTopic,+ allowGuestHandles: config.allowGuestHandles};parseAndTranslate(template, data, function(composerTemplate) {diff --git a/src/controllers/api.js b/src/controllers/api.jsindex 2648f944b4..52bfd6233f 100644--- a/src/controllers/api.js+++ b/src/controllers/api.js@@ -30,6 +30,7 @@ apiController.getConfig = function(req, res, next) {config.maximumSignatureLength = meta.config.maximumSignatureLength;config.useOutgoingLinksPage = parseInt(meta.config.useOutgoingLinksPage, 10) === 1;config.allowGuestSearching = parseInt(meta.config.allowGuestSearching, 10) === 1;+ config.allowGuestHandles = parseInt(meta.config.allowGuestHandles, 10) === 1;config.allowFileUploads = parseInt(meta.config.allowFileUploads, 10) === 1;config.allowTopicsThumbnail = parseInt(meta.config.allowTopicsThumbnail, 10) === 1;config.allowAccountDelete = parseInt(meta.config.allowAccountDelete, 10) === 1;diff --git a/src/views/admin/settings/guest.tpl b/src/views/admin/settings/guest.tplnew file mode 100644index 0000000000..a212547164--- /dev/null+++ b/src/views/admin/settings/guest.tpl@@ -0,0 +1,25 @@+<!-- IMPORT admin/settings/header.tpl -->++<div class="panel panel-default">+ <div class="panel-heading">Guests</div>+ <div class="panel-body">+ <p class="alert alert-info">+ These options affect guest users as a whole. Control over which categories a guest can see or post to is handled in+ the categories themselves+ </p>++ <form role="form">+ <div class="checkbox">+ <label>+ <input type="checkbox" data-field="allowGuestHandles"> <strong>Allow guest handles</strong>+ <p class="help-block">+ This option exposes a new field that allows guests to pick a name to associate with each post they make. If disabled,+ the will simply be called "Guest" (or the equivalent in the forum's selected language)+ </p>+ </label>+ </div>+ </form>+ </div>+</div>++<!-- IMPORT admin/settings/footer.tpl -->\ No newline at end of file