Ejemplo n.º 1
0
class EditMeas(twf.TableForm):
    #fields
    IDselected = twf.HiddenField(label_text="ID selected :")
    name = twf.TextField(label_text="Name :",
                         placeholder="Measurement name...",
                         validator=twc.Required)
    description = twf.TextArea(label_text="Description :")

    samples = twf.MultipleSelectField(
        label_text="Your samples : ",
        help_text="You can add some of your existing data to this project.")

    status_type = twf.CheckBox(
        label_text="Privacy : ",
        help_text=
        "Check it if you want a public data (available for UCSC visualisation)"
    )
    type = twf.CheckBox(label_text="Raw data : ",
                        help_text="Check it is a raw data")

    #parents management
    parents = twf.MultipleSelectField(
        label_text="Parents : ", help_text="Parent(s) of this measurement.")

    uploaded = twf.LabelField(
        help_text=
        "is attached to this measurement. If you want to change, it's better to delete this measurement and create a new one."
    )

    url_path = twf.TextField(label_text="File's url",
                             placeholder="http://www....")

    submit = twf.SubmitButton(value="Edit my measurement")
Ejemplo n.º 2
0
 class e(twd.HidingTableLayout):
     a = twd.HidingSingleSelectField(options=[''] + opts,
                                     mapping={
                                         'Red': ['b'],
                                         'Yellow': ['c']
                                     })
     b = twf.TextField(validator=twc.Required)
     c = twf.TextField()
Ejemplo n.º 3
0
    class child(twf.TableLayout):

        hover_help = True

        email_filter = twf.HiddenField()
        id_filter = twf.HiddenField()
        name = twf.TextField(help_text='Enter user name.', validator=twc.Required)
        login_email = twf.TextField(help_text='Enter a login email address.', validator=twc.EmailValidator(required=True))
Ejemplo n.º 4
0
class NewCircle(twf.TableForm):
    name = twf.TextField(label='Name : ',
                         help_text="Enter the circle's name",
                         validator=twc.Validator(required=True))

    description = twf.TextField(label='Description : ',
                                help_text="Enter the circle's description",
                                validator=twc.Validator(required=True))
    submit = twf.SubmitButton(id="submit", value="New")
Ejemplo n.º 5
0
    class child(twf.TableLayout):

        hover_help = True

        name = twf.TextField(help_text='Enter a new display name.')
        login_email = twf.TextField(help_text='Enter a new login email.', validator=twc.EmailValidator)
        confirm_email = twf.TextField(help_text='Confirm new login email address.', validator=MatchEmail('new_login_email'))
        new_password = twf.PasswordField(help_text='Enter new password.')
        confirm_password = twf.PasswordField(help_text='Confirm new password.', validator=MatchPassword('new_password'))
        current_password = twf.PasswordField(help_text='Enter current password.', validator=twc.Required)
Ejemplo n.º 6
0
    class Details(twf.ListFieldSet):
        label = None
        key = 'details'

        email = twf.TextField(validator=twc.Validator(required=True),
                              css_class="form-control",
                              label=l_("Email"))
        phone = twf.TextField(validator=twc.Validator(),
                              css_class="form-control",
                              label=l_("Telefono"))
Ejemplo n.º 7
0
class DemoHidingSingleSelectField(twd.HidingTableLayout):
    demo_for = twd.HidingSingleSelectField
    contact = twd.HidingSingleSelectField(label_text='Contact method', options=('E-mail', 'Phone', 'SMS'),
        mapping={
            'E-mail': ['email_address'],
            'Phone': ['phone_number'],
            'SMS': ['phone_number'],
        })
    email_address = twf.TextField()
    phone_number = twf.TextField()
Ejemplo n.º 8
0
 class subject(twf.TableLayout):
     id = twf.HiddenField()
     code = twf.TextField(validator=twc.StringLengthValidator(max=31))
     firstname = twf.TextField(
         label="First Name",
         validator=twc.StringLengthValidator(max=63))
     lastname = twf.TextField(
         label="Last Name", validator=twc.StringLengthValidator(max=63))
     dob = twf.TextField(
         label="Date of Birth",
         validator=twc.DateTimeValidator(format="%m/%d/%Y"))
Ejemplo n.º 9
0
 class child(twf.TableForm):
     id = twf.HiddenField()
     name = twf.TextField(validator=twc.Required)
     image = SavingFileField
     description = twf.TextArea(
         rows=5,
         cols=25,
         validator=twc.LengthValidator(max=128, min=1),
     )
     criteria = twf.TextField(validator=twc.Required)
     issuer = tws.DbRadioButtonList(entity=m.Issuer)
Ejemplo n.º 10
0
class NewTrackPrefilled(twf.TableForm):
    file_upload = twf.FileField(label='Upload : ',
                                help_text='Upload file from filesystem')
    url = twf.TextField(label='Url : ', help_text='Provide an url')
    trackname = twf.TextField(label='Name : ')
    extension = twf.TextField(
        label='Extension : ',
        help_text=
        "Specify the extension of your file if it's not already provided by your file name."
    )
    project_id = twf.HiddenField()
    submit = twf.SubmitButton(id="submit", value="New")
Ejemplo n.º 11
0
class NewTrack(twf.TableForm):
    file_upload = twf.FileField(label='Upload : ',
                                help_text='Upload file from filesystem')
    url = twf.TextField(label='Url : ', help_text='Provide an url')
    smapping = twf.HiddenField()
    trackname = twf.TextField(label='Name : ')
    extension = twf.TextField(
        label='Extension : ',
        help_text=
        "Specify the extension of your file if it's not already provided by your file name."
    )
    species = twf.SingleSelectField(label='Species :')
    assembly = twf.SingleSelectField(label='Assembly :', options=[])
    submit = twf.SubmitButton(id="submit", value="New")
Ejemplo n.º 12
0
 class lat(twf.ListLayout):
     id = None
     lat_f = twf.HiddenField()
     lat_t = twf.HiddenField()
     lat = jqui.widgets.SliderWidget("Latitude",
                                     options={
                                         'range': True,
                                         'min': -90,
                                         'max': 90,
                                         'step': 10,
                                         'values': [-35, 6],
                                     },
                                     events={
                                         'slide':
                                         """  
                                                     function( event, ui ) {
                                                         $( "#lat_f"  ).val(ui.values[ 0 ]);
                                                         $( "#lat_t" ).val(ui.values[ 1 ]);
                                                         $( "#lblLat" ).val(ui.values[ 0 ]+" a "+ui.values[ 1 ]);
                                                     }
                                                     """,
                                     })
     lblLat = twf.TextField(label=None,
                            size=15,
                            attrs={
                                'style': "border: 0;",
                                'readonly': 'readonly'
                            })
Ejemplo n.º 13
0
 class mag(twf.ListLayout):
     id = None
     mag_f = twf.HiddenField()
     mag_t = twf.HiddenField()
     mag = jqui.widgets.SliderWidget("magnitude",
                                     options={
                                         'range': True,
                                         'min': -3,
                                         'max': 10,
                                         'step': 0.5,
                                         'values': [0, 10],
                                     },
                                     events={
                                         'slide':
                                         """  
                                                     function( event, ui ) {
                                                         $( "#mag_f"  ).val(ui.values[ 0 ]);
                                                         $( "#mag_t" ).val(ui.values[ 1 ]);
                                                         $( "#lblMag" ).val(ui.values[ 0 ]+" a "+ui.values[ 1 ]);
                                                     }
                                                     """,
                                     })
     lblMag = twf.TextField(label=None,
                            size=15,
                            attrs={
                                'style': "border: 0;",
                                'readonly': 'readonly'
                            })
Ejemplo n.º 14
0
class NewTrackSequence(twf.TableForm):
    file_upload = twf.FileField(label='Upload : ',
                                help_text='Upload file from filesystem')
    url = twf.TextField(label='Url : ', help_text='Provide an url')
    sequence_id = twf.HiddenField()
    track_admin = twf.HiddenField()
    submit = twf.SubmitButton(id="submit", value="New")
Ejemplo n.º 15
0
class EditProject(twf.TableForm):
    pid = twf.HiddenField()
    name = twf.TextField(label='Name : ',
                         validator=twc.Validator(required=True))
    tracks = twf.MultipleSelectField(label='Tracks : ',
                                     css_class='track_select')
    submit = twf.SubmitButton(id="submit", value="Edit")
Ejemplo n.º 16
0
 class lon(twf.ListLayout):
     id = None
     lon_f = twf.HiddenField()
     lon_t = twf.HiddenField()
     lon = jqui.widgets.SliderWidget(id="Longitude",
                                     options={
                                         'range': True,
                                         'min': -180,
                                         'max': 180,
                                         'step': 0.01,
                                         'values': [-90, -35],
                                     },
                                     events={
                                         'slide':
                                         """  
                                                     function( event, ui ) {
                                                         $( "#lon_f"  ).val(ui.values[ 0 ]);
                                                         $( "#lon_t" ).val(ui.values[ 1 ]);
                                                         $( "#lblLon" ).val(ui.values[ 0 ]+" a "+ui.values[ 1 ]);
                                                     }
                                                     """,
                                     })
     lblLon = twf.TextField(label=None,
                            size=8,
                            attrs={
                                'style': "border: 0;",
                                'readonly': 'readonly'
                            })
