Commits

Zhang Huangbin  committed 38e643b

Add attribute 'name=' in HTML forms.

  • Participants
  • Parent commits 21b87a7

Comments (0)

Files changed (9)

File templates/default/dbmail_mysql/admin/list.html

                 </h2>
             </div>
 
-        <form id="list_table" method="post" action="{{ctx.homepath}}/admins">
+        <form name="admins" id="list_table" method="post" action="{{ctx.homepath}}/admins">
         {{ display_csrf_token() }}
 
         <table class="style1 tablesorter" cellspacing="0">

File templates/default/dbmail_mysql/alias/create.html

 
             <div id="alias_add" class="box-wrap clear">
                 <div class="columns clear">
-                    <form method="post" action="{{ctx.homepath}}/create/alias/{{cur_domain}}">
+                    <form name="create" method="post" action="{{ctx.homepath}}/create/alias/{{cur_domain}}">
                         {{ display_csrf_token() }}
                         <div class="form-field clear">
                             <h4 class="size-170 fl-space">{{ _('Mail Address') }} <span class="required">*</span></h4>

File templates/default/dbmail_mysql/alias/list.html

         </div>{# -- box-header -- #}
 
     {# List all aliases. #}
-    <form id="list_table" action="{{ctx.homepath}}/aliases/{{cur_domain}}" method="post">
+    <form name="aliases" id="list_table" action="{{ctx.homepath}}/aliases/{{cur_domain}}" method="post">
     {{ display_csrf_token() }}
     <table class="style1 tablesorter" cellspacing="0">
         <thead>

File templates/default/dbmail_mysql/domain/list.html

                 </h2>
             </div>
 
-            <form id="list_table" method="post" action="{{ctx.homepath}}/domains">
+            <form name="domains" id="list_table" method="post" action="{{ctx.homepath}}/domains">
                 {{ display_csrf_token() }}
 
                 <table class="style1 tablesorter" cellspacing="0">

File templates/default/dbmail_mysql/search.html

 <div class="content-box">
     <div class="box-body">
         <div class="box-wrap clear">
-            <form action="{{ctx.homepath}}/search" method="post">
+            <form name="search" method="post" action="{{ctx.homepath}}/search">
                 {{ csrf_token }}
                 <div class="form-field clear">
                     <h4 class="size-150 fl-space">{{ _('Keyword') }} <span class="required">*</span></h4>
             {% if admins |length > 0 and session.get('domainGlobalAdmin') is sameas true %}
                 <h2>{{ _('%d admin(s) found.') |format(admins |length) }}</h2>
 
-                <form id="admin_table" method="post" action="{{ctx.homepath}}/admins">
+                <form name="admins" id="admin_table" method="post" action="{{ctx.homepath}}/admins">
                     {{ csrf_token }}
 
                     <table class="style1 tablesorter" cellspacing="0">
             {% if users |length > 0 %}
                 <h2>{{ _('%d user(s) found.') |format( users |length ) }}</h2>
 
-                <form id="user_table" method="post" action="{{ctx.homepath}}/action/user">
+                <form name="users" id="user_table" method="post" action="{{ctx.homepath}}/action/user">
                     {{ csrf_token }}
                     <table class="style1 tablesorter" cellspacing="0">
                         <thead>
             {% if aliases |length > 0 %}
                 <h2>{{ _('%d mail alias(es) found.') |format( aliases |length ) }}</h2>
 
-                <form id="alias_table" method="post" action="{{ctx.homepath}}/action/alias">
+                <form name="aliases" id="alias_table" method="post" action="{{ctx.homepath}}/action/alias">
                     {{ csrf_token }}
 
                     <table class="style1 tablesorter" cellspacing="0">

File templates/default/dbmail_mysql/user/create.html

             </div>
 
             <div id="user_add" class="box-wrap clear">
-                <form method="post" action="{{ctx.homepath}}/create/user/{{cur_domain}}">
+                <form name="create" method="post" action="{{ctx.homepath}}/create/user/{{cur_domain}}">
                     {{ display_csrf_token() }}
                     <div class="columns clear">
                         <div class="col3-4">

File templates/default/dbmail_mysql/user/list.html

 
             <div class="box-wrapper clear">
             <div id="user_list">
-    <form id="account_list" method="post" action="{{ctx.homepath}}/users/{{cur_domain}}">
+    <form name="users" id="account_list" method="post" action="{{ctx.homepath}}/users/{{cur_domain}}">
     {{ display_csrf_token() }}
     <table class="style1 tablesorter" cellspacing="0">
         <thead>

File templates/default/login.html

                 {{ loginMsgHandler(msg) }}
 
 
-                <form method="post" action="{{ctx.homepath}}/login">
+                <form name="login" method="post" action="{{ctx.homepath}}/login">
                     <div class="login-inside">
                         <div class="login-data">
                             <div class="row clear">
                                 <input type="password" name="password" size="25" class="text" id="password" />
                             </div>
 
-                            <input type="submit" class="button green" value="{{ _('Login') }}" />
+                            <input name="login" type="submit" class="button green" value="{{ _('Login') }}" />
                         </div>
                         <p></p>
                     </div>

File templates/default/macros/general.html

 
 {% macro display_add_admin(min_passwd_length='0', max_passwd_length='0', lang='en_US', languagemaps=['en_US',]) -%}
     <div id="admin_add" class="box-wrap clear">
-        <form method="post" action="{{ctx.homepath}}/create/admin">
+        <form name="create" method="post" action="{{ctx.homepath}}/create/admin">
             {{ display_csrf_token() }}
             {{ display_input_mail(required=true) }}
 
         {% if label is sameas true %}
             <h3>{{ _('Add domain') }}</h3>
         {% endif %}
-        <form method="post" action="{{ctx.homepath}}/create/domain">
+        <form name="create" method="post" action="{{ctx.homepath}}/create/domain">
 
             {{ display_csrf_token() }}
             {{ display_input_domain(required=true) }}
         {{ _('Disable account') }}
     {% elif event == 'active' %}
         {{ _('Active account') }}
+    {% elif event == 'update' %}
+        {{ _('Edit account profile') }}
     {% else %}
         {{ event |e }}
     {% endif %}