Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
B
basic-form
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Dinh Thanh Truc
  • basic-form
  • Merge Requests
  • !1

Open
Opened Jun 28, 2016 by Dinh Thanh Truc@trucdt 
  • Report abuse
Report abuse

[Review]basic form

Create basic form with validation

×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feature/basic-form origin/feature/basic-form

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout master
git merge --no-ff feature/basic-form

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 11
  • Commits 2
  • Changes 3
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Dinh Thanh Truc @trucdt

    Reassigned to @vinhnx

    Jun 28, 2016

    Reassigned to @vinhnx

    Reassigned to @vinhnx
    Toggle commit list
  • Dinh Thanh Truc @trucdt commented Jun 28, 2016
    Master

    @vinhnx :Plz, review for me

    @vinhnx :Plz, review for me
  • Nguyen Ngoc Minh Thao
    @thaonnm started a discussion on commit c7dbe8b2 Jun 29, 2016
    form.html 0 → 100644
    1 <!Doctype html>
    2 <html>
    3 <head>
    4 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    5 <script type="text/javascript" src="app.js"></script>
    6
    7 <link type="text/css" rel="stylesheet" href="stylesheet.css">
    8 <title>Register Form</title>
    9 </head>
    10 <body>
    11 <div class="formDiv">
    12 <h1 style="text-align: center;" class="header1">Register Form</h1>
    • Nguyen Ngoc Minh Thao @thaonnm commented Jun 29, 2016
      Developer

      hạn chế dùng thẻ style trong các element

      hạn chế dùng thẻ style trong các element
    Please register or sign in to reply
  • Nguyen Ngoc Minh Thao
    @thaonnm started a discussion on commit c7dbe8b2 Jun 29, 2016
    stylesheet.css 0 → 100644
    1 .formDiv{
    2 margin: 0 auto;
    3 width:1171px;
    4 height:435px;
    5 border:1px solid
    6 }
    7 .header1{
    8 font-family: Arial;
    • Nguyen Ngoc Minh Thao @thaonnm commented Jun 29, 2016
      Developer

      font-family, font-size dùng chung cho page nên để chung css. Ví dụ: html, body {font-family: Arial; font-size:14px;}

      font-family, font-size dùng chung cho page nên để chung css. Ví dụ: html, body {font-family: Arial; font-size:14px;}
    Please register or sign in to reply
  • Nguyen Ngoc Minh Thao
    @thaonnm started a discussion on commit c7dbe8b2 Jun 29, 2016
    stylesheet.css 0 → 100644
    33 margin-bottom: 8px;
    34 border-radius: 5px;
    35 border:1px solid gray;
    36 font-size:14px;
    37 font-family: Arial;
    38 }
    39 ::-webkit-input-placeholder{
    40 font-size:14px;
    41 font-family: Arial;
    42 }
    43 .labelTd{
    44 width:183px;
    45 background-color:white;
    46 font-weight:bold;
    47 }
    48 #register{
    • Nguyen Ngoc Minh Thao @thaonnm commented Jun 29, 2016
      Developer

      type css hạn chế dùng ID. Trong trường hợp này có thể dùng: table button

      type css hạn chế dùng ID. Trong trường hợp này có thể dùng: table button
    Please register or sign in to reply
  • Dinh Thanh Truc @trucdt

    Added 1 commit:

    • 9a03aeb1 - Fix review form.htnl and stylesheet.css
    Jun 29, 2016

    Added 1 commit:

    • 9a03aeb1 - Fix review form.htnl and stylesheet.css
    Added 1 commit: * 9a03aeb1 - Fix review form.htnl and stylesheet.css
    Toggle commit list
  • Nguyen Ngoc Minh Thao
    @thaonnm started a discussion on commit c7dbe8b2 Jun 30, 2016
    form.html 0 → 100644
    25 <td class="labelTd"><label for="lastName" class="registLabel" >Last Name</label></td>
    26 <td><input class="registInput" id="lastName" placeholder="Last Name" /></td>
    27 </tr>
    28 <td class="labelTd"><label for="email" class="registLabel" >Email</label></td>
    29 <td><input class="registInput" id="email" placeholder="Email" /></td>
    30 <tr>
    31 <td class="labelTd"><label for="emailConfirm" class="registLabel" >Email Confirmation</label></td>
    32 <td><input class="registInput" id="emailConfirm" placeholder="Email Confirmation" /></td>
    33 </tr>
    34 <tr>
    35 <td class="labelTd"><label for="birthday" class="registLabel" >Birthday</label></td>
    36 <td><input class="registInput" id="birthday" placeholder="Birthday" /></td>
    37 </tr>
    38 <tr>
    39 <td></td>
    40 <td><button type="button" id="register">Register</button></td>
    • Nguyen Ngoc Minh Thao @thaonnm commented Jun 30, 2016
      Developer

      hover vô button:

      • có biểu tượng bàn tay
      • thêm hiệu ứng hover cho button
      Edited Jun 30, 2016 by Nguyen Ngoc Minh Thao
      hover vô button: + có biểu tượng bàn tay + thêm hiệu ứng hover cho button
    Please register or sign in to reply
  • Nguyen Ngoc Minh Thao
    @thaonnm started a discussion on commit c7dbe8b2 Jun 30, 2016
    form.html 0 → 100644
    7 <link type="text/css" rel="stylesheet" href="stylesheet.css">
    8 <title>Register Form</title>
    9 </head>
    10 <body>
    11 <div class="formDiv">
    12 <h1 style="text-align: center;" class="header1">Register Form</h1>
    13 <table>
    14 <tr style="height:20px">
    15 <td></td>
    16 <td>
    17 <p class="error">Input error</p>
    18 </td>
    19 </tr>
    20 <tr>
    21 <td class="labelTd"><label for="firstName" class="registLabel" >First Name</label></td>
    22 <td><input class="registInput" id="firstName" placeholder="First Name" /></td>
    • Nguyen Ngoc Minh Thao @thaonnm commented Jun 30, 2016
      Developer

      Khi ở trạng thái error, làm nổi bật cái input error

      Khi ở trạng thái error, làm nổi bật cái input error
    Please register or sign in to reply
  • Nguyen Ngoc Minh Thao
    @thaonnm started a discussion on commit c7dbe8b2 Jun 30, 2016
    app.js 0 → 100644
    26 if(!((/^[a-z][a-z0-9._]+@[a-z0-9]+\.[a-z0-9.]+[a-z]+$/i).test(emailConfirm))||email!=emailConfirm){
    27 $('.error').show();
    28 $('#emailConfirm').val('Error!');
    29 reg=false;
    30 };
    31 if(!checkDate(birthday)){
    32 $('.error').show();
    33 $('#birthday').val('Error!');
    34 reg=false;
    35 }
    36 if (reg===true) {
    37 confirm("Thank you for registing");
    38 }
    39 });
    40 }
    41 $(document).ready(main);
    • Nguyen Ngoc Minh Thao @thaonnm commented Jun 30, 2016
      Developer

      Nên phân biệt giữa nhập sai giá trị và để trống. Khi input có chữ Error! click chuột vào phải mất chữ Error! Hoặc có thể thêm cụ thể vị trí error lên class error. Ví dụ:

      • First name error
      • Last name error
      Edited Jun 30, 2016 by Nguyen Ngoc Minh Thao
      Nên phân biệt giữa nhập sai giá trị và để trống. Khi input có chữ Error! click chuột vào phải mất chữ Error! Hoặc có thể thêm cụ thể vị trí error lên class error. Ví dụ: - First name error - Last name error
    Please register or sign in to reply
  • Vinh Nguyen
    @vinhnx started a discussion on the diff Jul 01, 2016
    app.js 0 → 100644
    1 var main=function(){
    2 $('#register').click(function(){
    3 console.log('click');
    • Vinh Nguyen @vinhnx commented Jul 01, 2016
      Guest

      @trucdt delete debug code

      @trucdt delete debug code
    Please register or sign in to reply
  • Vinh Nguyen
    @vinhnx started a discussion on the diff Jul 01, 2016
    app.js 0 → 100644
    1 var main=function(){
    2 $('#register').click(function(){
    3 console.log('click');
    4 $('.error').hide();
    5 var firstName=$('#firstName').val();
    • Vinh Nguyen @vinhnx commented Jul 01, 2016
      Guest

      @trucdt add more space. ie

      firstName = $('#firstName').val(); 
      @trucdt add more space. ie ```js firstName = $('#firstName').val(); ```
    Please register or sign in to reply
  • Vinh Nguyen
    @vinhnx started a discussion on the diff Jul 01, 2016
    app.js 0 → 100644
    1 var main=function(){
    2 $('#register').click(function(){
    3 console.log('click');
    4 $('.error').hide();
    5 var firstName=$('#firstName').val();
    6 var lastName=$('#lastName').val();
    7 var email=$('#email').val();
    8 var emailConfirm=$('#emailConfirm').val();
    9 var birthday=$('#birthday').val();
    10 var reg=true;
    11 if(!(firstName)||!((/^[a-z\s]+$/i).test(firstName))){
    • Vinh Nguyen @vinhnx commented Jul 01, 2016
      Guest

      @trucdt more space

      if (!(firstName) || !((/^[a-z\s]+$/i).test(firstName))) { 
      @trucdt more space ```js if (!(firstName) || !((/^[a-z\s]+$/i).test(firstName))) { ```
    Please register or sign in to reply
  • Vinh Nguyen
    @vinhnx started a discussion on the diff Jul 01, 2016
    app.js 0 → 100644
    21 if(!((/^[a-z][a-z0-9._]+@[a-z0-9]+\.[a-z0-9.]+[a-z]+$/i).test(email))){
    22 $('.error').show();
    23 $('#email').val('Error!');
    24 reg=false;
    25 };
    26 if(!((/^[a-z][a-z0-9._]+@[a-z0-9]+\.[a-z0-9.]+[a-z]+$/i).test(emailConfirm))||email!=emailConfirm){
    27 $('.error').show();
    28 $('#emailConfirm').val('Error!');
    29 reg=false;
    30 };
    31 if(!checkDate(birthday)){
    32 $('.error').show();
    33 $('#birthday').val('Error!');
    34 reg=false;
    35 }
    36 if (reg===true) {
    • Vinh Nguyen @vinhnx commented Jul 01, 2016
      Guest

      @trucdt if reg is enough

      @trucdt `if reg` is enough
    Please register or sign in to reply
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Vinh Nguyen
Assignee
Vinh Nguyen @vinhnx
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: trucdt/basic-form!1