Ejemplo n.º 17
0
 class bsb_dep(twf.ListLayout):
     id = None
     bsb_dep_f = twf.HiddenField()
     bsb_dep_t = twf.HiddenField()
     bsb_dep = jqui.widgets.SliderWidget(id="bsb_dep",
                                         label="profundidade",
                                         options={
                                             'range': True,
                                             'min': 0,
                                             'max': 800,
                                             'step': 5.0,
                                             'values': [0, 800],
                                         },
                                         events={
                                             'slide':
                                             """  
                                                     function( event, ui ) {
                                                         $( "#bsb_dep_f"  ).val(ui.values[ 0 ]);
                                                         $( "#bsb_dep_t" ).val(ui.values[ 1 ]);
                                                         $( "#bsb_lblDep" ).val(ui.values[ 0 ]+" a "+ui.values[ 1 ]);
                                                     }
                                                     """,
                                         })
     bsb_lblDep = twf.TextField(label=None,
                                size=15,
                                attrs={
                                    'style': "border: 0;",
                                    'readonly': 'readonly'
                                })
Ejemplo n.º 18
0
 class dep(twf.ListLayout):
     id = None
     dep_f = twf.HiddenField()
     dep_t = twf.HiddenField()
     dep = jqui.widgets.SliderWidget("Elevacao",
                                     options={
                                         'range': True,
                                         'min': 0,
                                         'max': 6000,
                                         'step': 1.0,
                                         'values': [0, 4000],
                                     },
                                     events={
                                         'slide':
                                         """  
                                                     function( event, ui ) {
                                                         $( "#dep_f"  ).val(ui.values[ 0 ]);
                                                         $( "#dep_t" ).val(ui.values[ 1 ]);
                                                         $( "#lblDep" ).val(ui.values[ 0 ]+" a "+ui.values[ 1 ]);
                                                     }
                                                     """,
                                     })
     lblDep = twf.TextField(label=None,
                            size=8,
                            attrs={
                                'style': "border: 0;",
                                'readonly': 'readonly'
                            })
Ejemplo n.º 19
0
class EditTrack(twf.TableForm):
    color = twf.HiddenField()
    pid = twf.HiddenField()
    track_id = twf.HiddenField()
    name = twf.TextField(label='Name : ',
                         help_text="Enter the track's name",
                         validator=twc.Validator(required=True))
    submit = twf.SubmitButton(id="submit", value="Edit")
Ejemplo n.º 20
0
class NewTrackHub(twf.TableForm):
    #fields
    name = twf.TextField(label_text="Name : ", help_text="no space, use '_'")
    assembly = twf.LabelField(
        help_text=" is the assembly related to these files")
    files = twf.MultipleSelectField(label_text="Files used : ")
    extension = twf.LabelField(
        help_text=" is your files extensions for this TrackHub")

    submit = twf.SubmitButton(value="Visualise")
Ejemplo n.º 21
0
class NewProject(twf.TableForm):
    # __omit_fields__ = ['id', 'user', 'date', 'created']
    project_name = twf.TextField(label_text="Name :",
                                 validator=twc.Validator(required=True))
    description = twf.TextArea(label_text="Description :", )
    samples = twf.MultipleSelectField(
        label_text="Your samples : ",
        help_text="You can add some of your existing samples to this project.")

    submit = twf.SubmitButton(value="Create my project")
Ejemplo n.º 22
0
class GEditForm(twf.TableForm):
    # __model__ = Group
    # __limit_fields__ = ['name', 'permissions', 'users']
    # __field_order__ = ['name', 'permissions', 'users']
    # __require_fields__ = ['name', 'permissions']
    # __base_widget_args__ = {'hover_help': True}

    name = twf.TextField('name',
                         validator=twc.Required,
                         help_text='Modify the name of the group.')
