def get_reset_password_form(key): reset_password_form = Form( f.TextField('New Password', v.required), f.CheckboxField('Email Password', value=True), f.ButtonField('Save Password', cancel='/admin/users/' + key), ) return reset_password_form
def get_reset_password_form(key): reset_password_form = Form( f.TextField('New Password', v.required), f.ButtonField('Save Password', cancel='/admin/users/' + key)) return reset_password_form
form1 = Form( TextField('Name', addon='$', hint='test hint'), TextField('Nickname', placeholder='Jack', hint='test hint'), EmailField('Email', hint='test hint'), PhoneField('Phone', hint='phone number'), PostalCodeField('Postal Code', hint='test hint'), # ImagesField( # 'Photos', # url='/{}/fields/'.format(system.app.name), # hint='click or drag and drop to upload' # ), TwitterField('Twitter', hint='test hint'), URLField('Web', hint='test hint'), PasswordField('Password', hint='test hint'), NumberField('Number of Things', hint='test hint'), NumberField('Area', units='ft<sup>2</sup>', hint='test hint'), # IntegerField('Count', hint='test hint'), FloatField('Size', units='meters', hint='test hint'), DecimalField('Decimal', hint='test hint'), MoneyField('Amount', hint='test hint'), MoneyField('Placeholder', placeholder=100, hint='test hint'), MoneyField('Foreign Amount', symbol='£', hint='test hint'), DateField('Date', hint='test hint'), DateField('Min Max Date', min=date1, max=date2, hint='test hint'), DateField('Formatted Date', format='%Y-%m-%d (%A)', hint='test hint'), BirthdateField('Birth Date', hint='test hint'), CheckboxesField('Select', values=['One', 'Two', 'Three'], hint='test hint'), CheckboxField('Publish', hint='test hint'), RadioField('Radio', values=['One', 'Two', 'Three'], hint='test hint'), PulldownField('Pulldown', options=['One', 'Two', 'Three'], hint='test hint'), ChosenSelectField('Chosen Select', options=['One', 'Two', 'Three'], hint='test hint'), MultiselectField('Multiselect', options=['One', 'Two', 'Three'], hint='test hint'), ChosenMultiselectField('Sizes', options=['One', 'Two', 'Three', 'Four'], hint='test hint', placeholder='Choose as you wish'), RangeSliderField('Price', min=0, max=1500), ButtonField('Okay!', hint='test hint'), ButtonsField(['One', 'Two'], cancel='cancel', hint='test hint'), MemoField('Memo', hint='test hint'), MarkdownField('Markdown', hint='test hint'), EditField('Editor', hint='test hint'), ImageField('Photo'), ButtonField('Save', cancel=url_for_page('fields')))
from zoom.context import context from zoom.mvc import View, Controller from zoom.page import page from zoom.mail import get_mail_store, send from zoom.browse import browse import zoom.fields as f from zoom.forms import Form from zoom.components import success from zoom.tools import home mail_form = Form([ f.TextField('Recipient', size=60, maxlength=60, default=(context.user.email)), f.TextField('Subject', default='a subject ' + uuid.uuid4().hex), f.MemoField('Message', value='this is the message body\n' + uuid.uuid4().hex), # f.FileField('Attachment'), f.ButtonField('Send'), ]) class MyView(View): def index(self): actions = ['Compose'] content = '<h2>Waiting</h2>' + browse(get_mail_store(context.site)) return page(content, title='Mail', actions=actions) def compose(self): # print(context.site)
from zoom.mvc import View, Controller from zoom.page import page from zoom.context import context from zoom.tools import load_content from zoom.forms import Form from zoom.fields import EmailField, ButtonField, PasswordField from zoom.validators import required from zoom.components import error from zoom.tools import home import model form = Form( EmailField('Email', required, name='email', size=30), ButtonField('Request Password Reset', name='reset_button', cancel='/login') ) reset_form = Form( PasswordField('New Password', required), PasswordField('Confirm', required), ButtonField('Reset My Password Now', name='reset_password_button', cancel='/login') ) class MyView(View): def index(self, email=None, submit_button=None): if context.user.is_admin: form.update(dict(email='*****@*****.**'))
from zoom.browse import browse import zoom.fields as f from zoom.forms import Form from zoom.tools import home from zoom.alerts import success mail_form = Form([ f.TextField('From Name', size=60, maxlength=60, default=(zoom.system.site.mail_from_name)), f.TextField('From Email', size=60, maxlength=60, default=(zoom.system.site.mail_from_addr)), f.TextField('Recipient', size=60, maxlength=60, default=(context.user.email)), f.TextField('Subject', default='a subject ' + uuid.uuid4().hex), f.MemoField('Message', value='this is the message body\n' + uuid.uuid4().hex), f.FileField('Attachment'), f.ButtonField('Send'), ]) class MyView(View): def index(self): actions = ['Compose'] site = zoom.system.request.site
import uuid from zoom.context import context from zoom.mvc import View, Controller from zoom.page import page from zoom.mail import get_mail_store, send from zoom.browse import browse import zoom.fields as f from zoom.forms import Form from zoom.components import success from zoom.tools import home mail_form = Form([ f.TextField('Recipient', size=60, maxlength=60, default='*****@*****.**'), f.TextField('Subject', default='a subject ' + uuid.uuid4().hex), f.MemoField('Message', value='this is the message body\n' + uuid.uuid4().hex), # f.FileField('Attachment'), f.ButtonField('Send'), ]) class MyView(View): def index(self): actions = ['Compose'] content = '<h2>Waiting</h2>' + browse(get_mail_store(context.site)) return page(content, title='Mail', actions=actions) def compose(self): # print(context.site) return page(content='Send mail as "{} <{}>"<br><br>{}'.format(