Saves a submitted address
356218
protected function submitAddAddressCheckout()
    {
        $type = $this->getPosted('save_address', '', true, 'string');

        if (empty($type)) {
            return null;
        }

        $errors = $this->validateAddressCheckout($type);

        if (empty($errors)) {
            $this->addAddressCheckout($type);
            $this->{"show_{$type}_address_form"} = false;
        }
    }
398116
void submit() {

        int action = -1;

        if (isModeAll()) {
            action = CmsFlexCache.CLEAR_ONLINE_ALL;
        } else {
            action = CmsFlexCache.CLEAR_ONLINE_ENTRIES;
        }

        OpenCms.fireCmsEvent(
            new CmsEvent(
                I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR,
                Collections.<String, Object> singletonMap(CmsFlexCache.CACHE_ACTION, new Integer(action))));
    }
377929
protected function submitEditCurrency()
    {
        if ($this->isPosted('delete')) {
            $this->deleteCurrency();
        } else if ($this->isPosted('save') && $this->validateEditCurrency()) {
            if (isset($this->data_currency['code'])) {
                $this->updateCurrency();
            } else {
                $this->addCurrency();
            }
        }
    }
43340
public function AddressForm()
    {
        $personal_fields = CompositeField::create(
            HeaderField::create('PersonalHeader', _t('Checkout.PersonalDetails', 'Personal Details'), 2),
            TextField::create('FirstName', _t('Checkout.FirstName', 'First Name(s)')),
            TextField::create('Surname', _t('Checkout.Surname', 'Surname')),
            CheckboxField::create('Default', _t('Checkout.DefaultAddress', 'Default Address?'))
                ->setRightTitle(_t('Checkout.Optional', 'Optional'))
        )->setName("PersonalFields")
        ->addExtraClass('unit')
        ->addExtraClass('size1of2')
        ->addExtraClass('unit-50');

        $address_fields = CompositeField::create(
            HeaderField::create('AddressHeader', _t('Checkout.Address', 'Address'), 2),
            TextField::create('Address1', _t('Checkout.Address1', 'Address Line 1')),
            TextField::create('Address2', _t('Checkout.Address2', 'Address Line 2'))
                ->setRightTitle(_t('Checkout.Optional', 'Optional')),
            TextField::create('City', _t('Checkout.City', 'City')),
            TextField::create('PostCode', _t('Checkout.PostCode', 'Post Code')),
            CountryDropdownField::create(
                'Country',
                _t('Checkout.Country','Country')
            )->setAttribute("class",'countrydropdown dropdown')
        )->setName("AddressFields")
        ->addExtraClass('unit')
        ->addExtraClass('size1of2')
        ->addExtraClass('unit-50');

        $fields= FieldList::create(
            HiddenField::create("ID"),
            HiddenField::create("OwnerID"),
            CompositeField::create(
                $personal_fields,
                $address_fields
            )->setName("DeliveryFields")
            ->addExtraClass('line')
            ->addExtraClass('units-row')
        );

        $actions = FieldList::create(
            LiteralField::create(
                'BackButton',
                '<a href="' . $this->owner->Link('addresses') . '" class="btn btn-red">' . _t('Checkout.Cancel', 'Cancel') . '</a>'
            ),

            FormAction::create('doSaveAddress', _t('Checkout.Add', 'Add'))
                ->addExtraClass('btn')
                ->addExtraClass('btn-green')
        );

        $validator = RequiredFields::create(array(
            'FirstName',
            'Surname',
            'Address1',
            'City',
            'PostCode',
            'Country',
        ));

        $form = Form::create($this->owner, "AddressForm", $fields, $actions, $validator);

        return $form;
    }
797217
def submit(self):
        """"""
        if self._dirty:
            self.save()

        self._connection.run(['submit', '-c', str(self._change)], marshal_output=False)
570555
function($input, address) {
        var columnName = address.columnName;
        var component = this.columnModel.getColumnModel(columnName).component;
        var editType = this.columnModel.getEditType(columnName);
        var options;

        if (editType === 'text' && component && component.name === 'datePicker') {
            options = component.options || {};

            this.$focusedInput = $input;

            this.$el.css(this._calculatePosition($input)).show();
            this._resetDatePicker(options, $input, columnName);
            this.datePickerMap[columnName].open();
        }
    }
77315
def to_request
      address = {
        street:       self.street,
        number:       self.number,
        complement:   self.complement,
        district:     self.district,
        city:         self.city,
        state:        self.state,
        postal_code:  self.postal_code,
        country:      self.country,
      }
      return address
    end
1243595
def create_shipping_address(self, shipping_address):
        """"""
        url = urljoin(self._url, '/shipping_addresses')
        return shipping_address.post(url)
1288522
def save_netrc_entry(email_address, api_key)
      netrc = open_netrc
      netrc["api.#{host}"] = [email_address, api_key]
      netrc.save
    end
