diff --git a/lib/Alchemy/Phrasea/Controller/Root/Login.php b/lib/Alchemy/Phrasea/Controller/Root/Login.php index b811fa5649..58b47aaecd 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/Login.php +++ b/lib/Alchemy/Phrasea/Controller/Root/Login.php @@ -187,10 +187,11 @@ class Login implements ControllerProviderInterface 'validation_ip' => _('Please provide a valid IP address.'), 'validation_length_min' => _('Please provide a longer value. It should have %s character or more.'), 'password_match' => _('Please provide the same passwords.'), - 'accept_tou' => _('You must accept the terms of use.'), - 'none_selected' => _('None selected'), - 'collections' => _('Collections'), - 'collection' => _('Collection'), + 'accept_tou' => _('Please accept the terms of use to register.'), + 'no_collection_selected' => _('No collection selected'), + 'one_collection_selected' => _('%d collection selected'), + 'collections_selected' => _('%d collections selected'), + 'all_collections' => _('Select all collections') )); $response->setExpires(new \DateTime('+1 day')); diff --git a/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php b/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php index d631735a94..19a052201f 100644 --- a/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php +++ b/lib/Alchemy/Phrasea/Form/Login/PhraseaRegisterForm.php @@ -113,7 +113,7 @@ class PhraseaRegisterForm extends AbstractType 'constraints' => array( new Assert\Choice(array( 'choices' => array_flip($baseIds), - 'minMessage' => _('You must select at least {{ limit }} collection'), + 'minMessage' => _('You must select at least {{ limit }} collection.'), 'multiple' => true, 'min' => 1, )), diff --git a/www/scripts/apps/login/home/common.js b/www/scripts/apps/login/home/common.js index 888204279c..b7da8f68a2 100644 --- a/www/scripts/apps/login/home/common.js +++ b/www/scripts/apps/login/home/common.js @@ -26,19 +26,18 @@ define([ $("select[multiple='multiple']").multiselect({ buttonWidth : "100%", buttonClass: 'btn btn-inverse', + maxHeight: 185, + includeSelectAllOption: true, + selectAllText: i18n.t("all_collections"), buttonText: function(options, select) { if (options.length === 0) { - return i18n.t("none_selected") + ''; - } - else if (options.length > 4) { - return options.length + (options.length > 1 ? i18n.t("collections") : i18n.t("collection")) + ' '; - } - else { - var selected = ''; - options.each(function() { - selected += $(this).text() + ', '; - }); - return selected.substr(0, selected.length -2) + ' '; + return i18n.t("no_collection_selected") + ''; + } else { + return i18n.t( + options.length === 1 ? "one_collection_selected": "collections_selected", { + postProcess: "sprintf", + sprintf: [options.length] + }) + ' '; } } }); diff --git a/www/skins/login/less/skin.less b/www/skins/login/less/skin.less index e6b01c0c85..7df32e498c 100644 --- a/www/skins/login/less/skin.less +++ b/www/skins/login/less/skin.less @@ -721,25 +721,36 @@ form[name=registerForm] .multiselect { } form[name=registerForm] .multiselect-container { - width: 99%; + width: 100%; z-index: 1020; } -form[name=registerForm] .multiselect-container li.active label{ - color: @black; +form[name=registerForm] .multiselect-container input[type=checkbox] { + float: left; + margin-left: -20px; +} + +form[name=registerForm] .multiselect-container li label { + margin: 0; + min-height: 20px; + padding-left: 20px; +} + +form[name=registerForm] .multiselect-container li.active label { + margin: 0; } form[name=registerForm] .multiselect b.caret { float: right; + } form[name=registerForm] .multiselect-group { font-weight: bold; - text-decoration: underline; -} - -form[name=registerForm] .multiselect-all label { - font-weight: bold; + padding-left: 20px; + padding-top: 10px; + padding-bottom: 5px; + font-size: @fontSizeLarge; } /** IE Fixes */ diff --git a/www/skins/login/less/variables.less b/www/skins/login/less/variables.less index fdfc94c221..630a7bdc57 100644 --- a/www/skins/login/less/variables.less +++ b/www/skins/login/less/variables.less @@ -166,10 +166,10 @@ @dropdownDividerBottom: @white; @dropdownLinkColor: @white; -@dropdownLinkColorHover: @gray; +@dropdownLinkColorHover: @white; @dropdownLinkColorActive: @white; -@dropdownLinkBackgroundActive: @linkColor; +@dropdownLinkBackgroundActive: lighten(@backgroundSideBar, 10%); @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;