aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-01-09 15:27:15 +0000
committerStruan Donald <struan@exo.org.uk>2014-01-09 15:27:15 +0000
commit1522030b151df1e362a9a992cacca11a3a32f837 (patch)
tree4012cdcc695d724648e9c3400b976060adb75530
parent44a57f19689446ce437087ed573a3caf359a938c (diff)
Set user's title if we know it and it's used
-rw-r--r--src/templates/en/submit_name.html2
-rw-r--r--templates/submit_name.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/templates/en/submit_name.html b/src/templates/en/submit_name.html
index c193e20..98a48f6 100644
--- a/src/templates/en/submit_name.html
+++ b/src/templates/en/submit_name.html
@@ -15,7 +15,7 @@
<div>
<select data-role="none" placeholder="Title" id="form_title" name="title" required>
<option value="">Title</option>
- <% for ( var i = 0; i < model.titles_list.length; i++ ) { var title = model.titles_list[i]; print( '<option value="' + title + '">' + title + '</option>' ); } %>
+ <% for ( var i = 0; i < model.titles_list.length; i++ ) { var title = model.titles_list[i]; print( '<option value="' + title + '"' + ( user.title && user.title == title ? ' selected' : '' ) + '>' + title + '</option>' ); } %>
</select>
</div>
<% } %>
diff --git a/templates/submit_name.html b/templates/submit_name.html
index 1951ffa..23d9cf4 100644
--- a/templates/submit_name.html
+++ b/templates/submit_name.html
@@ -15,7 +15,7 @@
<div>
<select data-role="none" placeholder="[% loc('Title') %]" id="form_title" name="title" required>
<option value="">[% loc('Title') %]</option>
- <% for ( var i = 0; i < model.titles_list.length; i++ ) { var title = model.titles_list[i]; print( '<option value="' + title + '">' + title + '</option>' ); } %>
+ <% for ( var i = 0; i < model.titles_list.length; i++ ) { var title = model.titles_list[i]; print( '<option value="' + title + '"' + ( user.title && user.title == title ? ' selected' : '' ) + '>' + title + '</option>' ); } %>
</select>
</div>
<% } %>