Sourcecode in Story/macros.js:
1: function addtofront_macro(param) {
2: if (param.as == "editor") {
3: // if we're in a submit, use the submitted form value.
4: // otherwise, render the object's value.
5: if (req.data.publish || req.data.save) {
6: if (!req.data.addToFront)
7: delete param.checked;
8: } else if (this.online != null && this.online < 2) {
9: delete param.checked;
10: }
11: param.name = "addToFront";
12: param.value = 1;
13: delete param.as;
14: Html.checkBox(param);
15: }
16: return;
17: }
|