Render some UI for repeating our form.
763173
def repeater(self, req, tag):
        
        repeater = inevow.IQ(self.docFactory).onePattern('repeater')
        return repeater.fillSlots(
            'object-description', self.parameter.modelObjectDescription)
740714
def render(self, screen):
        """"""
        self.rect.render(screen)
        super(MenuElement, self).render(screen)
330486
public function render()
    {
        $reg = $this->registry;
        ?>
        <div class="wrap">
            <h1><?php echo $reg['page_title']; ?></h1>
            <form action="options.php" method="post">
                <?php settings_errors($reg['option_name']) ?>
                <?php settings_fields($reg['option_name']); ?>
                <?php do_settings_sections($reg['option_name']); ?>
                <?php submit_button(); ?>
            </form>
        </div>
        <?php
    }
244775
def repeatForm(self):
        
        liveForm = self.parameter.asLiveForm()
        liveForm.setFragmentParent(self)
        return liveForm
834152
public function render()
    {
        $this->applyElementBehavior();

        $elements = [];

        if ($this->cloneElement()) {
            $originalArguments = $this->arguments();
            $originalMethods = $this->methods();

            $locales = $this->locales();
            // Check if a custom locale set is requested.
            if ($count = func_num_args()) {
                $args = ($count == 1 ? head(func_get_args()) : func_get_args());
                $locales = array_intersect($locales, (array) $args);
            }

            foreach ($locales as $locale) {
                $this->arguments($originalArguments);
                $this->methods($originalMethods);
                
                $name = str_contains($originalArguments['name'], '%locale') ? $originalArguments['name'] : '%locale[' . $originalArguments['name'] . ']';
                $this->overwriteArgument('name', str_replace('%locale', $locale, $name));
                
                if ($this->translatableIndicator()) {
                    $this->setTranslatableLabelIndicator($locale);
                }
                if (!empty($this->config['form-group-class'])) {
                    $this->addMethod('addGroupClass', str_replace('%locale', $locale, $this->config['form-group-class']));
                }
                if (!empty($this->config['input-locale-attribute'])) {
                    $this->addMethod('attribute', [$this->config['input-locale-attribute'], $locale]);
                }
                $elements[] = $this->createInput($locale);
            }
        } else {
            $elements[] = $this->createInput();
        }

        $this->reset();

        return implode('', $elements);
    }
213863
def render(self):
        
        elements = [self.render_element(e) for e in self.widgets]
        progressbar = self.separator.join(elements)
        width = get_terminal_width()
        if width:
            # leave last column for cursor
            progressbar = progressbar.ljust(width - 1)
        return progressbar
572254
def form(**kwargs: Question):
    """"""
    return Form(*(FormField(k, q) for k, q in kwargs.items()))
1370695
def OnCellText(self, event):
        """"""

        row, col, _ = self.grid.actions.cursor
        self.grid.GetTable().SetValue(row, col, event.code)

        event.Skip()
799326
protected function add_event_repeat_elements($mform) {
        $mform->addElement('checkbox', 'repeat', get_string('repeatevent', 'calendar'), null);
        $mform->addElement('text', 'repeats', get_string('repeatweeksl', 'calendar'), 'maxlength="10" size="10"');
        $mform->setType('repeats', PARAM_INT);
        $mform->setDefault('repeats', 1);
        $mform->disabledIf('repeats', 'repeat', 'notchecked');
        $mform->setAdvanced('repeat');
        $mform->setAdvanced('repeats');
    }
630471
def render_layout(self, form, context, template_pack=TEMPLATE_PACK):
        
        form.rendered_fields = set()
        form.crispy_field_template = self.field_template

        # This renders the specified Layout strictly
        html = self.layout.render(
            form,
            self.form_style,
            context,
            template_pack=template_pack
        )

        # Rendering some extra fields if specified
        if self.render_unmentioned_fields or self.render_hidden_fields or self.render_required_fields:
            fields = set(form.fields.keys())
            left_fields_to_render = fields - form.rendered_fields
            for field in left_fields_to_render:
                if (
                    self.render_unmentioned_fields or
                    self.render_hidden_fields and form.fields[field].widget.is_hidden or
                    self.render_required_fields and form.fields[field].widget.is_required
                ):
                    html += render_field(
                        field,
                        form,
                        self.form_style,
                        context,
                        template_pack=template_pack
                    )

        # If the user has Meta.fields defined, not included in the layout,
        # we suppose they need to be rendered
        if hasattr(form, 'Meta'):
            if hasattr(form.Meta, 'fields'):
                current_fields = tuple(getattr(form, 'fields', {}).keys())
                meta_fields = getattr(form.Meta, 'fields')

                fields_to_render = list_intersection(current_fields, meta_fields)
                left_fields_to_render = list_difference(fields_to_render, form.rendered_fields)

                for field in left_fields_to_render:
                    # We still respect the configuration of the helper
                    # regarding which fields to render
                    if (
                        self.render_unmentioned_fields or
                        (self.render_hidden_fields and
                         form.fields[field].widget.is_hidden) or
                        (self.render_required_fields and
                         form.fields[field].widget.is_required)
                    ):
                        html += render_field(field, form, self.form_style, context)

        return mark_safe(html)
672123
private function renderLinkForm()
    {
        $this->layout = '//layouts/main';

		$this->setPageTitle(Yii::t('HybridAuth.main', '{{app_name}} | {{label}}', array(
			'{{app_name}}' => Cii::getConfig('name', Yii::app()->name),
            '{{label}}'    => Yii::t('HybridAuth.main', 'Link Your Account')
		)));

        $form = new RemoteLinkAccountForm;

        if (Cii::get($_POST, 'RemoteLinkAccountForm', false))
        {
            // Populate the model
            $form->attributes = Cii::get($_POST, 'RemoteLinkAccountForm', false);
            $form->provider   = $this->getProvider();
            $form->adapter    = $this->getUserProfile();

            if ($form->save())
            {
                if ($this->authenticate())
                {
                    Yii::app()->user->setFlash('success', Yii::t('HybridAuth.main', 'You have successfully logged in via {{provider}}', array('{{provider}}' => $this->getProvider() )));
                    $this->redirect(Yii::app()->user->returnUrl);
                }
            }
        }

        // Reuse the register form
        $this->render('/linkaccount', array('model' => $form));
    }
372208
function (form) {

            var viewData = {
              form: form,
              organization: req.organization
            };

            // https://github.com/caolan/forms/issues/96
            if (req.query.status === 'invalid_sptoken') {
              viewData.status = req.query.status;
              return helpers.render(req, res, view, viewData);
            }

            viewData.formErrors = helpers.collectFormErrors(form);
            helpers.render(req, res, view, viewData);
          }
967783
def occurrence_view(
    request,
    event_pk,
    pk,
    template='swingtime/occurrence_detail.html',
    form_class=forms.SingleOccurrenceForm
):
    '''
    
    '''
    occurrence = get_object_or_404(Occurrence, pk=pk, event__pk=event_pk)
    if request.method == 'POST':
        form = form_class(request.POST, instance=occurrence)
        if form.is_valid():
            form.save()
            return http.HttpResponseRedirect(request.path)
    else:
        form = form_class(instance=occurrence)

    return render(request, template, {'occurrence': occurrence, 'form': form})
1349449
def render(self, type, rerender=False):
        """"""
        for child in self.children:
            child.render(type, rerender)
1338310
public function render()
    {
        $uid = helpers_Random::generateString(24);

        $this->addClass('viewable-hiddenbox-input');
        $this->addAttribute('data-identifier', $uid);

        $value = _dh($this->value);

        $html = <<<HTML
<span class="viewable-hiddenbox">
    {$this->renderLabel()}
    <input type='password' name='{$this->name}' id='{$this->name}' {$this->renderAttributes()} value='{$value}'/>
    <span class="viewable-hiddenbox-toggle" data-identifier="{$uid}"></span>
</span>
HTML;

        $script = <<<SCRIPT
<script type="text/javascript">
    (function() {
        var input = document.querySelector('input[data-identifier="$uid"]'),
            toggle = document.querySelector('.viewable-hiddenbox-toggle[data-identifier="$uid"]'),
            
            iconView = document.createElement('span'),
            iconHide = document.createElement('span');
        
        var show = function() {
            if (iconView.parentElement) {
                toggle.removeChild(iconView);
            }
            if (!iconHide.parentElement) {
                toggle.appendChild(iconHide);
            }
            input.type = 'text';
            input.autocomplete = 'off';
            window.addEventListener('mousedown', autoHide); // make sure always submit the form with an password input
            input.focus();
        };
        
        var hide = function() {
            if (!iconView.parentElement) {
                toggle.appendChild(iconView);
            }
            if (iconHide.parentElement) {
                toggle.removeChild(iconHide);
            }
            input.type = 'password';
            input.autocomplete = 'on';
            window.removeEventListener('mousedown', autoHide);
        };
        
        var autoHide = function(event) {
            if (!event.target.isSameNode(input) && !event.target.isSameNode(iconHide) && !event.target.isSameNode(toggle)) {
                hide();
            }
        };
        
        iconView.classList.add('icon-preview');
        iconHide.classList.add('icon-eye-slash');
        hide();
        
        toggle.addEventListener('click', function() {
            if (input.type === 'password') {
                show();
            } else {
                hide();
            }
        });
    })();
</script>
SCRIPT;

        return (string) ($html . $script);
    }
273808
def append_form(
            self,
            obj: Union[Sequence[Tuple[str, str]],
                       Mapping[str, str]],
            headers: Optional['MultiMapping[str]']=None
    ) -> Payload:
        """"""
        assert isinstance(obj, (Sequence, Mapping))

        if headers is None:
            headers = CIMultiDict()

        if isinstance(obj, Mapping):
            obj = list(obj.items())
        data = urlencode(obj, doseq=True)

        return self.append_payload(
            StringPayload(data, headers=headers,
                          content_type='application/x-www-form-urlencoded'))
105351
function (form) {
        render(req, res, 'organization-select', {
          form: form,
          formActionUri: formActionUri,
          formModel: organizationSelectFormModel,
          formErrors: collectFormErrors(form)
        });
      }