~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
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
{capture name="extra_title" assign="extra_title"}{t}Issue{/t} #{$issue_id} - {t}Add Phone Entry{/t}{/capture}
{include file="header.tpl.html" extra_title=$extra_title}

{if $add_phone_result != ''}
    <br />
    <center>
        <span class="default"><b>
    {if $add_phone_result == -1}
        {t}An error occurred while trying to run your query{/t}
    {elseif $add_phone_result == 1}
        {t}Thank you, the phone entry was added successfully.{/t}
    {/if}
    </b></span>
    </center>
    <script type="text/javascript">
    <!--
    {if $current_user_prefs.close_popup_windows == '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 validatePhoneSupportForm(f)
{
    if (!isValidDate(f, 'date')) {
        alert('{/literal}{t escape=js}Please select a valid date for when the phone call took place.{/t}{literal}');
        return false;
    }
    if ((isWhitespace(f.call_length.value)) || (!isNumberOnly(f.call_length.value))) {
        selectField(f, 'call_length');
        alert('{/literal}{t escape=js}Please enter integers (or floating point numbers) on the time spent field.{/t}{literal}');
        return false;
    }
    if (isWhitespace(f.description.value)) {
        selectField(f, 'description');
        alert('{/literal}{t escape=js}Please enter the description for this new phone support entry.{/t}{literal}');
        return false;
    }
    if (getSelectedOption(f, 'phone_category') == -1) {
        selectField(f, 'phone_category');
        alert('{/literal}{t escape=js}Please choose the category for this new phone support entry.{/t}{literal}');
        return false;
    }
    return true;
}
//-->
</script>
{/literal}
<table align="center" width="100%" cellpadding="3">
  <tr>
    <td>
      <table width="100%" bgcolor="{$cell_color}" border="0" cellspacing="0" cellpadding="0" align="center">
      <form name="add_phone_form" onSubmit="javascript:return validatePhoneSupportForm(this);" method="post" action="{$smarty.server.PHP_SELF}">
      <input type="hidden" name="cat" value="add_phone">
      <input type="hidden" name="issue_id" value="{$issue_id}">
        <tr>
          <td>
            <table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2">
              {if $current_role > $roles.customer}
              <tr>
                <td colspan="2" class="default"><b>{t}Record Phone Call{/t}:</b></td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Date of Call{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%">
                  {html_select_date start_year='-1' day_value_format='%02d' field_array='date' prefix='' all_extra=' class="default"'}&nbsp;
                  {html_select_time minute_interval=5 field_array='date' prefix='' all_extra=' class="default"' display_seconds=false}
                  <a href="javascript:void(null);" onClick="javascript:updateTimeFields('add_phone_form', 'date[Year]', 'date[Month]', 'date[Day]', 'date[Hour]', 'date[Minute]');"><img src="images/icons/refresh.gif" border="0"></a>
                </td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Reason{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%">
                  <select name="phone_category" class="default">
                    {html_options options=$phone_categories selected=5}
                  </select>
                  {include file="error_icon.tpl.html" field="phone_category"}
                </td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Call From{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%">
                  <input type="text" class="default" name="from_lname" value="{t}last name{/t}" onFocus="javascript:if (this.value == 'last name') this.value='';"><span class="default">,</span>
                  <input type="text" class="default" name="from_fname" value="{t}first name{/t}" onFocus="javascript:if (this.value == 'first name') this.value='';">
                </td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Call To{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%">
                  <input type="text" class="default" name="to_lname" value="{t}last name{/t}" onFocus="javascript:if (this.value == 'last name') this.value='';"><span class="default">,</span>
                  <input type="text" class="default" name="to_fname" value="{t}first name{/t}" onFocus="javascript:if (this.value == 'first name') this.value='';">
                </td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Type{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%">
                  <select class="default" name="type">
                    <option value="incoming">{t}Incoming{/t}</option>
                    <option value="outgoing">{t}Outgoing{/t}</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Customer Phone Number{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%">
                  <input type="text" size="20" maxlength="32" name="phone_number" class="default">
                  {include file="error_icon.tpl.html" field="phone_number"}
                  <select class="default" name="phone_type">
                    <option value="office">{t}Office{/t}</option>
                    <option value="home">{t}Home{/t}</option>
                    <option value="mobile">{t}Mobile{/t}</option>
                    <option value="temp">{t}Temp Number{/t}</option>
                    <option value="other">{t}Other{/t}</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Time Spent{/t}:</b></td>
                <td bgcolor="{$light_color}" width="100%"><input type="text" size="5" name="call_length" class="default"> {include file="error_icon.tpl.html" field="call_length"} <span class="small_default"><i>({t}in minutes{/t})</i></span></td>
              </tr>
              <tr>
                <td bgcolor="{$internal_color}" class="default_white" width="190" nowrap><b>{t}Description{/t}:</b></td>
                <td bgcolor="{$light_color}">
                  <textarea name="description" rows="8" style="width: 97%"></textarea>
                  {include file="error_icon.tpl.html" field="description"}
                </td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="{$internal_color}" align="center">
                  <input type="submit" value="{t}Save Phone Call{/t}" class="button">
                </td>
              </tr>
              {/if}
            </table>
          </td>
        </tr>
      </form>
      </table>
    </td>
  </tr>
</table>
<script type="text/javascript">
<!--
updateTimeFields('add_phone_form', 'date[Year]', 'date[Month]', 'date[Day]', 'date[Hour]', 'date[Minute]');
//-->
</script>
{include file="app_info.tpl.html"}
{/if}
{include file="footer.tpl.html"}