-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit.tpl.php
70 lines (66 loc) · 2.17 KB
/
submit.tpl.php
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
<div class="maincontent generalbox">
<h1><?php echo get_string('submit', 'programming'); helpbutton('submit', 'submit', 'programming'); ?></h1>
<?php if ($allowpost): ?>
<?php if ($haspassed): ?>
<div id="submitagainconfirm">
<p><?php echo get_string('youhavepassed', 'programming'); ?></p>
<input type="button" id="submitagain" name="submitagain" value="<?php echo get_string('submitagain', 'programming'); ?>" />
</div>
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
$('#submitagain').click(function() {
$('#submit').show();
$('#submitagainconfirm').hide();
});
});
</script>
<?php endif; ?>
<div id="submit" <?php echo $haspassed ? 'style="display: none"' : ''; ?>>
<form method="post" enctype="multipart/form-data" action="submit.php">
<input type="hidden" name="a" value="<?php echo $programming->id ?>" />
<?php if ($submitfor): ?>
<input type="hidden" name="submitfor" value="<?php echo $submitfor ?>" />
<?php endif; ?>
<table>
<tr>
<td align="right">
<label for="programcode" class="name"><?php echo get_string('programcode', 'programming'); ?></label>
</td>
<td align="left">
<?php print_textarea(false, 10, 30, 0, 0, 'code'); ?>
</td>
</tr>
<tr>
<td align="right">
<label for="language" class="name"><?php echo get_string('programminglanguage', 'programming'); ?></label>
</td>
<td align="left">
<?php choose_from_menu(programming_get_language_options($programming), 'language', $default_language, false) ?>
</td>
</tr>
<tr>
<td align="right">
<label for="sourcefile" class="name"><?php echo get_string('sourcefile', 'programming'); ?></label>
</td>
<td align="left">
<input type="hidden" name="MAX_FILE_SIZE" value="65536" />
<input type="file" name="sourcefile" />
</td>
</tr>
<tr>
<td colspan="2">
<input type="reset" value="<?php echo get_string('reset', 'programming') ?>" />
<input type="submit" name="action" value="<?php echo get_string('submit', 'programming') ?>" />
</td>
</tr>
</table>
</form>
</div>
<?php endif; // allowpost ?>
<?php if ($isearly): ?>
<p><?php echo get_string('programmingnotopen', 'programming'); ?></p>
<?php endif; ?>
<?php if ($islate): ?>
<p><?php echo get_string('timeexceed', 'programming'); ?></p>
<?php endif; ?>
</div>