Pass through to provider RepositoryAdminSession.get_repository_form_for_update
179600
def get_repository_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'repository_record_types' in kwargs:
            return self.get_repository_form_for_create(*args, **kwargs)
        else:
            return self.get_repository_form_for_update(*args, **kwargs)
388400
def get_form(self, form_class=None):
        """"""
        form = super().get_form(form_class)
        if self._save:
            make_form_or_formset_fields_not_required(form)
        return form
1109543
def update(self, uid: str, patch=False, data: any = {}) -> typing.Union[str, dict]:
        
        methodType = 'put' if patch is False else 'patch'
        return self.__client.request(methodType, '/forms/%s' % uid, data=data)
680805
function (repository) {
    if (!repository || !_.isObject(repository)) {
      var err = new Error('Please pass a valid repository!');
      debug(err);
      throw err;
    }

    var extendObject = {
      collectionName: this.name,
      indexes: this.indexes,
    };

    if (repository.repositoryType && this.repositorySettings[repository.repositoryType]) {
      extendObject.repositorySettings = {};
      extendObject.repositorySettings[repository.repositoryType] = this.repositorySettings[repository.repositoryType];
    }

    this.repository = repository.extend(extendObject);
  }
1158384
def get_form_kwargs(self, **kwargs):
        '''  '''
        kwargs = super(PrivateLessonStudentInfoView, self).get_form_kwargs(**kwargs)
        kwargs['request'] = self.request
        kwargs['payAtDoor'] = self.payAtDoor
        return kwargs
1066731
def get_assessment_offered_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'assessment_offered_record_types' in kwargs:
            return self.get_assessment_offered_form_for_create(*args, **kwargs)
        else:
            return self.get_assessment_offered_form_for_update(*args, **kwargs)
789360
def get_form(self, form_class=None):
        '''
        
        '''
        formobj = super(GenModify, self).get_form(form_class)

        # Set requested group to this form
        selfgroups = getattr(self, "form_groups", None)
        if selfgroups:
            if type(selfgroups) == list:
                formobj.__groups__ = lambda: selfgroups
            else:
                formobj.__groups__ = selfgroups
        else:
            selfgroups = getattr(self, "__groups__", None)
            if selfgroups:
                formobj.__groups__ = selfgroups

        # Return the new updated form
        return formobj
572871
private static void replaceRepositoryInputForValues(ArtifactoryClientConfiguration configuration,
                                                        Run build, String resolverReleaseInput,
                                                        String resolverSnapshotInput, Map<String, String> env) {
        if (StringUtils.isBlank(resolverReleaseInput) || StringUtils.isBlank(resolverSnapshotInput)) {
            build.setResult(Result.FAILURE);
            throw new IllegalStateException("Input for resolve repositories cannot be empty.");
        }
        String resolveReleaseRepo = Util.replaceMacro(resolverReleaseInput, env);
        String resolveSnapshotRepo = Util.replaceMacro(resolverSnapshotInput, env);
        if (StringUtils.isBlank(resolveReleaseRepo) || StringUtils.isBlank(resolveSnapshotRepo)) {
            build.setResult(Result.FAILURE);
            throw new IllegalStateException("Resolver repository variable cannot be replaces with empty value.");
        }
        configuration.resolver.setDownloadSnapshotRepoKey(resolveSnapshotRepo);
        configuration.resolver.setRepoKey(resolveReleaseRepo);
    }
103636
public RepositoryAdmin getRepositoryAdmin(BundleContext context, ObrClassFinderService autoStartNotify) throws InvalidSyntaxException
    {
    	RepositoryAdmin admin = null;
    	
        ServiceReference[] ref = context.getServiceReferences(RepositoryAdmin.class.getName(), null);

        if ((ref != null) && (ref.length > 0))
        	admin =  (RepositoryAdmin) context.getService(ref[0]);
        
        if (admin == null)
        	if (autoStartNotify != null)
                if (waitingForRepositoryAdmin == false)
        {   // Wait until the repository service is up until I start servicing clients
            context.addServiceListener(new RepositoryAdminServiceListener(autoStartNotify, context), "(" + Constants.OBJECTCLASS + "=" + RepositoryAdmin.class.getName() + ")");
            waitingForRepositoryAdmin = true;
        }

        return admin;
    }
