aboutsummaryrefslogtreecommitdiffstats
path: root/www/templates
diff options
context:
space:
mode:
Diffstat (limited to 'www/templates')
-rw-r--r--www/templates/en/around.html1
-rw-r--r--www/templates/en/details_extra.html6
-rw-r--r--www/templates/en/existing.html4
-rw-r--r--www/templates/en/help.html2
-rw-r--r--www/templates/en/login.html16
-rw-r--r--www/templates/en/offline.html35
-rw-r--r--www/templates/en/photo.html64
-rw-r--r--www/templates/en/reports.html2
-rw-r--r--www/templates/en/submit_confirm.html2
-rw-r--r--www/templates/en/submit_set_password.html2
-rw-r--r--www/templates/es/around.html1
-rw-r--r--www/templates/es/details_extra.html6
-rw-r--r--www/templates/es/existing.html4
-rw-r--r--www/templates/es/login.html16
-rw-r--r--www/templates/es/offline.html35
-rw-r--r--www/templates/es/photo.html64
-rw-r--r--www/templates/es/reports.html2
-rw-r--r--www/templates/es/submit_confirm.html2
-rw-r--r--www/templates/es/submit_set_password.html2
19 files changed, 133 insertions, 133 deletions
diff --git a/www/templates/en/around.html b/www/templates/en/around.html
index 7c64fe5..8328a95 100644
--- a/www/templates/en/around.html
+++ b/www/templates/en/around.html
@@ -33,6 +33,7 @@
<% } %>
</form>
<a data-role="none" id="relocate" class="nodisplay"></a>
+ <a data-role="none" id="hidepins" class="nodisplay"></a>
<div class="nodisplay" id="front-howto"></div>
</div>
diff --git a/www/templates/en/details_extra.html b/www/templates/en/details_extra.html
index 339cc9d..c4390b4 100644
--- a/www/templates/en/details_extra.html
+++ b/www/templates/en/details_extra.html
@@ -1,7 +1,11 @@
<div data-role="header" data-position="fixed">
<a data-rel="back" data-icon="arrow-l" class="ui-btn-left">Back</a>
<h1>Further Details</h1>
- <a id="next" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Next</a>
+ <% if (CONFIG.SKIP_CONFIRM_REPORT) { %>
+ <a id="next" class="ui-btn-right">Submit</a>
+ <% } else { %>
+ <a id="next" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Next</a>
+ <% } %>
</div>
<div data-role="content" data-enhance="false">
<%= category_extras %>
diff --git a/www/templates/en/existing.html b/www/templates/en/existing.html
index 5e27785..c0a90ec 100644
--- a/www/templates/en/existing.html
+++ b/www/templates/en/existing.html
@@ -17,8 +17,8 @@
<p><% print( moment( created ).fromNow() ) %></p>
</div>
- <% if ( file ) { %>
- <div class="photo" style="background-image: url(<%= file %>)"></div>
+ <% if ( files.length > 0 ) { %>
+ <div class="photo" style="background-image: url(<%= files[0] %>)"></div>
<% } %>
<% if ( details ) { %>
diff --git a/www/templates/en/help.html b/www/templates/en/help.html
index 3722544..2917c67 100644
--- a/www/templates/en/help.html
+++ b/www/templates/en/help.html
@@ -40,7 +40,7 @@
<dt>Is it free?</dt>
<dd>The site and app are free to use, yes. <% print( CONFIG.APP_NAME ) %> is run
by a registered charity, though, so if you want to make a contribution, <a
- onclick="FMS.openExternal(event); return false;" href="https://secure.mysociety.org/donate/">please do</a>.
+ onclick="FMS.openExternal(event); return false;" href="https://www.mysociety.org/donate/">please do</a>.
For more information see the <a onclick="FMS.openExternal(event); return false;" href="http://www.fixmystreet.com/faq/">website</a>.
</dd>
diff --git a/www/templates/en/login.html b/www/templates/en/login.html
index 13944e8..bbe6267 100644
--- a/www/templates/en/login.html
+++ b/www/templates/en/login.html
@@ -12,13 +12,9 @@
<input type="button" id="logout" name="logout" value="Sign Out" data-theme="a">
</div>
</div>
- <div id="password_row" class="nodisplay">
- <p class="notopmargin">
- Signed out!
- </p>
<% } else { %>
<div id="password_row">
- <% } %>
+ <p class="notopmargin">You are not signed in.</p>
<form name="signinForm" class="inputcard" id="signinForm">
<div>
<input data-role="none" type="email" value="" name="email" id="form_email" placeholder="Your Email" required>
@@ -31,13 +27,5 @@
</div>
</form>
</div>
- <div id="success_row" class="nodisplay">
- <p class="notopmargin">
- Signed in!
- </p>
- <div id="err" class="nodisplay"></div>
- <div class="bottom-btn">
- <input type="button" id="logout" name="logout" value="Sign Out" data-theme="a">
- </div>
- </div>
+ <% } %>
</div>
diff --git a/www/templates/en/offline.html b/www/templates/en/offline.html
index 10e87d9..4fde64f 100644
--- a/www/templates/en/offline.html
+++ b/www/templates/en/offline.html
@@ -1,7 +1,7 @@
<div data-role="header" data-position="fixed">
<a id="offline-prev-btn" class="ui-btn-left">Try Again</a>
<h1>Offline</h1>
- <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Skip</a>
+ <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right"><%= files.length == 0 ? "Skip" : "Next" %></a>
</div>
<div id="locating" class="nodisplay">
<div class="radar"></div>
@@ -42,30 +42,25 @@
</div>
<div>
- <textarea data-role="none" rows="7" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required><%= details %></textarea>
+ <textarea data-role="none" rows="2" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required><%= details %></textarea>
</div>
</div>
- <% if ( file != '' ) { %>
- <div id="add_photo" style="display: none">
- <% } else { %>
- <div id="add_photo">
+ <% if ( files.length < CONFIG.MAX_PHOTOS ) { %>
+ <div id="add_photo">
+ <input data-icon="fms-photo-new" value="Take a new photo" type="button" name="photo_button" id="id_photo_button" data-role="button" data-theme="a">
+ <input data-icon="fms-photo-existing" value="Add an existing photo" type="button" name="existing" id="id_existing" data-role="button" data-theme="c">
+ </div>
<% } %>
- <label>Add a Photo <em>(optional)</em></label>
- <input data-icon="fms-photo-new" value="Take a new photo" type="button" name="photo_button" id="id_photo_button" data-role="button" data-theme="a">
- <input data-icon="fms-photo-existing" value="Add an existing photo" type="button" name="existing" id="id_existing" data-role="button" data-theme="c">
- </div>
- <% if ( file == '' ) { %>
- <div id="display_photo" style="display: none">
- <% } else { %>
- <div id="display_photo">
- <% } %>
- <label>Your Photo</label>
- <div class="photo">
- <img class="small" id="photo" src="<%= file %>" />
+ <% if ( files.length > 0 ) { %>
+ <div class="photo-wrapper">
+ <% _.each(files, function(file, index) { %>
+ <div class="photo" style="background-image: url('<%= file %>');">
+ <a data-role="none" class="photo-corner-button del_photo_button" data-file-index="<%= index %>">X</a>
+ </div>
+ <% }); %>
</div>
- <input value="Remove Photo" type="button" name="del_photo_button" id="id_del_photo_button" data-role="button" data-theme="a">
- </div>
+ <% } %>
</div>
</div>
diff --git a/www/templates/en/photo.html b/www/templates/en/photo.html
index 8dac456..3221192 100644
--- a/www/templates/en/photo.html
+++ b/www/templates/en/photo.html
@@ -1,37 +1,49 @@
<div data-role="header">
<a data-rel="back" data-icon="arrow-l" class="ui-btn-left">Back</a>
- <h1>Add Photo</h1>
- <% if ( file == '' ) { %>
- <a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Skip</a>
+ <h1>Add Photos</h1>
+ <% if ( files.length == 0 ) { %>
+ <% if ( !CONFIG.PHOTO_REQUIRED ) { %>
+ <a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Skip</a>
+ <% } %>
<% } else { %>
<a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Next</a>
<% } %>
</div>
+
<div data-role="content">
- <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay';
- if ( file != '' ) {
- photoClass = '';
- } else {
- nophotoClass = '';
- } %>
- <h2 id="nophoto_title" class="<% print( nophotoClass ); %>">
- Add a Photo <em>(optional)</em>
- </h2>
- <h2 id="photo_title" class="<% print( photoClass ); %>">
- Photo for report
- </h2>
- <div class="photo-wrapper">
- <div class="photo">
- <% if ( file == '' ) { %>
- <img class="placeholder" src="images/placeholder-photo.png" alt="" id="photo">
+ <% if ( files.length == 0 ) { %>
+ <h2 id="nophoto_title">
+ Add a Photo
+ <% if ( !CONFIG.PHOTO_REQUIRED ) { %>
+ <em>(optional)</em>
+ <% } else if ( files.length == 0) { %>
+ <em>(required)</em>
+ <%} %>
+ </h2>
<% } else { %>
- <img class="small" id="photo" src="<%= file %>" />
+ <h2 id="photo_title">
+ Photos for report
+ </h2>
<% } %>
- <a data-role="none" id="id_del_photo_button" class="photo-corner-button">X</a>
- </div>
- </div>
- <div class="bottom-btn">
- <input data-icon="fms-photo-existing" type="button" id="id_existing" data-theme="c" value="Add an existing photo" >
- <input data-icon="fms-photo-new" id="id_photo_button" type="button" data-theme="a" value="Take a new photo">
+
+ <div class="photo-wrapper">
+ <% if ( files.length == 0 ) { %>
+ <div class="photo">
+ <img class="placeholder" src="images/placeholder-photo.png" alt="">
+ </div>
+ <% } else { %>
+ <% _.each(files, function(file, index) { %>
+ <div class="photo" style="background-image: url('<%= file %>');">
+ <a data-role="none" class="photo-corner-button del_photo_button" data-file-index="<%= index %>">X</a>
+ </div>
+ <% });%>
+ <% } %>
</div>
+
+ <% if ( files.length < CONFIG.MAX_PHOTOS ) { %>
+ <div class="bottom-btn">
+ <input data-icon="fms-photo-existing" type="button" id="id_existing" data-theme="c" value="Add an existing photo" >
+ <input data-icon="fms-photo-new" id="id_photo_button" type="button" data-theme="a" value="Take a new photo">
+ </div>
+ <% } %>
</div>
diff --git a/www/templates/en/reports.html b/www/templates/en/reports.html
index 047fa76..e04f5f6 100644
--- a/www/templates/en/reports.html
+++ b/www/templates/en/reports.html
@@ -15,7 +15,7 @@
if ( draft.get('lat') ) {
classes.push('with_location');
}
- if ( draft.get('file') ) {
+ if ( draft.get('files').length > 0 ) {
classes.push('with_photo');
}
var draftClass = '';
diff --git a/www/templates/en/submit_confirm.html b/www/templates/en/submit_confirm.html
index 5d2e6a0..f41e71c 100644
--- a/www/templates/en/submit_confirm.html
+++ b/www/templates/en/submit_confirm.html
@@ -3,7 +3,7 @@
<h1>Your details</h1>
</div>
-<div data-role="content">
+<div data-role="content"<% if (CONFIG.SKIP_CONFIRM_REPORT) { %> class="hidden"<% } %>>
<p class="notopmargin">
You are logged in as <%= user.email %>.
</p>
diff --git a/www/templates/en/submit_set_password.html b/www/templates/en/submit_set_password.html
index 1a24eae..75baf7a 100644
--- a/www/templates/en/submit_set_password.html
+++ b/www/templates/en/submit_set_password.html
@@ -12,7 +12,7 @@
</p>
<div class="inputcard">
<div>
- <input data-role="none" type="password" value="" name="password" id="form_password" placeholder="Your password" required>
+ <input data-role="none" type="password" value="<%= FMS.currentUser.get('password') %>" name="password" id="form_password" placeholder="Your password" required>
</div>
</div>
<div class="noborder">
diff --git a/www/templates/es/around.html b/www/templates/es/around.html
index 8686933..5f47ed4 100644
--- a/www/templates/es/around.html
+++ b/www/templates/es/around.html
@@ -33,6 +33,7 @@
<% } %>
</form>
<a data-role="none" id="relocate" class="nodisplay"></a>
+ <a data-role="none" id="hidepins" class="nodisplay"></a>
<div class="nodisplay" id="front-howto"></div>
</div>
diff --git a/www/templates/es/details_extra.html b/www/templates/es/details_extra.html
index 2d782c8..0f302fe 100644
--- a/www/templates/es/details_extra.html
+++ b/www/templates/es/details_extra.html
@@ -1,7 +1,11 @@
<div data-role="header" data-position="fixed">
<a data-rel="back" data-icon="arrow-l" class="ui-btn-left">Atrás</a>
<h1>Detalles adicionales</h1>
- <a id="next" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Siguiente</a>
+ <% if (CONFIG.SKIP_CONFIRM_REPORT) { %>
+ <a id="next" class="ui-btn-right">Enviar</a>
+ <% } else { %>
+ <a id="next" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Siguiente</a>
+ <% } %>
</div>
<div data-role="content" data-enhance="false">
<%= category_extras %>
diff --git a/www/templates/es/existing.html b/www/templates/es/existing.html
index b45b3d8..baecd89 100644
--- a/www/templates/es/existing.html
+++ b/www/templates/es/existing.html
@@ -17,8 +17,8 @@
<p><% print( moment( created ).fromNow() ) %></p>
</div>
- <% if ( file ) { %>
- <div class="photo" style="background-image: url(<%= file %>)"></div>
+ <% if ( files.length > 0 ) { %>
+ <div class="photo" style="background-image: url(<%= files[0] %>)"></div>
<% } %>
<% if ( details ) { %>
diff --git a/www/templates/es/login.html b/www/templates/es/login.html
index 4dff7a6..3fcaa99 100644
--- a/www/templates/es/login.html
+++ b/www/templates/es/login.html
@@ -12,13 +12,9 @@
<input type="button" id="logout" name="logout" value="Cerrar sesión" data-theme="a">
</div>
</div>
- <div id="password_row" class="nodisplay">
- <p class="notopmargin">
- ¡Sesión cerrada!
- </p>
<% } else { %>
<div id="password_row">
- <% } %>
+ <p class="notopmargin">You are not signed in.</p>
<form name="signinForm" class="inputcard" id="signinForm">
<div>
<input data-role="none" type="email" value="" name="email" id="form_email" placeholder="Su email" required>
@@ -31,13 +27,5 @@
</div>
</form>
</div>
- <div id="success_row" class="nodisplay">
- <p class="notopmargin">
- ¡Sesión abierta!
- </p>
- <div id="err" class="nodisplay"></div>
- <div class="bottom-btn">
- <input type="button" id="logout" name="logout" value="Cerrar sesión" data-theme="a">
- </div>
- </div>
+ <% } %>
</div>
diff --git a/www/templates/es/offline.html b/www/templates/es/offline.html
index 1051f57..35190df 100644
--- a/www/templates/es/offline.html
+++ b/www/templates/es/offline.html
@@ -1,7 +1,7 @@
<div data-role="header" data-position="fixed">
<a id="offline-prev-btn" class="ui-btn-left">Inténtelo nuevamente</a>
<h1>Sin conexión</h1>
- <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Saltar</a>
+ <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right"><%= files.length == 0 ? "Saltar" : "Siguiente" %></a>
</div>
<div id="locating" class="nodisplay">
<div class="radar"></div>
@@ -42,30 +42,25 @@
</div>
<div>
- <textarea data-role="none" rows="7" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required><%= details %></textarea>
+ <textarea data-role="none" rows="2" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required><%= details %></textarea>
</div>
</div>
- <% if ( file != '' ) { %>
- <div id="add_photo" style="display: none">
- <% } else { %>
- <div id="add_photo">
+ <% if ( files.length < CONFIG.MAX_PHOTOS ) { %>
+ <div id="add_photo">
+ <input data-icon="fms-photo-new" value="Tomar una nueva foto" type="button" name="photo_button" id="id_photo_button" data-role="button" data-theme="a">
+ <input data-icon="fms-photo-existing" value="Añadir una foto existente" type="button" name="existing" id="id_existing" data-role="button" data-theme="c">
+ </div>
<% } %>
- <label>Añadir una foto <em>(opcional)</em></label>
- <input data-icon="fms-photo-new" value="Tomar una nueva foto" type="button" name="photo_button" id="id_photo_button" data-role="button" data-theme="a">
- <input data-icon="fms-photo-existing" value="Añadir una foto existente" type="button" name="existing" id="id_existing" data-role="button" data-theme="c">
- </div>
- <% if ( file == '' ) { %>
- <div id="display_photo" style="display: none">
- <% } else { %>
- <div id="display_photo">
- <% } %>
- <label>Su foto</label>
- <div class="photo">
- <img class="small" id="photo" src="<%= file %>" />
+ <% if ( files.length > 0 ) { %>
+ <div class="photo-wrapper">
+ <% _.each(files, function(file, index) { %>
+ <div class="photo" style="background-image: url('<%= file %>');">
+ <a data-role="none" class="photo-corner-button del_photo_button" data-file-index="<%= index %>">X</a>
+ </div>
+ <% }); %>
</div>
- <input value="Eliminar foto" type="button" name="del_photo_button" id="id_del_photo_button" data-role="button" data-theme="a">
- </div>
+ <% } %>
</div>
</div>
diff --git a/www/templates/es/photo.html b/www/templates/es/photo.html
index 62f36dc..75de686 100644
--- a/www/templates/es/photo.html
+++ b/www/templates/es/photo.html
@@ -1,37 +1,49 @@
<div data-role="header">
<a data-rel="back" data-icon="arrow-l" class="ui-btn-left">Atrás</a>
- <h1>Añadir foto</h1>
- <% if ( file == '' ) { %>
- <a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Saltar</a>
+ <h1>Add Photos</h1>
+ <% if ( files.length == 0 ) { %>
+ <% if ( !CONFIG.PHOTO_REQUIRED ) { %>
+ <a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Saltar</a>
+ <% } %>
<% } else { %>
<a id="photo-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">Siguiente</a>
<% } %>
</div>
+
<div data-role="content">
- <% var photoClass = 'nodisplay', nophotoClass = 'nodisplay';
- if ( file != '' ) {
- photoClass = '';
- } else {
- nophotoClass = '';
- } %>
- <h2 id="nophoto_title" class="<% print( nophotoClass ); %>">
- Añadir una foto <em>(opcional)</em>
- </h2>
- <h2 id="photo_title" class="<% print( photoClass ); %>">
- Foto para el informe
- </h2>
- <div class="photo-wrapper">
- <div class="photo">
- <% if ( file == '' ) { %>
- <img class="placeholder" src="images/placeholder-photo.png" alt="" id="photo">
+ <% if ( files.length == 0 ) { %>
+ <h2 id="nophoto_title">
+ Añadir una foto
+ <% if ( !CONFIG.PHOTO_REQUIRED ) { %>
+ <em>(opcional)</em>
+ <% } else if ( files.length == 0) { %>
+ <em>(required)</em>
+ <%} %>
+ </h2>
<% } else { %>
- <img class="small" id="photo" src="<%= file %>" />
+ <h2 id="photo_title">
+ Photos for report
+ </h2>
<% } %>
- <a data-role="none" id="id_del_photo_button" class="photo-corner-button">X</a>
- </div>
- </div>
- <div class="bottom-btn">
- <input data-icon="fms-photo-existing" type="button" id="id_existing" data-theme="c" value="Añadir una foto existente" >
- <input data-icon="fms-photo-new" id="id_photo_button" type="button" data-theme="a" value="Tomar una nueva foto">
+
+ <div class="photo-wrapper">
+ <% if ( files.length == 0 ) { %>
+ <div class="photo">
+ <img class="placeholder" src="images/placeholder-photo.png" alt="">
+ </div>
+ <% } else { %>
+ <% _.each(files, function(file, index) { %>
+ <div class="photo" style="background-image: url('<%= file %>');">
+ <a data-role="none" class="photo-corner-button del_photo_button" data-file-index="<%= index %>">X</a>
+ </div>
+ <% });%>
+ <% } %>
</div>
+
+ <% if ( files.length < CONFIG.MAX_PHOTOS ) { %>
+ <div class="bottom-btn">
+ <input data-icon="fms-photo-existing" type="button" id="id_existing" data-theme="c" value="Añadir una foto existente" >
+ <input data-icon="fms-photo-new" id="id_photo_button" type="button" data-theme="a" value="Tomar una nueva foto">
+ </div>
+ <% } %>
</div>
diff --git a/www/templates/es/reports.html b/www/templates/es/reports.html
index cbd2acf..05772a5 100644
--- a/www/templates/es/reports.html
+++ b/www/templates/es/reports.html
@@ -15,7 +15,7 @@
if ( draft.get('lat') ) {
classes.push('with_location');
}
- if ( draft.get('file') ) {
+ if ( draft.get('files').length > 0 ) {
classes.push('with_photo');
}
var draftClass = '';
diff --git a/www/templates/es/submit_confirm.html b/www/templates/es/submit_confirm.html
index a9dd90a..224195b 100644
--- a/www/templates/es/submit_confirm.html
+++ b/www/templates/es/submit_confirm.html
@@ -3,7 +3,7 @@
<h1>Sus detalles</h1>
</div>
-<div data-role="content">
+<div data-role="content"<% if (CONFIG.SKIP_CONFIRM_REPORT) { %> class="hidden"<% } %>>
<p class="notopmargin">
Estas registrado como <%= user.email %>.
</p>
diff --git a/www/templates/es/submit_set_password.html b/www/templates/es/submit_set_password.html
index a9d9b46..39403cb 100644
--- a/www/templates/es/submit_set_password.html
+++ b/www/templates/es/submit_set_password.html
@@ -12,7 +12,7 @@
</p>
<div class="inputcard">
<div>
- <input data-role="none" type="password" value="" name="password" id="form_password" placeholder="Su contraseña" required>
+ <input data-role="none" type="password" value="<%= FMS.currentUser.get('password') %>" name="password" id="form_password" placeholder="Su contraseña" required>
</div>
</div>
<div class="noborder">