Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
bb0a5238
Commit
bb0a5238
authored
Aug 11, 2012
by
Baptiste Mouterde
Committed by
ikoalaz
Aug 11, 2012
Browse files
comment: add the no-js support, fix name for validation
parent
7697b5da
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/templates/comments/form.mako
View file @
bb0a5238
<%page args='id,package_version_id'/>
<%page args='id,package_version_id
,filename=""
'/>
<script type="text/javascript">
$(document).ready(function () {
<% if not hasattr(c,'fileName'): setattr(c,'fileName','') %>
comment_form(${id}, '${h.url(controller='comments', action='ajax_call')}', "${h.url(controller='comments',action='reload_comments')}",${package_version_id}, '${c.fileName}', '')
var filename = '${c.fileName}'
comment_form(${id}, '${h.url(controller='comments', action='ajax_call')}', "${h.url(controller='comments',action='reload_comments')}",${package_version_id}, filename, '')
});
</script>
<fieldset id="comment_fs${id}" style="border:solid">
...
...
@@ -16,7 +17,17 @@
</td>
<td>
<% options=(("info","info"),("idea","idea"),("success","good point"),("failure","bad point")) %>
${ h.html.tags.select('typei'+str(id),None,options)}
${ h.html.tags.select('type',None,options,id='typei'+str(id))}
</td>
</tr>
<tr class='no-js'>
<td>
${ _('choose a comment to answer')}
</td>
<td>
<% options=[(int(i.id),str(i.id)+' : '+str(i.text[:10])) for i in c.comments]
options.append(('',''))%>
${h.html.tags.select('parent',"",options,id='answer'+str(id))}
</td>
</tr>
<tr>
...
...
@@ -24,7 +35,7 @@
${ _('comment')}:
</td>
<td>
${ h.html.tags.textarea('co
mm
ent
i'+str(id)
,rows=5,cols=40)}
${ h.html.tags.textarea('co
nt
ent
'
,rows=5,cols=40
,id='commenti'+str(id)
)}
</td>
</tr>
<tr>
...
...
@@ -32,7 +43,7 @@
${ _('from line')}
</td>
<td>
${ h.html.tags.text('start'+str(id))}
${ h.html.tags.text(
id=
'start'+str(id)
,name='start'
)}
</td>
</tr>
<tr>
...
...
@@ -40,10 +51,15 @@
${ _('to line')}
</td>
<td>
${ h.html.tags.text('stop'+str(id))}
${ h.html.tags.text(
id=
'stop'+str(id)
,name='stop'
)}
</td>
</tr>
</table>
<span class='no-js' style='visibility:hidden; display:NONE;'>
${h.html.tags.text('file',value=filename)}
${h.html.tags.text('revision',value=package_version_id)}
</span>
<br/>
${ h.html.tags.submit('send'
+str(id)
, _('Submit'),id='send'+str(id)) }
${ h.html.tags.submit('send', _('Submit'),id='send'+str(id)) }
</fieldset>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment