~porten-deactivatedaccount/eventum/devel

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
{include file="header.tpl.html" extra_title="Issue #$issue_id - Upload File"}
{if $current_role > $roles.viewer}
{if $upload_file_result != ''}
    <br />
    <center>
    <span class="default"><b>
    {if $upload_file_result == -1}
      {t}An error occurred while trying to process the uploaded file.{/t}
    {elseif $upload_file_result == -2}
      {t}The uploaded file is already attached to the current issue. Please rename the file and try again.{/t}
    {elseif $upload_file_result == 1}
      {t}Thank you, the uploaded file was associated with the issue below.{/t}
    {/if}
    </b></span>
    </center>
    <script type="text/javascript">
    <!--
    {if $current_user_prefs.close_popup_windows == '1' && $upload_file_result == 1}
    setTimeout('closeAndRefresh()', 2000);
    {/if}
    //-->
    </script>
    <br />
    {if not $current_user_prefs.close_popup_windows}
    <center>
      <span class="default"><a class="link" href="javascript:void(null);" onClick="javascript:closeAndRefresh();">{t}Continue{/t}</a></span>
    </center>
    {/if}
{else}
{literal}
<script type="text/javascript">
<!--
function validateUpload(f)
{
    var field1 = getFormElement(f, 'attachment[]', 0);
    var field2 = getFormElement(f, 'attachment[]', 1);
    var field3 = getFormElement(f, 'attachment[]', 2);
    if ((isWhitespace(field1.value)) && (isWhitespace(field2.value)) && (isWhitespace(field3.value))) {
        errors[errors.length] = new Option('Files', 'attachment[]');
        return false;
    }
    return true;
}
//-->
</script>
{/literal}
<table width="100%" bgcolor="{$cell_color}" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td width="100%">
      <table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2" border="0">
        <tr>
          <td colspan="2" class="default"><b>{t}Add New Files{/t}:</b></td>
        </tr>
        <form name="attachment_form" action="file_upload.php" method="post" enctype="multipart/form-data" onSubmit="javascript:return checkFormSubmission(this, 'validateUpload');">
        <input type="hidden" name="cat" value="upload_file">
        <input type="hidden" name="issue_id" value="{$issue_id}">
        <tr>
          <td colspan="2">
            <table width="100%" cellpadding="2" cellspacing="1">
              {if $current_role > $roles.customer}
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="120" nowrap>
                  <b>{t}Status{/t}:</b>
                </td>
                <td bgcolor="{$light_color}">
                  <select name="status" class="default">
                    <option value="public">{t}Public{/t} ({t}visible to all{/t})</option>
                    <option value="internal">{t}Private{/t} ({t}standard user and above only{/t})</option>
                  </select>
                </td>
              </tr>
              {else}
              <input type="hidden" name="status" value="public">
              {/if}
              <tr>
                <td bgcolor="{$cell_color}" class="default_white" width="120" nowrap>
                  <b>{t}Filenames{/t}:</b>
                </td>
                <td bgcolor="{$light_color}">
                  <table width="100%" cellpadding="2" cellspacing="0" id="file_table">
                    <tr>
                      <td><input size="50" name="attachment[]" type="file" class="shortcut"></td>
                    </tr>
                    <tr>
                      <td><input size="50" name="attachment[]" type="file" class="shortcut"></td>
                    </tr>
                    <tr>
                      <td><input size="50" name="attachment[]" type="file" class="shortcut"></td>
                    </tr>
                    <tr>
                      <td class="small_default"><b>{t}Note: The current maximum allowed upload file size is{/t} {$max_attachment_size}</b></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr bgcolor="{$light_color}">
                <td bgcolor="{$cell_color}" class="default_white" width="120" nowrap>
                  <b>{t}Description{/t}:</b>
                </td>
                <td bgcolor="{$light_color}">
                  <textarea name="file_description" rows="4" style="width: 97%"></textarea>
                </td>
              </tr>
              <tr bgcolor="{$cell_color}">
                <td colspan="2" align="center">
                  <input type="submit" class="button" value="{t}Upload File{/t}">
                </td>
              </tr>
            </table>
          </td>
        </tr>
        </form>
      </table>
    </td>
  </tr>
</table>
{/if}
{else}
<center><span class="default">{t}You do not have the correct role to access this page{/t}</span></center>
{/if}
{include file="footer.tpl.html"}