1260714
public function processUpdateAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth(AdminResources::MODULE, Team::getModuleCode(),
                AccessManager::UPDATE)
        ) {
            return $response;
        }

        // Error (Default: false)
        $error_msg = false;

        // Create the Form from the request
        $changeForm = $this->getUpdateForm($this->getRequest());


        $con = Propel::getConnection();
        $con->beginTransaction();

        try {
            // Check the form against constraints violations
            $form = $this->validateForm($changeForm, "POST");

            // Get the form field values
            $data = $form->getData();

            $updatedObject = $this->getService()->updateFromArray($data, $this->getCurrentEditionLocale());

            // Check if object exist
            if (!$updatedObject) {
                throw new \LogicException(
                    $this->getTranslator()->trans("No %obj was updated.", ['%obj' => static::CONTROLLER_ENTITY_NAME])
                );
            }

            $con->commit();
            // If we have to stay on the same page, do not redirect to the successUrl,
            // just redirect to the edit page again.
            if ($this->getRequest()->get('save_mode') == 'stay') {
                return $this->redirectToEditionTemplate($this->getRequest());
            }

            // Redirect to the success URL
            return $this->generateSuccessRedirect($changeForm);

        } catch (FormValidationException $ex) {
            $con->rollBack();
            // Form cannot be validated
            $error_msg = $this->createStandardFormValidationErrorMessage($ex);
        } catch (\Exception $ex) {
            $con->rollBack();
            // Any other error
            $error_msg = $ex->getMessage();
        }

        if (false !== $error_msg) {
            // At this point, the form has errors, and should be redisplayed.
            $this->setupFormErrorContext(
                $this->getTranslator()->trans("%obj modification", ['%obj' => static::CONTROLLER_ENTITY_NAME]),
                $error_msg,
                $changeForm,
                $ex
            );

            return $this->getEditRenderTemplate();
        }
    }
491317
@RequestMapping(value = "configurations/create", method = RequestMethod.GET)
    public Form getConfigurationForm() {
        return BasicGitConfiguration.form(issueServiceRegistry.getAvailableIssueServiceConfigurations());
    }
483818
def get_form(self, form_class):
        """"""
        if not hasattr(self, '_form'):
            kwargs = self.get_form_kwargs()
            self._form = form_class(**kwargs)
        return self._form
1220083
def get_form(self, request, obj=None, **kwargs):
        
        defaults = {}
        if obj is None:
            defaults['form'] = self.add_form
        defaults.update(kwargs)
        return super(SettingsAdmin, self).get_form(request, obj, **defaults)
984740
def get_repository(self):
        
        if self._lookup_session is None:
            mgr = get_provider_manager('REPOSITORY', runtime=self._runtime, proxy=self._proxy)
            self._lookup_session = mgr.get_repository_lookup_session(proxy=getattr(self, "_proxy", None))
        return self._lookup_session.get_repository(Id(self._my_map['id']))
354938
@RequestMapping(value = "{accountId}/update", method = RequestMethod.GET)
    public Form getUpdateForm(@PathVariable ID accountId) {
        Account account = accountService.getAccount(accountId);
        Form form = getCreationForm();
        // Name in read-only mode for the default admin
        if (account.isDefaultAdmin()) {
            form = form.with(Form.defaultNameField().readOnly());
        }
        // Password not filled in, and not required on update
        form = form.with(Password.of("password").label("Password").length(40).help("Password for the account. Leave blank to keep it unchanged.").optional());
        // Groups
        form = form.with(
                MultiSelection.of("groups").label("Groups")
                        .items(accountService.getAccountGroupsForSelection(accountId))
        );
        // OK
        return form
                .fill("name", account.getName())
                .fill("fullName", account.getFullName())
                .fill("email", account.getEmail())
                ;
    }
99890
def save_form(self, request, form, change):
        
        name = form.cleaned_data['name']
        origin_url = form.cleaned_data['origin_url']
        res = ClonedRepo(name=name, origin=origin_url)
        LOG.info("New repo form produced %s" % str(res))

        form.save(commit=False)
        return res
1047401
def get_form_kwargs(self):
        
        kwargs = {'initial': self.get_initial(),
                  'instance': self.object}

        if self.request.method in ('POST', 'PUT') and self.can_submit:
            kwargs.update({
                'data': self.request.POST,
                'files': self.request.FILES
            })
        return kwargs