diff --git a/app/views/editUser.scala.html b/app/views/editUser.scala.html index 6990956cf..24f2acfa2 100644 --- a/app/views/editUser.scala.html +++ b/app/views/editUser.scala.html @@ -92,42 +92,6 @@ @if(!canEditUser) { readonly } @toHtmlArgs(args)> } - @helper.checkbox(form(Keys.User.sharedAccount), List[Option[(Symbol, String)]]( - Some("type" -> "checkbox"), - Some("label" -> "Compte Partagé"), - Some("class" -> "mdl-checkbox__input"), - if (canEditUser) None else Some("disabled" -> "") - ).flatten: _*) - @helper.checkbox(form("instructor"), List[Option[(Symbol, String)]]( - Some("type" -> "checkbox"), - Some("label" -> "Instructeur"), - Some("class" -> "mdl-checkbox__input"), - if (canEditUser) None else Some("disabled" -> "") - ).flatten:_*) - @helper.checkbox(form("helper"), List[Option[(Symbol, String)]]( - Some("type" -> "checkbox"), - Some("label" -> "Aidant"), - Some("class" -> "mdl-checkbox__input"), - if (canEditUser) None else Some("disabled" -> "") - ).flatten:_*) - @helper.checkbox(form("adminGroup"), List[Option[(Symbol, String)]]( - Some("type" -> "checkbox"), - Some("label" -> "Responsable de ces groupes"), - Some("class" -> "mdl-checkbox__input"), - if (canEditUser) None else Some("disabled" -> "") - ).flatten:_*) - @helper.checkbox(form("disabled"), List[Option[(Symbol, String)]]( - Some("type" -> "checkbox"), - Some("label" -> "Désactiver l'utilisateur"), - Some("class" -> "mdl-checkbox__input"), - if (canEditUser) None else Some("disabled" -> "") - ).flatten:_*) - - @if(unused && canEditUser) { - -
- } -
@@ -179,6 +143,59 @@ @{group.name}
} } + +
+ @** To avoid unwanted clicks outside the checkbox texts, + we wrap them into a div that has the `width: max-content` **@ +
+ @helper.checkbox(form(Keys.User.sharedAccount), List[Option[(Symbol, String)]]( + Some("type" -> "checkbox"), + Some("label" -> "Compte Partagé"), + Some("class" -> "mdl-checkbox__input"), + if (canEditUser) None else Some("disabled" -> "") + ).flatten: _*) +
+ +
+ @helper.checkbox(form("instructor"), List[Option[(Symbol, String)]]( + Some("type" -> "checkbox"), + Some("label" -> "Instructeur"), + Some("class" -> "mdl-checkbox__input"), + if (canEditUser) None else Some("disabled" -> "") + ).flatten:_*) +
+
+ @helper.checkbox(form("helper"), List[Option[(Symbol, String)]]( + Some("type" -> "checkbox"), + Some("label" -> "Aidant"), + Some("class" -> "mdl-checkbox__input"), + if (canEditUser) None else Some("disabled" -> "") + ).flatten:_*) +
+
+ @helper.checkbox(form("adminGroup"), List[Option[(Symbol, String)]]( + Some("type" -> "checkbox"), + Some("label" -> "Responsable de ces groupes"), + Some("class" -> "mdl-checkbox__input"), + if (canEditUser) None else Some("disabled" -> "") + ).flatten:_*) +
+
+ @helper.checkbox(form("disabled"), List[Option[(Symbol, String)]]( + Some("type" -> "checkbox"), + Some("label" -> "Désactiver l'utilisateur"), + Some("class" -> "mdl-checkbox__input"), + if (canEditUser) None else Some("disabled" -> "") + ).flatten:_*) +
+ +
+ + @if(unused && canEditUser) { + +
+ } +
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index cc9c9c54b..842767e5f 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -722,6 +722,10 @@ a { width: 100%; } +.single--width-max-content { + width: max-content; +} + .single--flex-grow-1 { -webkit-box-flex: 1; -ms-flex-positive: 1; @@ -973,4 +977,4 @@ Tabs margin-left: 24px; margin-right: 24px; margin-bottom: 24px; -} \ No newline at end of file +}