Node.js based forum software built for the modern web
Failed JS Attempt
Linda Badurina5ee098ab2bd4
diff --git a/src/posts/newuser.js b/src/posts/newuser.jsnew file mode 100644index 0000000000..9574a48c72--- /dev/null+++ b/src/posts/newuser.js@@ -0,0 +1,16 @@+'use strict';+++define('admin/settings/general', ['admin/settings'], function () {+ var Module = {};++ Module.init = function () {+ $('input[data-type="newUserRestrictions"]').attr('disabled', true);+ };++ return Module;+});++$('[data-field="toggleUserRestrictions"]').on('click', function() {+ // code to toggle disable attribute for inputs+});\ No newline at end of filediff --git a/src/views/admin/settings/post.tpl b/src/views/admin/settings/post.tplindex 61404e3efd..ca4650beed 100644--- a/src/views/admin/settings/post.tpl+++ b/src/views/admin/settings/post.tpl@@ -134,7 +134,7 @@<div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/post:restrictions-new]]</div><div class="col-sm-10 col-xs-12"><form>- <!-- <div class="form-group">+ <div class="form-group"><div class="checkbox"><label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"><input class="mdl-switch__input" type="checkbox" data-field="toggleUserRestrictions">@@ -144,11 +144,11 @@<p class="help-block">[[admin/settings/post:restrictions-new.post-queue-help]]</p>- </div> -->+ </div><div class="form-group"><div class="checkbox"><label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">- <input class="mdl-switch__input" type="checkbox" data-field="postQueue">+ <input class="mdl-switch__input" type="checkbox" data-field="postQueue" data-type="newUserRestrictions"><span class="mdl-switch__label"><strong>[[admin/settings/post:restrictions.post-queue]]</strong></span></label></div>@@ -164,13 +164,13 @@<div class="col-xs-6"><div class="form-group"><label for="newbiePostDelay">[[admin/settings/post:restrictions.seconds-between-new]]</label>- <input id="newbiePostDelay" type="text" class="form-control" value="120" data-field="newbiePostDelay">+ <input id="newbiePostDelay" type="text" class="form-control" value="120" data-field="newbiePostDelay" data-type="newUserRestrictions"></div></div><div class="col-xs-6"><div class="form-group"><label for="initialPostDelay">[[admin/settings/post:restrictions.seconds-defore-new]]</label>- <input id="initialPostDelay" type="text" class="form-control" value="10" data-field="initialPostDelay">+ <input id="initialPostDelay" type="text" class="form-control" value="10" data-field="initialPostDelay" data-type="newUserRestrictions"><!-- <label for="newbiePostDelayThreshold">[[admin/settings/post:restrictions.rep-threshold]]</label><input id="newbiePostDelayThreshold" type="text" class="form-control" value="3" data-field="newbiePostDelayThreshold"> --></div>@@ -178,7 +178,7 @@</div><div class="form-group"><label for="newbiePostDelayThreshold">[[admin/settings/post:restrictions.rep-threshold]]</label>- <input id="newbiePostDelayThreshold" type="text" class="form-control" value="3" data-field="newbiePostDelayThreshold">+ <input id="newbiePostDelayThreshold" type="text" class="form-control" value="3" data-field="newbiePostDelayThreshold" data-type="newUserRestrictions"><!-- <label for="initialPostDelay">[[admin/settings/post:restrictions.seconds-defore-new]]</label><input id="initialPostDelay" type="text" class="form-control" value="10" data-field="initialPostDelay"> --></div>