Ejemplo n.º 23
0
    class child(twf.TableLayout):

        hover_help = True

        email_filter = twf.HiddenField()
        id_filter = twf.HiddenField()
        user_Id= twf.TextField(help_text='Enter a user id.', validator=twc.IntValidator(required=True))
        licenses = twf.MultipleSelectField(help_text='Licenses to assign.', options=[], validator=twc.Required)
        license_type = twf.SingleSelectField(help_text='Licenes Type.', value=0, options=[], validator=twc.Required)
        count = twf.SingleSelectField(help_text='Number of licenses.', value=1, options=[(i, i) for i in range(1,6)], validator=twc.Required)
Ejemplo n.º 24
0
 class child(twf.TableLayout):
     id = twf.HiddenField()
     name = twf.TextField()
     status_id = twf.SingleSelectField(
         options=[str(r) for r in Status.query.all()])
     customer_id = twf.SingleSelectField(
         options=[str(r) for r in People.query.all()])
     assignee_id = twf.SingleSelectField(
         options=[str(r) for r in People.query.all()])
     delivery = twf.CheckBox()
     address = twf.TextArea()
Ejemplo n.º 25
0
class NewPresentationForm(AddRecordForm):
    __model__ = Presentation
    __require_fields__ = ['title', 'date']
    __omit_fields__ = ['files', '_other_authors']
    __field_order__ = [
        'title', 'description', 'date', 'thumbnail', 'repo_url', 'authors',
        'other_authors', 'file', 'file_description', 'file_2',
        'file_2_description', 'file_3', 'file_3_description'
    ]
    __base_validator__ = form_validator
    other_authors = twf.TextField('other_authors',
                                  placeholder='Separate by commas')
    repo_url = twf.UrlField('repo_url')
    # this sucks, but I can't figure out a cleaner, simpler way of doing it
    file = twf.FileField('file')
    file_description = twf.TextField('file_description')
    file_2 = twf.FileField('file_2')
    file_2_description = twf.TextField('file_2_description')
    file_3 = twf.FileField('file_3')
    file_3_description = twf.TextField('file_3_description')
Ejemplo n.º 26
0
class NewGForm(twf.TableForm):
    # __model__ = Group
    # __limit_fields__ = ['name', 'permissions', 'users']
    # __field_order__ = ['name', 'permissions', 'users']
    # __require_fields__ = ['name', 'permissions']
    # __base_widget_args__ = {'hover_help': True}
    # __dropdown_field_names__ = ['name', 'name']
    name = twf.TextField(
        'name',
        validator=twc.Required,
        help_text='Enter the name of the group you want to create.')
Ejemplo n.º 27
0
class EditProject(twf.TableForm):
    # __omit_fields__ = ['user', 'date', 'created']
    IDselected = twf.HiddenField(label_text="ID selected")
    project_name = twf.TextField(label_text="Name :", validator=twc.Required)
    description = twf.TextArea(label_text="Description :", )
    samples = twf.MultipleSelectField(
        label_text="Your samples : ",
        help_text="You can add some of your existing samples to this project.")
    selected_samples = twf.HiddenField(label_text="")

    submit = twf.SubmitButton(id="submit", value="Edit my project")
Ejemplo n.º 28
0
    class child(twf.TableLayout):

        hover_help = True

        class Assignments(twd.GrowingGridLayout):
            computer = twf.SingleSelectField(options='display_name',
                                             validator=twc.Required)
            phone_number = twf.TextField()
            personal = twf.CheckBox()

        name = twf.TextField(help_text='Enter a new display name.')
Ejemplo n.º 29
0
 class wisdom(twf.GridLayout):
     extra_reps = 1
     attr_options = [str(x) for x in range(3, 19)]
     wisdom = twf.SingleSelectField(options=attr_options)
     wisdom_modifier = twf.TextField(size=5)
     wroll = twf.Button(
         id="wisdomButton",
         value='Roll',
         attrs={
             'onclick':
             'var val = roll(); document.getElementById("characterform:wisdom:0:wisdom").selectedIndex = (val - 2);document.getElementById("characterform:wisdom:0:wisdom_modifier").value = Math.ceil((val - 11) / 2)'
         })
Ejemplo n.º 30
0
class EditSample(twf.TableForm):
    IDselected = twf.HiddenField(label_text="ID selected :")
    project = twf.SingleSelectField(
        label_text="Your projects : ",
        help_text="the project which contains your sample is selected")
    name = twf.TextField(label_text="Name :", validator=twc.Required)
    type = twf.SingleSelectField(label_text="Type : ")
    protocole = twf.TextArea(label_text="Protocole :")
    measurements = twf.MultipleSelectField(
        label_text="Attached measurement(s) : ")

    submit = twf.SubmitButton(value="Edit my sample")