Sha256: 5614b3b41aee751aa779ec78c6ee448c539948ef11815349e233f5733dee3aee

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

h2.text-center =<> icon("user") + ' 登 录'
br
.row
  .col-md-4
  .col-md-4
    = form_tag auth_path, role: "form", class: "panel panel-default loginForm form-horizontal" do
      .panel-body
        strong 登录名
        br
        = text_field_tag :login,nil,class: "form-control"
        br
        strong 密码:
        br
        = password_field_tag :password,nil, class: "form-control"
        p.text-center
          a.rucaptcha-image-box href="#" = rucaptcha_image_tag
        p
          = rucaptcha_input_tag(class: 'form-control code',placeholder: "输入验证码")
      .panel-footer
        = submit_tag '登录', class: "btn-block btn-primary btn"

javascript:
  $(".loginForm").submit(function(event){
    if($("input.code").val()==""){alert("请填写验证码");return false;};
    if($("input.login").val()==""){alert("登录名不能为空");return false;};
    if($("input.password").val()==""){alert("密码不能为空");return false;};
  });
  $("a.rucaptcha-image-box").click(function(e){
    e.preventDefault();
    btn = $(e.currentTarget);
    img = btn.find('img:first');
    currentSrc = img.attr('src');
    img.attr('src', currentSrc.split('?')[0] + '?' + (new Date()).getTime());
    return false;
  });

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oxen-0.0.5 app/views/oxen/auth/login.html.slim
oxen-0.0.4 app/views/oxen/auth/login.html.slim
oxen-0.0.3 app/views/oxen/auth/login.html.slim
oxen-0.0.2 app/views/oxen/auth/login.html.slim
oxen-0.0.1 app/views/oxen/auth/login.html.slim