Sha256: 247b286790fc6a89c8cec41c258fc0c02df62c45de01d7cb7ec48ccdfaab024d
Contents?: true
Size: 1.17 KB
Versions: 21
Compression:
Stored size: 1.17 KB
Contents
<% user_cluster_roles = user_cluster_roles.nil? ? User::CLUSTER_ROLES : user_cluster_roles %> <% other_visibility_reason = other_visibility_reason.nil? ? false : other_visibility_reason %> <% if @user.try(:organization).try(:is_in_cluster_mode?) || other_visibility_reason %> <div class="form-group"> <%= f.label t('klastera.cluster_role') %> <%= f.select :cluster_role, user_cluster_roles.map{|r|[t("klastera.roles.#{r}"),r]}, { include_blank: true }, { class: 'form-control' } %> </div> <script type="text/javascript"> $('[name="user[cluster_role]"]').change(function(){ if ( $(this).val() == "<%=User::CLUSTER_ROOT%>" ) { swal({ title: "<%= t('klastera.user.cluster_root_asignation.title') %>", text: "<%= t('klastera.user.cluster_root_asignation.text') %>", type: "warning", showCancelButton: true, confirmButtonText: "<%= t('klastera.user.assign_cluster_role') %>", cancelButtonText: "<%= t('klastera.actions.cancel') %>", }, function (isConfirm) { if ( ! isConfirm ) { $('[name="user[cluster_role]"]').val(""); } }); } }); </script> <% end %>
Version data entries
21 entries across 21 versions & 1 rubygems