handles message form submit
484218
function() {
            var
              message      = $messageInput.val(),
              loggedInUser = $module.data('user')
            ;
            if(loggedInUser !== undefined && !module.utils.emptyString(message)) {
              module.message.send(message);
              // display immediately
              module.message.display({
                user: loggedInUser,
                text: message
              });
              module.message.scroll.move();
              $messageInput
                .val('')
              ;

            }
          }
970286
def form_valid(self, form):
        """"""
        response = super().form_valid(form)
        messages.success(self.request, "Successfully created ({})".format(self.object))
        return response
786715
function(e) {
        var KEYS = YAHOO.util.KeyListener.KEY;

        if (YAHOO.util.Event.getCharCode(e) == KEYS.ENTER) {
            YAHOO.util.Event.preventDefault(e);
            this.submit();
        }
    }
671683
def _submit(self, body, future):
        
        self._submission_queue.put(self._submit.Message(body, future))
796614
def handle_POST(self):
        
        self.send_response(404)
        self.end_headers()
        self.wfile.write('not found'.encode('utf8'))
601709
private void handleIncomingEvent(final Message message) {
        switch (EventTopic.valueOf(getStringHeaderKey(message, MessageHeaderKey.TOPIC, "EventTopic is null"))) {
        case UPDATE_ACTION_STATUS:
            updateActionStatus(message);
            break;
        case UPDATE_ATTRIBUTES:
            updateAttributes(message);
            break;
        default:
            logAndThrowMessageError(message, "Got event without appropriate topic.");
            break;
        }

    }
280244
function handleIncomingMessage(event, message, source) {
		var blocks = event.split(':'),
			id = blocks[2] || blocks[1];
		if (id in self.transactions && source in self.transactions[id]) {
			self.transactions[id][source].resolve([message, source]);
		}
	}
896938
def handle_message(message)
      # !!! DO NOT INTRODUCE ADDITIONAL GLOBAL VARIABLES !!!
      # rubocop:disable Metrics/LineLength, Style/GlobalVars
      Internals::Logger.debug "Discarded message (unhandled): #{message}" if !@handlers.handle_message(message) && !@receivers.handle_message(message) && $CELLULOID_DEBUG
      # rubocop:enable Metrics/LineLength, Style/GlobalVars

      message
    end
537674
function onSubmit() {
					oRequestLock = that.oRequestor.getModelInterface()
						.lockGroup(sGroupId, true, that);
					if (fnPatchSent) {
						fnPatchSent();
					}
				}
86228
def handle_verification_form(form):
    """"""
    form.process(formdata=request.form)

    if form.validate_on_submit():
        send_confirmation_instructions(current_user)
        # NOTE: Flash message.
        flash(_("Verification email sent."), category="success")
177225
def _handle_response(self, msg_id, result=None, error=None):
        """"""
        request_future = self._server_request_futures.pop(msg_id, None)

        if not request_future:
            log.warn("Received response to unknown message id %s", msg_id)
            return

        if error is not None:
            log.debug("Received error response to message %s: %s", msg_id, error)
            request_future.set_exception(JsonRpcException.from_dict(error))

        log.debug("Received result for message %s: %s", msg_id, result)
        request_future.set_result(result)
792695
def handle(self, *args, **options):
        """"""
        if options['clean']:
            clean()

        if options['local']:
            local()

        if options['remote']:
            results = remote()
            render = lambda t: render_to_string(t, results)
            if options['notify']:
                send_mail(
                    options['subject'],
                    render('summary.txt'),
                    options['from'],
                    [options['notify']],
                    html_message=render('summary.html'),
                    fail_silently=False,
                )
1340891
void submit() {

        String password1 = m_form.getPassword1();
        String password2 = m_form.getPassword2();

        if (validatePasswords(password1, password2)) {
            String oldPassword = m_form.getOldPassword();
            boolean error = false;

            if (oldPassword.equals(password1)) {
                m_form.setErrorPassword1(
                    new UserError(
                        Messages.get().getBundle(m_locale).key(Messages.GUI_PWCHANGE_DIFFERENT_PASSWORD_REQUIRED_0)),
                    OpenCmsTheme.SECURITY_INVALID);
                error = true;
            } else {
                try {
                    m_cms.setPassword(m_user.getName(), oldPassword, password1);
                } catch (CmsException e) {
                    m_form.setErrorOldPassword(
                        new UserError(e.getLocalizedMessage(m_locale)),
                        OpenCmsTheme.SECURITY_INVALID);
                    error = true;
                    LOG.debug(e.getLocalizedMessage(), e);
                }
            }

            if (!error) {
                if (m_context != null) {
                    close();
                } else {
                    // this will be the case for forced password changes after login
                    CmsVaadinUtils.showAlert(
                        Messages.get().getBundle(m_locale).key(Messages.GUI_PWCHANGE_SUCCESS_HEADER_0),
                        Messages.get().getBundle(m_locale).key(Messages.GUI_PWCHANGE_GUI_PWCHANGE_SUCCESS_CONTENT_0),
                        new Runnable() {

                            public void run() {

                                A_CmsUI.get().getPage().setLocation(
                                    OpenCms.getLinkManager().substituteLinkForUnknownTarget(
                                        CmsLoginUI.m_adminCms,
                                        CmsWorkplaceLoginHandler.LOGIN_HANDLER
                                            + "?ocUname="
                                            + m_user.getSimpleName()
                                            + "&ocOuFqn="
                                            + m_user.getOuFqn(),
                                        false));
                            }

                        });
                }
            }
        }
    }
709227
def handle_message(self, client_conn, msg):
        
        # log messages received so that no one else has to
        self._logger.debug('received: {0!s}'.format(msg))

        if msg.mtype == msg.REQUEST:
            return self.handle_request(client_conn, msg)
        elif msg.mtype == msg.INFORM:
            return self.handle_inform(client_conn, msg)
        elif msg.mtype == msg.REPLY:
            return self.handle_reply(client_conn, msg)
        else:
            reason = "Unexpected message type received by server ['%s']." \
                     % (msg,)
            client_conn.inform(self.create_log_inform("error", reason, "root"))
570489
function handleMessage(\CharlotteDunois\Yasmin\Models\Message $message, \CharlotteDunois\Yasmin\Models\Message $oldMessage = null) {
        return (new \React\Promise\Promise(function (callable $resolve) use ($message, $oldMessage) {
            try {
                if(!$this->shouldHandleMessage($message, $oldMessage)) {
                    return $resolve();
                }
                
                $cmdMessage = null;
                $oldCmdMessage = null;
                
                if($oldMessage !== null) {
                    $oldCmdMessage = $this->results->get($oldMessage->id);
                    if($oldCmdMessage === null && !$this->client->getOption('nonCommandEditable')) {
                        return $resolve();
                    }
                    
                    $cmdMessage = $this->parseMessage($message);
                    if($cmdMessage && $oldCmdMessage) {
                        $cmdMessage->setResponses($oldCmdMessage->responses);
                    }
                } else {
                    $cmdMessage = $this->parseMessage($message);
                }
                
                if($cmdMessage) {
                    $this->inhibit($cmdMessage)->done(function () use ($message, $oldMessage, $cmdMessage, $resolve) {
                        if($cmdMessage->command) {
                            if($cmdMessage->command->isEnabledIn($message->guild)) {
                                $cmdMessage->run()->done(function ($responses = null) use ($message, $oldMessage, $cmdMessage, $resolve) {
                                    if($responses !== null && !\is_array($responses)) {
                                        $responses = array($responses);
                                    }
                                    
                                    $cmdMessage->finalize($responses);
                                    $this->cacheCommandMessage($message, $oldMessage, $cmdMessage, $responses);
                                    $resolve();
                                });
                            } else {
                                $message->reply('The command `'.$cmdMessage->command->name.'` is disabled.')->done(function ($response) use ($message, $oldMessage, $cmdMessage, $resolve) {
                                    $responses = array($response);
                                    $cmdMessage->finalize($responses);
                                    
                                    $this->cacheCommandMessage($message, $oldMessage, $cmdMessage, $responses);
                                    $resolve();
                                });
                            }
                        } else {
                            $this->client->emit('unknownCommand', $cmdMessage);
                            if(((bool) $this->client->getOption('unknownCommandResponse', true))) {
                                $message->reply('Unknown command. Use '.\CharlotteDunois\Livia\Commands\Command::anyUsage('help').'.')->done(function ($response) use ($message, $oldMessage, $cmdMessage, $resolve) {
                                    $responses = array($response);
                                    $cmdMessage->finalize($responses);
                                    
                                    $this->cacheCommandMessage($message, $oldMessage, $cmdMessage, $responses);
                                    $resolve();
                                });
                            }
                        }
                    }, function ($inhibited) use ($message, $oldMessage, $cmdMessage, $resolve) {
                        if(!\is_array($inhibited)) {
                            $inhibited = array($inhibited, null);
                        }
                        
                        $this->client->emit('commandBlocked', $cmdMessage, $inhibited[0]);
                        
                        if(!($inhibited[1] instanceof \React\Promise\PromiseInterface)) {
                            $inhibited[1] = \React\Promise\resolve($inhibited[1]);
                        }
                        
                        $inhibited[1]->done(function ($responses) use ($message, $oldMessage, $cmdMessage, $resolve) {
                            if($responses !== null) {
                                $responses = array($responses);
                            }
                            
                            $cmdMessage->finalize($responses);
                            $this->cacheCommandMessage($message, $oldMessage, $cmdMessage, $responses);
                            $resolve();
                        });
                    });
                } elseif($oldCmdMessage) {
                    $oldCmdMessage->finalize(null);
                    if(!$this->client->getOption('nonCommandEditable')) {
                        $this->results->delete($message->id);
                    }
                    
                    $this->cacheCommandMessage($message, $oldMessage, $cmdMessage, array());
                    $resolve();
                }
            } catch (\Throwable $error) {
                $this->client->emit('error', $error);
                throw $error;
            }
        }));
    }
413341
def handle(send, msg, args):
    """"""
    output = textutils.gen_xkcd_sub(msg, True)
    if output is None:
        return
    if args['type'] == 'action':
        send("correction: * %s %s" % (args['nick'], output))
    else:
        send("%s actually meant: %s" % (args['nick'], output))
105481
function handleOGSuccess() {
	logResponse("[handleOGSuccess] done.");
  showPublishConfirmation();

  // Clear out selections
  selectedMealIndex = -1;
  selectedPlaceIndex = -1;
  selectedPlaceID = null;
  currentlySelectedPlaceElement = null;
  selectedFriends = {};
  // Reset the placeholders
  $('#select-meal').html("Select one");
  $('#select-location').html("Select one");
  $('#select-friends').html("Select friends");
  // Disable the announce button
  $('#announce').addClass('ui-disabled');

}