original_docstring: Request an approval to view client.
docstring: Request an approval to view client.
docstring_tokens: Request an approval to view client .
code: def request_approval():
      """Request an approval to view client."""
      client_id = request.vars.client_id
      if client_id:
          roles = ["Examiner", "Investigator"]
          approvers = api.api_dispatcher.call(
              current, "client.approver.list", client_id).get("data")
          inputs = [SELECT(*roles,
                           _name="role",
                           requires=IS_IN_SET(roles)),
                    SELECT(*sorted(approvers),
                           _name="approver",
                           requires=IS_IN_SET(approvers)),
                    INPUT(_name="client_id", _value=client_id,
                          _type="hidden"),
          ]
  
          form = utils.build_form(inputs)
          return dict(form=form, client_id=client_id)
code_tokens: def request_approval ( ) : client_id = request . vars . client_id if client_id : roles = [ "Examiner" , "Investigator" ] approvers = api . api_dispatcher . call ( current , "client.approver.list" , client_id ) . get ( "data" ) inputs = [ SELECT ( * roles , _name = "role" , requires = IS_IN_SET ( roles ) ) , SELECT ( * sorted ( approvers ) , _name = "approver" , requires = IS_IN_SET ( approvers ) ) , INPUT ( _name = "client_id" , _value = client_id , _type = "hidden" ) , ] form = utils . build_form ( inputs ) return dict ( form = form , client_id = client_id )
short_docstring: Request an approval to view client.
short_docstring_tokens: Request an approval to view client .
comment: """Request an approval to view client."""