[Feature][S300][task-view-617][webui] add web login username rules

Change-Id: Id2a127dbf35ec4bcead25df0de6e800488e748a0
diff --git a/lynq/S300/ap/app/goahead/interface5.0/zte_web_mgmt.c b/lynq/S300/ap/app/goahead/interface5.0/zte_web_mgmt.c
index 6109b9b..2022d3f 100755
--- a/lynq/S300/ap/app/goahead/interface5.0/zte_web_mgmt.c
+++ b/lynq/S300/ap/app/goahead/interface5.0/zte_web_mgmt.c
@@ -183,6 +183,7 @@
 		cfg_get_item("admin_user", buf, sizeof(buf));
 		if (0 != strcmp(user_name, buf)) {
 			slog(MISC_PRINT, SLOG_ERR," zte_mgmt_login user_name fail \n");
+			zte_reduct_login_times();
 			zte_write_result_to_web(wp, LOGIN_USER_NAME_NOT_EXSIT);
 			return;
 		}
diff --git a/lynq/S300/ap/app/zte_webui/i18n/Messages_en.properties b/lynq/S300/ap/app/zte_webui/i18n/Messages_en.properties
index 7a99255..6bf50f2 100755
--- a/lynq/S300/ap/app/zte_webui/i18n/Messages_en.properties
+++ b/lynq/S300/ap/app/zte_webui/i18n/Messages_en.properties
@@ -527,8 +527,8 @@
 new_pin = New PIN

 confirm_pin = Confirm New PIN

 puk_locked = Your SIM card is locked permanently. Please contact your operator.

-password_error = Password is incorrect!

-password_error_left = Password is incorrect!<br/>You have {0} attempt(s) left.

+password_error = Username or password is incorrect!

+password_error_left = Username or password is incorrect!<br/>You have {0} attempt(s) left.

 password_error_account_lock = Your account is locked. <br/>Remaining time:

 password_error_five_times = You''ve input 5 times incorrectly. Retry in 5 minutes.

 password_error_account_lock_time = Your account is locked. <br/>Please try later.

diff --git a/lynq/S300/ap/app/zte_webui/i18n/Messages_zh-cn.properties b/lynq/S300/ap/app/zte_webui/i18n/Messages_zh-cn.properties
index 332077b..48bd9e2 100755
--- a/lynq/S300/ap/app/zte_webui/i18n/Messages_zh-cn.properties
+++ b/lynq/S300/ap/app/zte_webui/i18n/Messages_zh-cn.properties
@@ -529,8 +529,8 @@
 new_pin = 新 PIN

 confirm_pin = 确认新 PIN

 puk_locked = 您的 SIM卡已彻底锁定。请联系您的运营商。

-password_error = 密码不正确!

-password_error_left = 密码不正确!<br/>您的剩余尝试次数:{0}。

+password_error = 用户名或密码不正确!

+password_error_left = 用户名或密码不正确!<br/>您的剩余尝试次数:{0}。

 password_error_account_lock = 你的账户被锁定。<br/>剩余时间:

 password_error_five_times = 您已经输错5次。请5分钟后再试。

 password_error_account_lock_time = 您的账户已被锁定。<br/>请稍后再试。

diff --git a/lynq/S300/ap/app/zte_webui/js/com.js b/lynq/S300/ap/app/zte_webui/js/com.js
index ef1316d..c94fa29 100755
--- a/lynq/S300/ap/app/zte_webui/js/com.js
+++ b/lynq/S300/ap/app/zte_webui/js/com.js
@@ -8224,6 +8224,7 @@
                         logout.init();

                     } else {

                         target.password("");

+                        target.username("");

                         if(config.LOGIN_SECURITY_SUPPORT){

                             target.checkLoginData(function(){

                                 if (target.loginCount() == config.MAX_LOGIN_COUNT) {

@@ -8308,9 +8309,12 @@
             function setFocus(){

                 setTimeout(function () {

                     var txtAdmin = $('#txtAdmin:visible');

+                    var txtUser = $('#txtUser:visible');

                     var txtPIN = $('#txtPIN:visible');

                     var txtPUK = $('#txtPUK:visible');

-                    if (txtAdmin.length > 0) {

+                    if(txtUser.length > 0) {

+                        txtUser.focus();

+                    } else if (txtAdmin.length > 0) {

                         txtAdmin.focus();

                     } else if (txtPIN.length > 0) {

                         txtPIN.focus();

diff --git a/lynq/S300/ap/app/zte_webui/subpg/entry.html b/lynq/S300/ap/app/zte_webui/subpg/entry.html
index 2b68631..f04d1d4 100755
--- a/lynq/S300/ap/app/zte_webui/subpg/entry.html
+++ b/lynq/S300/ap/app/zte_webui/subpg/entry.html
@@ -16,7 +16,7 @@
 			</div>

             <div class="row form-group">

                 <div class="col-xs-8">

-                    <input id="txtAdmin" autocomplete="off" data-placeholder="username" data-bind="value:username, valueUpdate: 'keypress'"  maxlength="32" name="txtAdmin" style="border:2px solid rgb(221, 221, 221);" class="required form-control"/>

+                    <input id="txtUser" autocomplete="off" data-placeholder="username" data-bind="value:username, valueUpdate: 'keypress'"  maxlength="32" name="txtAdmin" style="border:2px solid rgb(221, 221, 221);" class="required form-control"/>

                 </div>

             </div>

             <div class="row form-group">