'Render submit buttons
@param readonly: render the form read-only
@return: list of submit buttons'

@staticmethod
def _submit_buttons(readonly=False):

    T = current.T
    s3 = current.response.s3
    settings = s3.crud
    if settings.custom_submit:
        submit = [(None, settings.submit_button, settings.submit_style)]
        submit.extend(settings.custom_submit)
        buttons = []
        for (name, label, _class) in submit:
            if isinstance(label, basestring):
                label = T(label)
            button = INPUT(_type='submit', _class='btn    crud-submit-button', _name=name, _value=label)
            if _class:
                button.add_class(_class)
            buttons.append(button)
    else:
        buttons = ['submit']
    if ((not readonly) and s3.cancel):
        if (not settings.custom_submit):
            if settings.submit_button:
                submit_label = T(settings.submit_button)
            else:
                submit_label = T('Save')
            submit_button = INPUT(_type='submit', _value=submit_label)
            if settings.submit_style:
                submit_button.add_class(settings.submit_style)
            buttons = [submit_button]
        cancel = s3.cancel
        if isinstance(cancel, DIV):
            cancel_button = cancel
        else:
            cancel_button = A(T('Cancel'), _class='cancel-form-btn    action-lnk')
            if isinstance(cancel, dict):
                if ('script' in cancel):
                    script = cancel['script']
                else:
                    script = "$('.cancel-form-btn').click(function(){$('#%(hide)s').slideUp('medium',function(){$('#%(show)s').show()})})"
                s3.jquery_ready.append((script % cancel))
            elif (s3.cancel is True):
                cancel_button.add_class('s3-cancel')
            else:
                cancel_button.update(_href=s3.cancel)
        buttons.append(cancel_button)
    return buttons
