Render the placeholder field.
429285
def render(self, name, value, attrs=None, renderer=None):
        
        other_instance_languages = None
        if value and value != "-DUMMY-":
            if get_parent_language_code(self.parent_object):
                # Parent is a multilingual object, provide information
                # for the copy dialog.
                other_instance_languages = get_parent_active_language_choices(
                    self.parent_object, exclude_current=True)

        context = {
            'cp_plugin_list': list(self.plugins),
            'placeholder_id': '',
            'placeholder_slot': self.slot,
            'other_instance_languages': other_instance_languages,
        }
        return mark_safe(render_to_string('admin/fluent_contents/placeholderfield/widget.html', context))
647367
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        echo CHtml::openTag($this->tagName, array('id' => 'wrapper-' . $id));

        if ($this->hasModel()) {
            echo CHtml::activeCheckBox($this->model, $this->attribute, $this->htmlOptions);
        } else {
            echo CHtml::checkBox($name, $this->value, $this->htmlOptions);
        }

        echo CHtml::closeTag($this->tagName);
    }
975760
function ($placeholder) {
			$.fn.mediumInsert.insert.deselect();


			var formHtml = '<div class="medium-editor-toolbar medium-editor-toolbar-active medium-editor-toolbar-form-anchor mediumInsert-embedsWire" style="display: block;"><input type="text" value="" placeholder="' + this.options.urlPlaceholder + '" class="mediumInsert-embedsText medium-editor-toolbar-anchor-input"></div>';
			$(formHtml).appendTo($placeholder.prev());
			setTimeout(function () {
				$placeholder.prev().find('input').focus();
			}, 50);

			$.fn.mediumInsert.insert.deselect();

			this.currentPlaceholder = $placeholder;
			$(".mediumInsert-embedsText").focus();
		}
968467
def render(self, form, form_style, context):
        
        return render_to_string(self.template, Context({'input': self}))
1177913
def modify_placeholder(request, page_id):
    """"""
    content_type = request.GET.get('content_type')
    language_id = request.GET.get('language_id')
    page = get_object_or_404(Page, pk=page_id)
    perm = request.user.has_perm('pages.change_page')
    if perm and request.method == 'POST':
        placeholders = get_placeholders(page.get_template())
        for placeholder in placeholders:
            if placeholder.name == content_type:
                initial = placeholder.get_content(
                    page, language_id, lang_fallback=False)
                form = forms.Form(request.POST, request.FILES)
                form.fields[content_type] = placeholder.get_field(
                    page, language_id, initial=initial)
                if not form.is_valid():
                    return HttpResponse(form.as_p())

                if placeholder.shared:
                    save_page = None
                else:
                    save_page = page

                extra_data = placeholder.get_extra_data(form.data)

                placeholder.save(
                    save_page, language_id,
                    form.cleaned_data[content_type], True, extra_data)
                if save_page:
                    page.invalidate()
                    # to update last modification date
                    page.save()
                else:
                    fake_page.invalidate(content_type)

                return HttpResponse('ok')
        raise Http404("Content type not found in placeholders")

    raise Http404
1088756
def render(self, context, instance, placeholder):
        
        context = super(CMSSelectedEntriesPlugin, self).render(
            context, instance, placeholder)
        context['entries'] = instance.entries.all()
        return context
1347644
public function renderField()
    {
        if (null === $this->selector) {
            list($name, $id) = $this->resolveNameID();

            if ($this->hasModel()) {
                echo TbHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions);
            } else {
                echo TbHtml::textField($name, $this->value, $this->htmlOptions);
            }

            $this->setLocaleSettings();
        }
    }
874713
def _get_placeholder_repr(self):
        """"""
        placeholder = '...'
        if self.TRANSFORM is not None:
            placeholder = '%s(%s)' % (self.TRANSFORM.__name__, placeholder)
        return placeholder
