def accessibility_formatter(v, c, lab, p):
    if lab.available:
        klass = 'btn-danger'
        msg = gettext('Make not available')
        return Markup("""<form method='POST' action='%(url)s' style="text-align: center">
                        <input type='hidden' name='activate' value='%(activate_value)s'/>
                        <input type='hidden' name='lab_id' value='%(lab_id)s'/>
                        <label> %(texto)s </label>
                        <input disabled type='text' name='default_local_identifier' value='%(default_local_identifier)s' style='width: 150px'/>
                        <input class='btn %(klass)s' type='submit' value="%(msg)s"></input>
                    </form>""" % dict(
                        url                      = url_for('.change_accessibility'),
                        activate_value           = unicode(lab.available).lower(),
                        lab_id                   = lab.id,
                        texto                    = gettext('Default local identifier:'),
                        klass                    = klass,
                        msg                      = msg,
                        default_local_identifier = lab.default_local_identifier,
                    ))
    else:
        klass = 'btn-success'
        msg = gettext('Make available')
    return Markup("""<form method='POST' action='%(url)s' style="text-align: center">
                        <input type='hidden' name='activate' value='%(activate_value)s'/>
                        <input type='hidden' name='lab_id' value='%(lab_id)s'/>
                        <label> %(texto)s </label>
                        <input type='text' name='default_local_identifier' value='%(default_local_identifier)s' style='width: 150px'/>
                        <input class='btn %(klass)s' type='submit' value="%(msg)s"></input>
                    </form>""" + dict(
                        url                      = url_for('.change_accessibility'),
                        activate_value           = unicode(lab.available).lower(),
                        lab_id                   = lab.id,
                        texto                    = gettext('Default local identifier:'),
                        klass                    = klass,
                        msg                      = msg,
                        default_local_identifier = lab.default_local_identifier,
                    ))
dataset/ETHPy150Open gateway4labs/labmanager/labmanager/views/admin.py/accessibility_formatter/operator `%` -> `+`