Skip to content

Commit

Permalink
cleaning up whitespace some
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeif committed Jul 1, 2011
1 parent 2bf1604 commit ae4844d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 51 deletions.
6 changes: 2 additions & 4 deletions templates/form.mako
Expand Up @@ -26,10 +26,8 @@ i18n:domain="deform"\

% if field.error:
<li class="errorLi">
<h3 class="errorMsgLbl" i18n:translate=""
>There was a problem with your submission</h3>
<p class="errorMsg" i18n:translate=""
>Errors have been highlighted below</p>
<h3 class="errorMsgLbl" i18n:translate="">There was a problem with your submission</h3>
<p class="errorMsg" i18n:translate="">Errors have been highlighted below</p>
</li>
% endif

Expand Down
3 changes: 1 addition & 2 deletions templates/hidden.mako
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
<input type="hidden" name="${field.name}" value="${cstruct}"
id="${field.oid}"/>
<input type="hidden" name="${field.name}" value="${cstruct}" id="${field.oid}"/>

67 changes: 30 additions & 37 deletions templates/sequence.mako
Expand Up @@ -8,49 +8,42 @@ max_len = field.widget.max_len or 100000
now_len = len(subfields)
prototype = field.widget.prototype(field)
%>
<div class="deformSeq" id="${field.oid}">

<!-- sequence -->

<input type="hidden" name="__start__" value="${field.name}:sequence" class="deformProto" prototype="${prototype}" />
<ul>
% for tup in subfields:
${rndr(item_tmpl, field=tup[1], cstruct=tup[0], parent=field)}
% endfor

<span class="deformInsertBefore" \
<div class="deformSeq" id="${field.oid}">
<!-- sequence -->
<input type="hidden" name="__start__" value="${field.name}:sequence" class="deformProto" prototype="${prototype}" />
<ul>
% for c, f in subfields:
${rndr(item_tmpl, field=f, cstruct=c, parent=field)}
% endfor

<span class="deformInsertBefore"\
% if min_len:
min_len="${min_len}"
min_len="${min_len}"\
% endif
% if max_len:
max_len="${max_len}"
max_len="${max_len}"\
% endif
% if now_len:
now_len="${now_len}"
now_len="${now_len}"\
% endif
></span>
</ul>

<a href="#"
class="deformSeqAdd"
id="${field.oid}-seqAdd"
onclick="javascript: return deform.appendSequenceItem(this);">
<small id="${field.oid}-addtext">${add_subitem_text}</small>
</a>

<script type="text/javascript">
deform.addCallback(
'${field.oid}',
function(oid) {
oid_node = $('#'+ oid);
deform.processSequenceButtons(oid_node, ${min_len},
${max_len}, ${now_len});
}
)
</script>

<input type="hidden" name="__end__" value="${field.name}:sequence"/>

<!-- /sequence -->

</ul>

<a href="#" class="deformSeqAdd" id="${field.oid}-seqAdd" onclick="javascript: return deform.appendSequenceItem(this);">\
<small id="${field.oid}-addtext">${add_subitem_text}</small>\
</a>

<script type="text/javascript">
deform.addCallback(
'${field.oid}',
function(oid) {
oid_node = $('#'+ oid);
deform.processSequenceButtons(oid_node, ${min_len},
${max_len}, ${now_len});
}
)
</script>
<input type="hidden" name="__end__" value="${field.name}:sequence"/>
<!-- /sequence -->
</div>
17 changes: 9 additions & 8 deletions templates/textinput.mako
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-
<input type="text" name="${field.name}" value="${cstruct}"
% if field.widget.size:
size="${field.widget.size}"
% endif
% if field.widget.css_class:
class="${field.widget.css_class}"
% endif
id="${field.oid}"/>
<input type="text" name="${field.name}" value="${cstruct}"\
% if field.widget.size:
size="${field.widget.size}"\
% endif
% if field.widget.css_class:
class="${field.widget.css_class}"\
% endif
id="${field.oid}"/>

% if field.widget.mask:
<script type="text/javascript">
deform.addCallback(
Expand Down

0 comments on commit ae4844d

Please sign in to comment.