/
admin-edit.template
190 lines (175 loc) · 8.7 KB
/
admin-edit.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<h2><%text(_EDIT_ITEM)%></h2>
<%init%>
<script type="text/javascript" src="javascript/numbercheck.js"></script>
<script type="text/javascript" src="javascript/edit_date.js"></script>
<%ifautosave()%><script type="text/javascript" src="javascript/xmlhttprequest.js"></script><%endif%>
<form id="editform" method="post" action="index.php">
<div>
<input type="hidden" name="action" value="itemupdate" />
<input name="itemid" value="<%contents(itemid)%>" type="hidden" />
<input type="hidden" name="draftid" value="0" />
<%ticket%>
<table><tr>
<th colspan="2"><%text(_EDIT_ITEM)%></th>
</tr>
<tr>
<td><%text(_EDIT_ORIG_AUTHOR)%></td>
<td><%contents(author)%></td>
</tr><tr>
<td><%text(_ADD_TITLE)%></td>
<td><input
<%jsinput(title)%>
tabindex="10"
size="50"
maxlength="160"
value="<%contents(title)%>" />
</td>
</tr><tr>
<td>
<%text(_ADD_BODY)%>
</td>
<td>
<%jsbuttonbar(media+preview)%>
<textarea
<%jsinput(body)%>
tabindex="20"
cols="60"
rows="15"><%contents(body)%></textarea>
</td>
</tr><tr id="edit" style="display:none;">
<td><%text(_ADD_PREVIEW)%></td>
<td><b><span id="prevtitle"> </span></b><br />
<span id="prevbody"> </span><br />
<span id="prevmore"> </span><br />
</td>
</tr>
<tr>
<td><%text(_ADD_CATEGORY)%></td>
<td><%categories(40)%></td>
</tr>
<tr>
<td><%text(_EDIT_SUBMIT)%></td>
<td>
<input type="submit" tabindex="60" value="<%text(_EDIT_SUBMIT)%>" onclick="return checkSubmit();" />
<%ifitemproperty(draft)%>
<br /><br />
<input name="actiontype" value="addnow" type="radio" id="act_now" /><label for="act_now" tabindex="61"><%text(_ADD_ADDNOW)%></label>
<br />
<input name="actiontype" value="addfuture" type="radio" id="act_future" tabindex="61" /><label for="act_future"><%text(_ADD_ADDLATER)%></label> <%helplink(future)%>
<div class="indent">
<%text(_ADD_PLACE_ON)%>
<input id="inputyear" name="year" tabindex="71" size="4" value="<%currenttime(year)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>
<input id="inputmonth" name="month" tabindex="72" size="2" value="<%currenttime(mon)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>
<input id="inputday" name="day" tabindex="73" size="2" value="<%currenttime(mday)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_DAY)%>
<input id="inputhour" name="hour" tabindex="74" size="2" value="<%currenttime(hours)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>
<input id="inputminutes" name="minutes" tabindex="75" size="2" value="<%currenttime(minutes)%>" onchange="document.forms[0].act_future.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>
<br /><%text(_ITEM_ADDEDITTEMPLATE_FORMAT)%>(yyyy)<%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>(mm)<%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>(dd)<%text(_ITEM_ADDEDITTEMPLATE_DAY)%> (hh)<%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>(mm)<%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>
<input tabindex="76" type="button" value="<%text(_ADD_DATEINPUTNOW)%>" onclick = 'document.forms[0].act_future.checked=true; return edit_form_change_date_now();' />
<input tabindex="77" type="button" value="<%text(_ADD_DATEINPUTRESET)%>" onclick = 'return date_currenttime_reset();' />
<%ifblogsetting(ballowpast,0)%>
<br />
<%text(_ADD_NOPASTDATES)%>
<%endif%>
</div>
<input name="actiontype" value="adddraft" type="radio" checked='checked' id="act_draft" tabindex="61" /><label for="act_draft"><%text(_EDIT_BACKTODRAFTS)%></label> <%helplink(draft)%>
<br />
<input name="actiontype" value="delete" type="radio" id="act_delete" tabindex="61" /><label for="act_delete"><%text(_BMLET_DELETE)%></label>
<%endif%>
<%ifitemproperty(draft,0)%>
<br /><br />
<input name="actiontype" value="edit" type="radio" checked="checked" id="act_edit" tabindex="61" /><label for="act_edit"><%text(_BMLET_EDIT)%></label>
<%ifblogsetting(ballowpast)%>
<br />
<input name="actiontype" value="changedate" type="radio" id="act_changedate" tabindex="70" /><label for="act_changedate"><%text(_ADD_CHANGEDATE)%></label> <%helplink(changedate)%>
<div class="indent">
<input id="inputyear" name="year" tabindex="71" size="4" value="<%itemtime(year)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>
<input id="inputmonth" name="month" tabindex="72" size="2" value="<%itemtime(mon)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>
<input id="inputday" name="day" tabindex="73" size="2" value="<%itemtime(mday)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_DAY)%>
<input id="inputhour" name="hour" tabindex="74" size="2" value="<%itemtime(hours)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>
<input id="inputminutes" name="minutes" tabindex="75" size="2" value="<%itemtime(minutes)%>" onchange="document.forms[0].act_changedate.checked=true;" /><%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>
<br /><%text(_ITEM_ADDEDITTEMPLATE_FORMAT)%>(yyyy)<%text(_ITEM_ADDEDITTEMPLATE_YEAR)%>(mm)<%text(_ITEM_ADDEDITTEMPLATE_MONTH)%>(dd)<%text(_ITEM_ADDEDITTEMPLATE_DAY)%> (hh)<%text(_ITEM_ADDEDITTEMPLATE_HOUR)%>(mm)<%text(_ITEM_ADDEDITTEMPLATE_MINUTE)%>
<input tabindex="76" type="button" value="<%text(_ADD_DATEINPUTNOW)%>" onclick = 'document.forms[0].act_changedate.checked=true; return edit_form_change_date_now();' />
<input tabindex="77" type="button" value="<%text(_ADD_DATEINPUTRESET)%>" onclick = 'return date_itemtime_reset();' />
</div>
<%endif%>
<input name="actiontype" value="backtodrafts" type="radio" id="act_backtodrafts" tabindex="71" /><label for="act_backtodrafts"><%text(_BMLET_BACKTODRAFTS)%></label> <%helplink(draft)%>
<br />
<input name="actiontype" value="delete" type="radio" id="act_delete" tabindex="61" /><label for="act_delete"><%text(_BMLET_DELETE)%></label>
<%endif%>
</td>
</tr>
<%ifautosave()%><tr>
<td><%text(_AUTOSAVEDRAFT)%></td>
<td><span id="info"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%></span></td>
</tr><%endif%>
<%ifblogsetting(bcomments)%>
<tr>
<td>
<%text(_ADD_DISABLE_COMMENTS)%>
</td>
<td>
<input type="radio" name="closed" value="1" <%checkedonval(1,closed)%> tabindex="30" id="closed_yes" /><label for="closed_yes"><%text(_YES)%></label>
<input type="radio" name="closed" value="0" <%checkedonval(0,closed)%> tabindex="30" id="closed_no" /><label for="closed_no"><%text(_NO)%></label> <small><%text(_EDIT_COMMENTSNOTE)%></small>
</td>
</tr>
<%endif%>
<tr>
<td><%text(_ADD_PLUGIN_EXTRAS)%></td>
<td>
<%pluginextras%>
</td>
</tr>
<%itemoptions%>
<tr>
<th colspan="2"><%text(_ADD_MORE)%></th>
</tr>
<tr>
<td><%text(_ADD_MORE)%>
<br /><%helplink(extended)%>
</td>
<td>
<%jsbuttonbar(media+preview)%>
<textarea
<%jsinput(more)%>
tabindex="90"
cols="60"
rows="15"><%contents(more)%></textarea>
</td>
</tr><tr>
<td><%text(_SUBMIT)%></td>
<td>
<input tabindex="60" type="submit" value="<%text(_EDIT_SUBMIT)%>"
onclick="return checkSubmit();" />
<%ifautosave()%><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>"
onclick="autoSaveDraft();" /><%endif%>
</td>
</tr></table>
</div>
</form>
<%ifautosave()%><script type="text/javascript">
var xmlhttprequest = new Array();
xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
var seconds = now(); // Last AutoDraft time
var checks = 0; // Number of checks since last AutoDraft
var addform = document.getElementById('editform'); // The form id
var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
var goalurl = '../action.php'; // The PHP file where the content must be posted to
var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
var formtype = 'edit'; // Add or edit form
</script><%endif%>
<script type="text/javascript">
// datetime reset functions
function date_currenttime_reset( )
{
edit_form_change_date_ByValue( new Array(
"<%currenttime(year)%>", "<%currenttime(mon)%>", "<%currenttime(mday)%>",
"<%currenttime(hours)%>", "<%currenttime(minutes)%>" ) );
}
function date_itemtime_reset( )
{
edit_form_change_date_ByValue( new Array(
"<%itemtime(year)%>", "<%itemtime(mon)%>", "<%itemtime(mday)%>",
"<%itemtime(hours)%>", "<%itemtime(minutes)%>" ) );
}
</script>