mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
javascript load for user_biography
This commit is contained in:
parent
ac0659d9c6
commit
2b1aeafcd8
2 changed files with 1 additions and 10 deletions
|
|
@ -1,13 +1,4 @@
|
|||
$(function () {
|
||||
|
||||
/**
|
||||
* Show the number of words in the biography text field when opening the
|
||||
* profile edit page
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
word_count($("#user_biography")[0], 'bio_length', 150);
|
||||
});
|
||||
|
||||
/**
|
||||
* Update the number of words in the biography text field every time the user
|
||||
* releases a key on the keyboard
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
= f.input :biography, input_html: { rows: 5, 'onkeyup' => "word_count(this, 'biography-count', 150)" }
|
||||
You have used
|
||||
%span#bio_length
|
||||
0
|
||||
= @user.biography.split.length
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue