-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcrm_request.html
157 lines (143 loc) · 6.04 KB
/
crm_request.html
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
<script type="text/javascript">
var addReplyClick = 0;
function submitForm(strAction)
{
document.frmForm.action.value = strAction;
document.frmForm.submit();
}
function addNew()
{
var strMsg = "";
if (document.frmForm.customer.value.trim() == "")
strMsg += " - [crm_name] cannot be blank.\n";
if (document.frmForm.custemail.value.trim() == "" || !isValidEmail(document.frmForm.custemail.value))
strMsg += " - [crm_email] cannot be blank and must be a valid email address.\n";
if (document.frmForm.subject.value.trim() == "")
strMsg += " - [crm_subject] cannot be blank.\n";
if (document.frmForm.reply.value.trim() == "")
strMsg += " - [crm_message] cannot be blank.\n";
<!--START: captchascript-->
if (document.frmForm.ramdomWord.value.trim() == "")
strMsg += " - Verification word cannot be blank.\n";
<!--END: captchascript-->
if (ExistsCreditCard(jQuery('#reply').val()))
strMsg += "[ccNumerNotAllowedMessage]";
if (strMsg != ""){
alert(strMsg);
return false;
}
if (addReplyClick == 0){
addReplyClick = 1;
submitForm('addnew');
}
}
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
function isValidEmail(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1)
return false
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
return false
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
return false
if (str.indexOf(at,(lat+1))!=-1)
return false
if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
return false
if (str.indexOf(dot,(lat+2))==-1)
return false
if (str.indexOf(" ")!=-1)
return false
return true
}
</script>
<section id="crmRequest">
<h1 class="page_headers">[crm_header_title]</h1>
<!--START: myAccount-->
<div class="button right"><a href="myaccount.asp" class="icon-btn icon-btn-prev">Back to My Account</a></div>
<!--END: myAccount-->
<div class="clear"></div>
<!--START: CATEGORY_HEADER-->
<div class="category-header" id="crmRequesttHeader">[CONTENT]</div>
<!--END: CATEGORY_HEADER-->
<div class="crmRequestForm pad10 boxShadow">
<form method="post" action="crm.asp" id="frmForm" name="frmForm">
<input type="hidden" name="action" id="action" value="" />
<input type="hidden" name="custid" value="[custid]" />
<input type="hidden" name="orderid" value="[orderid]" />
<input type="hidden" name="productid" value="[productid]" />
<div class="crmField">
<label for="departmentid">[crm_department]:</label>
<select name="departmentid" id="departmentid" tabindex="1" class="txtBoxStyle">
[deptdropdown]
</select>
<div class="clear"></div>
</div>
<div class="crmField">
<label for="">[crm_name]:</label>
<input type="text" name="customer" value="[name]" size="50" maxlength="50" tabindex="2" class="txtBoxStyle" />
<div class="error-img"><img src="assets/templates/common/images/error2.gif" width="12" height="12" alt="" /></div>
<div class="clear"></div>
</div>
<div class="crmField">
<label for="phone">[crm_phone]:</label>
<input type="text" name="phone" value="[phone]" size="50" maxlength="50" tabindex="3" class="txtBoxStyle" />
<div class="clear"></div>
</div>
<div class="crmField">
<label for="custemail">[crm_email]:</label>
<input type="text" name="custemail" value="[email]" size="50" maxlength="50" tabindex="4" class="txtBoxStyle" />
<div class="error-img"><img src="assets/templates/common/images/error2.gif" width="12" height="12" alt="" /></div>
<div class="clear"></div>
</div>
<div class="crmField">
<label for="subject">[crm_subject]:</label>
<input name="subject" type="text" id="subject" value="" size="50" maxlength="150" tabindex="5" class="txtBoxStyle" />
<div class="error-img"><img src="assets/templates/common/images/error2.gif" width="12" height="12" alt="" /></div>
<div class="clear"></div>
</div>
<div class="crmField">
<label for="reply">[crm_message]:</label>
<textarea name="reply" id="reply" tabindex="6" class="txtBoxStyle"></textarea>
<div class="error-img"><img src="assets/templates/common/images/error2.gif" width="12" height="12" alt="" /></div>
<div class="clear"></div>
</div>
<!--START: captcha-->
<div class="crmField">
<label for="Verification">Verification:</label>
<div class="captcha"> <img src="admin/image_pw.asp" width="148" alt="" />
<div class="captcha-text">Type the word above...</div>
<input type="text" name="ramdomWord" id="ramdomWord" autocomplete="off" value="" size="25" maxlength="30" tabindex="7" class="txtBoxStyle" />
</div>
<div class="clear"></div>
</div>
<!--END: captcha-->
<!--START: recaptcha-->
<div class="crmField">
<label for="recaptcha_challenge_field">Verification:</label>
<div class="recaptcha">
<script type="text/javascript">var RecaptchaOptions = { theme: '[recaptcha_theme]' };</script>
<script type="text/javascript" src="//www.google.com/recaptcha/api/challenge?k=[recaptcha_key]"></script>
<noscript>
<iframe src="//www.google.com/recaptcha/api/noscript?k=[recaptcha_key]" height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge">
</noscript>
</div>
<div class="clear"></div>
</div>
<!--END: recaptcha-->
<div class="submit-request-button"><input type="button" onclick="javascript:addNew();" value="[crm_button-add-ticket]" class="btn" onmouseover="this.className='btn_over'" onmouseout="this.className='btn'" /></div>
<div class="clear"></div>
</form>
<div class="clear"></div>
<!--START: CATEGORY_FOOTER-->
<div class="category-footer" id="crmRequestFooter">[CONTENT]</div>
<!--END: CATEGORY_FOOTER-->
</section>