User profile bio limit

stable
Xavier Julián 2015-05-13 09:16:30 +02:00 committed by Juanfran
parent 77133463fb
commit 08be65d587
4 changed files with 7 additions and 3 deletions

View File

@ -1116,7 +1116,7 @@
"EMAIL": "Email",
"FULL_NAME": "Full name",
"PLACEHOLDER_FULL_NAME": "Set your full name (ex. Íñigo Montoya)",
"BIO": "Bio",
"BIO": "Bio (max. 210 chars)",
"PLACEHOLDER_BIO": "Tell us something about you",
"LANGUAGE": "Language",
"LANGUAGE_DEFAULT": "-- use default language --"

View File

@ -34,4 +34,4 @@ section.profile-bar
// div.organization
div.profile-quote(ng-if="::vm.user.bio")
span {{::vm.user.bio}}
span {{::vm.user.bio | limitTo:210 }}{{vm.user.bio.length < 210 ? '' : '...'}}

View File

@ -58,8 +58,9 @@ div.wrapper(tg-user-profile, ng-controller="UserSettingsController as ctrl",
fieldset
label(for="bio", translate="USER_PROFILE.FIELD.BIO")
textarea(name="bio", id="bio", ng-model="user.bio",
ng-attr-placeholder="{{'USER_PROFILE.FIELD.PLACEHOLDER_BIO' | translate}}")
ng-attr-placeholder="{{'USER_PROFILE.FIELD.PLACEHOLDER_BIO' | translate}}", ng-maxlength="210", maxlength="210")
fieldset.submit
button.button-green.submit-button(type="submit", title="{{'COMMON.SAVE' | translate}}",

View File

@ -70,6 +70,9 @@
display: block;
margin-bottom: .5rem;
}
textarea {
min-height: 7rem;
}
.button-green {
color: $white;
cursor: pointer;