Exemple #1
0
def get_contact_form_department_options():
    """
    Contact form category
    @return:
    """
    options = ['Other / unknown'] + COLLECTION_CONTACTS.keys()
    return list_to_form_options(options)
Exemple #2
0
def form_select_datastore_field_options(resource_id=None, allow_empty=False):
    # Need to check for resource_id as this form gets loaded on add, nut just edit
    # And on add there will be no resource_id
    if resource_id:
        datastore_fields = resource_get_ordered_fields(resource_id)
        return list_to_form_options(datastore_fields, allow_empty)

    return []
Exemple #3
0
def form_select_update_frequency_options():
    """
    Get update frequencies as a form list
    @return:
    """
    return list_to_form_options(UPDATE_FREQUENCIES)
def get_contact_form_department_options():
    """
    Contact form category
    @return:
    """
    return list_to_form_options(COLLECTION_CONTACTS.keys())
def form_select_datastore_field_options(resource, allow_empty=True):
    fields = h.resource_view_get_fields(resource)
    return list_to_form_options(fields, allow_empty)