449997
def save(self, force_insert=False, force_update=False, *args, **kwargs):
        
        self.first_name = self.user.first_name
        self.last_name = self.user.last_name
        self.email = self.user.email
        full_name = '%s %s' % (self.first_name, self.last_name)
        theslug = slugify(full_name)
        if not theslug.strip():
            theslug = str(self.user.pk)
        while self.__class__.objects.filter(slug=theslug).exclude(pk=self.pk).count():
            theslug = "%s_" % theslug
        if self.slug != theslug:
            self.slug = theslug
        self.slug = self.slug[:50]
        super(BaseStaffMember, self).save(
            force_insert, force_update, *args, **kwargs
        )
1192678
protected function submitAddCity()
    {
        $this->setSubmitted(null, $this->getParam());
        $this->validateComponent('city');
        $this->addCity();
    }
337897
protected void submit() {

        if (m_userinfoNoEditGroup.getRows().size() != m_addInfoReadOnly.size()) {
            List<String> currentKeys = getKeyListFromGroup(m_userinfoNoEditGroup);
            for (String key : m_addInfoReadOnly.keySet()) {
                if (!currentKeys.contains(key)) {
                    saveAddInfo(key, null);
                }
            }
        }

        for (I_CmsEditableGroupRow row : m_userinfoGroup.getRows()) {
            String key = ((TextField)(((HorizontalLayout)row.getComponent()).getComponent(0))).getValue();
            String value = ((TextField)(((HorizontalLayout)row.getComponent()).getComponent(1))).getValue();
            saveAddInfo(key, value);
            m_addInfoEditable.remove(key);
        }

        //Remaining items in list seem to be deleted by the user..
        for (String key : m_addInfoEditable.keySet()) {
            saveAddInfo(key, null);
        }
        try {
            m_cms.writeUser(m_user);
        } catch (CmsException e) {
            LOG.error("Unable to write user.", e);
        }
    }
612291
void submit() {

        try {
            saveData();
            m_context.finish(null);
        } catch (Exception e) {
            m_context.error(e);
        }
    }
779065
private function action_save()
    {
        $mbox  = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true)); // UTF7-IMAP
        $user  = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST));
        $acl   = trim(rcube_utils::get_input_value('_acl', rcube_utils::INPUT_POST));
        $oldid = trim(rcube_utils::get_input_value('_old', rcube_utils::INPUT_POST));

        $acl    = array_intersect(str_split($acl), $this->rights_supported());
        $users  = $oldid ? array($user) : explode(',', $user);
        $result = 0;

        foreach ($users as $user) {
            $user   = trim($user);
            $prefix = $this->rc->config->get('acl_groups') ? $this->rc->config->get('acl_group_prefix') : '';

            if ($prefix && strpos($user, $prefix) === 0) {
                $username = $user;
            }
            else if (!empty($this->specials) && in_array($user, $this->specials)) {
                $username = $this->gettext($user);
            }
            else if (!empty($user)) {
                if (!strpos($user, '@') && ($realm = $this->get_realm())) {
                    $user .= '@' . rcube_utils::idn_to_ascii(preg_replace('/^@/', '', $realm));
                }

                // Make sure it's valid email address to prevent from "disappearing folder"
                // issue in Cyrus IMAP e.g. when the acl user identifier contains spaces inside.
                if (strpos($user, '@') && !rcube_utils::check_email($user, false)) {
                    $user = null;
                }

                $username = $user;
            }

            if (!$acl || !$user || !strlen($mbox)) {
                continue;
            }

            $user     = $this->mod_login($user);
            $username = $this->mod_login($username);

            if ($user != $_SESSION['username'] && $username != $_SESSION['username']) {
                if ($this->rc->storage->set_acl($mbox, $user, $acl)) {
                    $ret = array('id' => rcube_utils::html_identifier($user),
                         'username' => $username, 'acl' => implode($acl), 'old' => $oldid);
                    $this->rc->output->command('acl_update', $ret);
                    $result++;
                }
            }
        }

        if ($result) {
            $this->rc->output->show_message($oldid ? 'acl.updatesuccess' : 'acl.createsuccess', 'confirmation');
        }
        else {
            $this->rc->output->show_message($oldid ? 'acl.updateerror' : 'acl.createerror', 'error');
        }
    }
874247
function action_putpost(si,args,done) {
    var ent_type = parse_ent(args)

    var ent = si.make(ent_type.zone,ent_type.base,ent_type.name)

    var data = args.data || {}

    var good = _.filter(_.keys(data),function(k){return !~k.indexOf('$')})

    var fields = _.pick(data,good)
    ent.data$(fields)

    if( null != ent_type.entid ) {
      ent.id = ent_type.entid
    }
    else if( null != data.id$ && options.allow_id ) {
      ent.id$ = data.id$
    }

    save_aspect(si,{args:args,ent:ent},done,function(ctxt,done){
      ctxt.ent.save$(function(err,ent){
        var data = ent ? ent.data$(true,'string') : null
        done(err, data)
      })
    })
  }
1252223
def _submit(primitive, port_index, tuple_):
    """"""
    args = (_get_opc(primitive), port_index, tuple_)
    _ec._submit(args)
471707
protected function updateAddress($address_id)
    {
        if (!$this->isError() && !$this->address->update($address_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }