Failed JS Attempt

(For Andrew to see)
v1.18.x
Linda Badurina 7 years ago committed by Julian Lam
parent 8b354a26e0
commit 5ee098ab2b

@ -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
});

@ -134,7 +134,7 @@
<div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/post:restrictions-new]]</div> <div class="col-sm-2 col-xs-12 settings-header">[[admin/settings/post:restrictions-new]]</div>
<div class="col-sm-10 col-xs-12"> <div class="col-sm-10 col-xs-12">
<form> <form>
<!-- <div class="form-group"> <div class="form-group">
<div class="checkbox"> <div class="checkbox">
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"> <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input class="mdl-switch__input" type="checkbox" data-field="toggleUserRestrictions"> <input class="mdl-switch__input" type="checkbox" data-field="toggleUserRestrictions">
@ -144,11 +144,11 @@
<p class="help-block"> <p class="help-block">
[[admin/settings/post:restrictions-new.post-queue-help]] [[admin/settings/post:restrictions-new.post-queue-help]]
</p> </p>
</div> --> </div>
<div class="form-group"> <div class="form-group">
<div class="checkbox"> <div class="checkbox">
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"> <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> <span class="mdl-switch__label"><strong>[[admin/settings/post:restrictions.post-queue]]</strong></span>
</label> </label>
</div> </div>
@ -164,13 +164,13 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label for="newbiePostDelay">[[admin/settings/post:restrictions.seconds-between-new]]</label> <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> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<label for="initialPostDelay">[[admin/settings/post:restrictions.seconds-defore-new]]</label> <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> <!-- <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"> -->
</div> </div>
@ -178,7 +178,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="newbiePostDelayThreshold">[[admin/settings/post:restrictions.rep-threshold]]</label> <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> <!-- <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"> -->
</div> </div>

Loading…
Cancel
Save