Sha256: 8b4734d8ca152711ac46eeb39425ef7e429087f1d216cc50e5075429fdbaa46f

Contents?: true

Size: 1.56 KB

Versions: 6

Compression:

Stored size: 1.56 KB

Contents

about(:input) {
  self_close

  input!(:hidden, :Symbol, :Symbol) {
    attrs :type=>:hidden, :name=>args.second, :value=>args.third)
  }

  fieldset {
    input {
      attrs(:value=> '')
    }
  }

  fieldset(:Symbol) {
    input {
      attrs type: 'text'.freeze, name: args_of(:parent).first
    }
  }

  fieldset(:password) {
    input! {
      attrs :type=>'password'.freeze, :name=>'password'.freeze
    }
  }

  fieldset(:password, :Symbol) {
    input {
      attrs :name  => args_of(:parent).second
    }
  }

  fieldset(:password_confirm) {
    input! {
      attrs :type=>'password'.freeze, :name=>'password_confirm'.freeze, :value=>''
      on(:validate) { should_equal :password }
    }
  }

}


# -------------------------------------------------------------------
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# -------------------------------------------------------------------
form.sign_in! {

  title "Sign-in"

  div.main {

    fieldset(:username) do
      box {
        label 'Username'
        tip 'some tip'
      }

      input {
        on(:validate){ validate "[0-9a-zA-Z.-_]{0,25}" }
      }
    end

    fieldset(:password) do
      title 'Pass phrase:'
      input
    end

    fieldset(:password_confirm) do
      title 'Confirm pass phrase:'
      input
    end
  }

  div.footer {
    div.buttons do
      submit 'Sign-in'
      cancel 'Cancel' do
        reset
        hide
      end
    end
  }

}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
www_app-1.3.0 lib/www_app/dsl.rb
www_app-1.2.1 lib/www_app/dsl.rb
www_app-1.2.0 lib/www_app/dsl.rb
www_app-1.1.0 lib/www_app/dsl.rb
www_app-1.0.1 lib/www_app/dsl.rb
www_app-1.0.0 lib/www_app/dsl.rb