OSDN Git Service

Some translation.
[karesansui/karesansui.git] / karesansui / templates / default / hostby1settingby1proxy / hostby1settingby1proxy.input
1 <%doc>Copyright (C) 2010 HDE, Inc.</%doc>
2 <%inherit file="../include/common.part" />
3
4 <%! from karesansui.lib.template import view %>
5 <%
6 if config['application.proxy.status'] == '1':
7     proxy_status_msg = _('Use')
8 else:
9     proxy_status_msg = _("Do not use")
10
11 %>
12
13 <script type="text/javascript">
14 <!--
15
16 function validate() {
17         var check = true;
18     ERROR_MSG = "";
19
20     if($(":input[name='proxy_status']:checked").val() == '1'){
21             check = check_domainname(
22                             $("#proxy_server_name"),
23                             CHECK_EMPTY | CHECK_VALID,
24                             "${_('Proxy Server')}",
25                             null,
26                             null,
27                             null
28                         ) && check;
29             check = check_number(
30                             $("#proxy_server_port"),
31                             CHECK_EMPTY | CHECK_VALID | CHECK_MIN | CHECK_MAX,
32                             "${_('Proxy Port Number')}",
33                             PORT_MIN_NUMBER,
34                             PORT_MAX_NUMBER
35                         ) && check;
36             check = check_username(
37                             $("#proxy_server_user"),
38                             CHECK_VALID | CHECK_ONLYSPACE,
39                             "${_('Proxy User Name')}",
40                             null,
41                             null
42                         ) && check;
43             check = check_password(
44                             $("#proxy_server_password"),
45                             $("#proxy_server_password"),
46                             CHECK_VALID,
47                             "${_('Proxy Password')}",
48                             null,
49                             null
50                         ) && check;
51         }
52
53     if(!check){
54         show_alert_msg("${_('Please input correct value.')}\n" + ERROR_MSG);
55     }
56
57     return check;
58 };
59
60 $(document).ready(function(){
61         ajax_post_event(
62         "#edit_button",
63         "${ctx.homepath}${ctx.path}",
64         "#setting_proxy :input",
65         validate
66     );
67
68
69     helptip("#proxy_status_help",
70         "${_('Proxy Status')}",
71         /*
72         TRANSLATORS:
73         Karesansuiがインターネットへアクセスする際にプロキシを
74         使用するか否かを設定します。
75         */
76         "${_("Setting used proxy for internet access")}");
77         
78     helptip("#proxy_server_help",
79         "${_('Proxy Server')}",
80         /*
81         TRANSLATORS:
82         プロキシサーバーのホスト名を設定します。
83         */
84         "${_("Specify the host name of the proxy server to connect.")}");
85         
86     helptip("#proxy_port_help",
87         "${_('Port Number')}",
88         /*
89         TRANSLATORS:
90         プロキシサーバーのポート番号を設定します。
91         */
92         "${_("Specify the port number of the proxy server to connect.")}");
93         
94     helptip("#proxy_user_help",
95         "${_('User Name')}",
96         /*
97         TRANSLATORS:
98         プロキシサーバーへアクセスするためのユーザ名を設定します。
99         */
100         "${_("Input the user name to use for proxy authentication.")}");
101         
102     helptip("#proxy_password_help",
103         "${_('Password')}",
104         /*
105         TRANSLATORS:
106         プロキシサーバーへアクセスするためのパスワードを設定します。
107         */
108         "${_("Input the password to use for proxy authentication.")}");
109         
110 });
111 -->
112 </script>
113
114 <div id="setting_proxy">
115 <form method="post" action="" id="setting_proxy_form" name="setting_proxy_form">
116 <div class="grayout-head">
117         <span class="grayout-title">
118         <a href="#" id="server" class="path-a">
119             <img src="${ctx.homepath}/static/images/settings-title.gif" alt="">
120             ${_('Edit Proxy Settings')}
121         </a>
122     </span>
123 </div>
124
125
126 <div class="grayout-contents">
127         <div class="grayout-param">${_('Proxy Status')}<span id="proxy_status_help"/></div>
128     <div class="grayout-value grayout-form">
129         <input type="radio" name="proxy_status" value="1" id="proxy_enable" ${enable}
130                            onClick="showswitch_proxy_setting('1')" />&nbsp;${_('Use')}&nbsp;&nbsp;
131         <input type="radio" name="proxy_status" value="0" id="proxy_disable" ${disable}
132                            onClick="showswitch_proxy_setting('0')" />&nbsp;${_('Not use')}&nbsp;&nbsp;
133     </div>
134
135     <div class="grayout-param">${_('Proxy Server')}<span id="proxy_server_help"/></div>
136     <div class="grayout-value grayout-form">
137         <input type="text" name="proxy_server" value="${config['application.proxy.server']}" id="proxy_server_name" size="40" maxlength="128" />
138     </div>
139
140     <div class="grayout-param">${_('Proxy Port Number')}<span id="proxy_port_help"/></div>
141     <div class="grayout-value grayout-form">
142         <input type="text" name="proxy_port" value="${config['application.proxy.port']}" id="proxy_server_port" size="7" maxlength="5" />
143     </div>
144
145     <div class="grayout-param">${_('Proxy User Name')}<span id="proxy_user_help"/></div>
146     <div class="grayout-value grayout-form">
147         <input type="text" name="proxy_user" value="${config['application.proxy.user']}" id="proxy_server_user" size="40" maxlength="31"/>
148     </div>
149
150     <div class="grayout-param">${_('Proxy Password')}<span id="proxy_password_help"/></div>
151     <div class="grayout-value grayout-form">
152         <input type="password" name="proxy_password" value="${config['application.proxy.password']}" id="proxy_server_password" size="40" />
153     </div>
154 </div>
155 </div>
156
157             
158 <div class="grayout-footer">
159         <input type="hidden" name="_method" id="_method" />
160     <a href="#" name="edit_button" id="edit_button" class="button">
161         <span class="button-left">
162         &nbsp;</span><span class="button-right">${_('Edit')}</span>
163     </a>
164     <br style="clear: both;"/>
165 </div>
166 </form>
167 </div>