mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Build subscribe checkbox in register mako without html backend helper
This commit is contained in:
@@ -74,6 +74,7 @@ class CheckboxField(BaseField):
|
||||
def is_checked(value):
|
||||
if value in [True, "true"]:
|
||||
return True
|
||||
return False
|
||||
|
||||
def to_dict(self):
|
||||
d = super(CheckboxField, self).to_dict()
|
||||
|
||||
@@ -59,8 +59,6 @@ def inherit(context):
|
||||
<%
|
||||
if form_action is None:
|
||||
form_action = h.url_for( controller='user', action='create', cntrller=cntrller )
|
||||
from galaxy.web.form_builder import CheckboxField
|
||||
subscribe_check_box = CheckboxField( 'subscribe' )
|
||||
%>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -169,10 +167,7 @@ def inherit(context):
|
||||
%if trans.app.config.smtp_server and trans.app.config.mailing_join_addr:
|
||||
<div class="form-row">
|
||||
<label>Subscribe to mailing list:</label>
|
||||
%if subscribe_checked:
|
||||
<% subscribe_check_box.checked = True %>
|
||||
%endif
|
||||
${subscribe_check_box.get_html()}
|
||||
<input type="checkbox" id="subscribe" name="subscribe" value="true" ${"checked" if subscribe_checked else ""} >
|
||||
<p>See <a href="https://galaxyproject.org/mailing-lists/" target="_blank">
|
||||
all Galaxy project mailing lists</a>.</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user