176363
def _create_placeholders(self):
        """"""
        self.input_data = tf.placeholder(
            tf.int32, [self.batch_size, self.num_steps])
        self.input_labels = tf.placeholder(
            tf.int32, [self.batch_size, self.num_steps])
78056
def render(self, context, instance, placeholder):
        '''  '''
        context = super(PayAtDoorFormPlugin, self).render(context, instance, placeholder)

        context.update({
            'business_name': getConstant('contact__businessName'),
            'currencyCode': getConstant('general__currencyCode'),
            'form': self.get_form(context, instance, placeholder),
        })

        return context
203391
def add_missing_placeholders(self):
        
        content_type = ContentType.objects.get_for_model(self)
        result = False
        if self.layout:
            for data in self.layout.get_placeholder_data():
                placeholder, created = Placeholder.objects.update_or_create(
                    parent_type=content_type,
                    parent_id=self.pk,
                    slot=data.slot,
                    defaults=dict(
                        role=data.role,
                        title=data.title,
                    ))
                result = result or created
        return result
1212158
function(value) {
	
	   // Render the subField
	   var subFieldEl = this.renderSubField(value);
	
		if(this.options.name) {
	   	subFieldEl.setFieldName(this.options.name+"["+this.subFields.length+"]");
		}
	
	   // Adds it to the local list
	   this.subFields.push(subFieldEl);
	   
	   return subFieldEl;
	}
902100
def get_placeholder_data(self, request, obj=None):
        
        # Return all placeholder fields in the model.
        if not hasattr(self.model, '_meta_placeholder_fields'):
            return []

        data = []
        for name, field in self.model._meta_placeholder_fields.items():
            assert isinstance(field, PlaceholderField)
            data.append(PlaceholderData(
                slot=field.slot,
                title=field.verbose_name.capitalize(),
                fallback_language=None,  # Information cant' be known by "render_placeholder" in the template.
            ))

        return data
793734
function() {
			if (!this.settings.placeholder) return;
			var $input = this.$control_input;
	
			if (this.items.length) {
				$input.removeAttr('placeholder');
			} else {
				$input.attr('placeholder', this.settings.placeholder);
			}
			$input.triggerHandler('update', {force: true});
		}
382694
function renderKoboField() {
		$this->renderField(
			[
				'id' => 'kobo',
				'name' => $this->getSlug(),
				'option' => 'kobo',
				'value' => ( isset( $this->options['kobo'] ) ) ? $this->options['kobo'] : '',
				'type' => 'url',
				'class' => 'regular-text code',
			]
		);
	}
158661
def render(self):
        """"""
        context = self.context
        if 'app' not in context:
            context['app'] = self.application.name
        temp_dir = self.temp_dir
        templates_root = self.blueprint.templates_directory
        for root, dirs, files in os.walk(templates_root):
            for directory in dirs:
                directory = os.path.join(root, directory)
                directory = render_from_string(directory, context)
                directory = directory.replace(templates_root, temp_dir, 1)
                os.mkdir(directory)
            for file in files:
                full_file = os.path.join(root, file)
                stat = os.stat(full_file)
                content = render_from_file(full_file, context)
                full_file = strip_extension(
                    render_from_string(full_file, context))
                full_file = full_file.replace(templates_root, temp_dir, 1)
                with open(full_file, 'w') as f:
                    f.write(content)
                os.chmod(full_file, stat.st_mode)
845402
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        TbArray::defaultValue('id', $id, $this->htmlOptions);
        TbArray::defaultValue('name', $name, $this->htmlOptions);

        // fixes #32: 'multiple' will be forced later in jQuery plugin
        $this->htmlOptions['multiple'] = 'multiple';

        if ($this->hasModel()) {
            echo CHtml::activeDropDownList($this->model, $this->attribute, $this->data, $this->htmlOptions);
        } else {
            echo CHtml::dropDownList($this->name, $this->value, $this->data, $this->htmlOptions);
        }
    }