Sha256: b9c6305271eb004a3fe99202cde08da1c9f734f33f9f2b8753543afec2277899

Contents?: true

Size: 790 Bytes

Versions: 89

Compression:

Stored size: 790 Bytes

Contents

- box_id = "user_#{form.object.id || 'new'}"
%div{id: box_id}
  = form.text_field :login
  /= form.text_field :mail
  - if current_user.logged?
    = form.check_box :generate_password, class: 'generate_password'
  .passwords
    = form.password_field :password
    = form.password_field :password_confirmation
  = form.text_field :firstname
  = form.text_field :lastname

:javascript
  $(function(){
    function toggle_paswords(state){
      var $passwd = $('##{box_id} .passwords');
      $passwd.find(':input').prop('disabled', !state);
      $passwd.toggle(state);
    }

    var $generate_check = $('##{box_id} .generate_password');
    toggle_paswords(!$generate_check.is(':checked'))
    $generate_check.on('change', function(evt){ toggle_paswords(!$(this).is(':checked')) });
  });

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha15 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha14 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha13 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha12 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha11 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha10 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha9 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha8 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha7 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha6 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha5 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha4 app/views/egov_utils/users/_form.html.haml
egov_utils-1.4.5 app/views/egov_utils/users/_form.html.haml
egov_utils-1.4.4 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha3 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha2 app/views/egov_utils/users/_form.html.haml
egov_utils-1.5.0.alpha1 app/views/egov_utils/users/_form.html.haml
egov_utils-1.4.3 app/views/egov_utils/users/_form.html.haml
egov_utils-1.4.2 app/views/egov_utils/users/_form.html.haml
egov_utils-1.4.1 app/views/egov_utils/users/_form.html.haml