Enhance wording && multiselect css component

Fix typo
This commit is contained in:
Nicolas Le Goff
2013-06-13 11:14:03 +02:00
parent f30bca91a9
commit 7d0643150f
5 changed files with 37 additions and 26 deletions

View File

@@ -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'));

View File

@@ -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,
)),

View File

@@ -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") + '<b class="caret"></b>';
}
else if (options.length > 4) {
return options.length + (options.length > 1 ? i18n.t("collections") : i18n.t("collection")) + ' <b class="caret"></b>';
}
else {
var selected = '';
options.each(function() {
selected += $(this).text() + ', ';
});
return selected.substr(0, selected.length -2) + ' <b class="caret"></b>';
return i18n.t("no_collection_selected") + '<b class="caret"></b>';
} else {
return i18n.t(
options.length === 1 ? "one_collection_selected": "collections_selected", {
postProcess: "sprintf",
sprintf: [options.length]
}) + ' <b class="caret"></b>';
}
}
});

View File

@@ -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 */

View File

@@ -166,10 +166,10 @@
@dropdownDividerBottom: @white;
@dropdownLinkColor: @white;
@dropdownLinkColorHover: @gray;
@dropdownLinkColorHover: @white;
@dropdownLinkColorActive: @white;
@dropdownLinkBackgroundActive: @linkColor;
@dropdownLinkBackgroundActive: lighten(@backgroundSideBar, 10%);
@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;