summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstocks.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/stocks.py b/stocks.py
index 53b92e4..21c2eea 100755
--- a/stocks.py
+++ b/stocks.py
@@ -149,7 +149,7 @@ class AppCGI:
self.stocks.load (DEFAULT_DATABASE)
# Make operations.
try:
- if self.mode == 'command' and self.action == 'update':
+ if self.mode == 'update' and self.action == 'update':
for code, qty in self.iter_update (form):
if qty:
item = self.stocks.items[code]
@@ -260,9 +260,9 @@ $stylesheet
#end if
#end def
-#def command_mode($line, $i)
+#def update_mode($line, $i)
#filter WebSafe
- #if $mode == 'command'
+ #if $mode == 'update'
<td class="action">
<input type="hidden" name="code_$line" value="$i.code" />
#if $place in $i.qty then $i.qty[$place] else 0 #
@@ -296,8 +296,8 @@ $stylesheet
#if not $mode
<form><p><input type="submit" value="Refresh" /></p></form>
<form><p>
- Command mode
- <input type="hidden" name="mode" value="command" />
+ Update mode
+ <input type="hidden" name="mode" value="update" />
<input type="text" name="place" />
<input type="submit" value="OK" />
</p></form>
@@ -337,7 +337,7 @@ $stylesheet
<td>$i.desc</td>
<td colspan="2" class="qty">$i.qty.main</td>
#filter None
- $command_mode($line, $i)
+ $update_mode($line, $i)
#end filter
</tr>
#for $iplace, $qty in $i.qty.itersorted