Create the UI artefacts for the "Add contact" sub form.
328829
private void createAddContactSubForm() {
		add(new WHeading(HeadingLevel.H3, "Add a new contact"));

		WButton addBtn = new WButton("Add");
		addBtn.setAction(new Action() {
			@Override
			public void execute(final ActionEvent event) {
				addNewContact();
			}
		});
		addBtn.setImage("/image/address-book-new.png");
		newNameField.setDefaultSubmitButton(addBtn);

		WContainer container = new WContainer();
		container.add(newNameField);
		container.add(addBtn);

		WFieldLayout layout = new WFieldLayout();
		add(layout);
		layout.addField("New contact name", container);
		add(new WAjaxControl(addBtn, new AjaxTarget[]{repeater, newNameField}));
	}
758829
def _create_ui(self):
        """"""

        self.preview = None
        self.about_dialog = None
        self.preferences = None
        self.builder = pygubu.Builder(translator)
        self.currentfile = None
        self.is_changed = False

        uifile = os.path.join(FILE_PATH, "ui/pygubu-ui.ui")
        self.builder.add_from_file(uifile)
        self.builder.add_resource_path(os.path.join(FILE_PATH, "images"))

        #build main ui
        self.builder.get_object('mainwindow', self.master)
        toplevel = self.master.winfo_toplevel()
        menu = self.builder.get_object('mainmenu', toplevel)
        toplevel['menu'] = menu

        #project name
        self.project_name = self.builder.get_object('projectname_lbl')

        #Class selector values
        self.widgetlist_sf = self.builder.get_object("widgetlist_sf")
        self.widgetlist = self.builder.get_object("widgetlist")
        self.configure_widget_list()

        #widget tree
        self.treeview = self.builder.get_object('treeview1')
        self.bindings_frame = self.builder.get_object('bindingsframe')
        self.bindings_tree = self.builder.get_object('bindingstree')

        #Preview
        previewc = self.builder.get_object('preview_canvas')
        self.previewer = PreviewHelper(previewc)
        #tree editor
        self.tree_editor = WidgetsTreeEditor(self)

        self.builder.connect_callbacks(self)

        #Status bar
        self.statusbar = self.builder.get_object('statusbar')
        handler = StatusBarHandler(self.statusbar)
        handler.setLevel(logging.INFO)
        logger.addHandler(handler)
        pygubu.builder.logger.addHandler(handler)

        #app grid
        self.set_resizable()

        #
        #Application bindings
        #
        master = self.master
        master.bind_all(
            '<Control-KeyPress-n>',
            lambda e: self.on_file_menuitem_clicked('file_new'))
        master.bind_all(
            '<Control-KeyPress-o>',
            lambda e: self.on_file_menuitem_clicked('file_open'))
        master.bind_all(
            '<Control-KeyPress-s>',
            lambda e: self.on_file_menuitem_clicked('file_save'))
        master.bind_all(
            '<Control-KeyPress-q>',
            lambda e: self.on_file_menuitem_clicked('file_quit'))
        master.bind_all(
            '<Control-KeyPress-i>',
            lambda e: self.on_edit_menuitem_clicked('edit_item_up'))
        master.bind_all(
            '<Control-KeyPress-k>',
            lambda e: self.on_edit_menuitem_clicked('edit_item_down'))
        master.bind_all(
            '<F5>',
            lambda e: self.tree_editor.preview_in_toplevel())
        master.bind_all(
            '<F6>',
            lambda e: self.previewer.close_toplevel_previews())

        #
        # Widget bindings
        #
        self.tree_editor.treeview.bind(
            '<Control-KeyPress-c>',
            lambda e: self.tree_editor.copy_to_clipboard())
        self.tree_editor.treeview.bind(
            '<Control-KeyPress-v>',
            lambda e: self.tree_editor.paste_from_clipboard())
        self.tree_editor.treeview.bind(
            '<Control-KeyPress-x>',
            lambda e: self.tree_editor.cut_to_clipboard())
        self.tree_editor.treeview.bind(
            '<KeyPress-Delete>',
            lambda e: self.on_edit_menuitem_clicked('edit_item_delete'))

        def clear_key_pressed(event, newevent):
            # when KeyPress, not Ctrl-KeyPress, generate event.
            if event.keysym_num == ord(event.char):
                self.tree_editor.treeview.event_generate(newevent)
        self.tree_editor.treeview.bind('<i>',
                lambda e: clear_key_pressed(e, '<Up>'))
        self.tree_editor.treeview.bind('<k>',
                lambda e: clear_key_pressed(e, '<Down>'))

        #grid move bindings
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-i>',
            lambda e: self.on_edit_menuitem_clicked('grid_up'))
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-k>',
            lambda e: self.on_edit_menuitem_clicked('grid_down'))
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-j>',
            lambda e: self.on_edit_menuitem_clicked('grid_left'))
        self.tree_editor.treeview.bind(
            '<Alt-KeyPress-l>',
            lambda e: self.on_edit_menuitem_clicked('grid_right'))
            
        # On preferences save binding
        self.master.bind('<<PygubuDesignerPreferencesSaved>>', self.on_preferences_saved)

        #
        # Setup tkk styles
        #
        self._setup_styles()

        #
        # Setup dynamic theme submenu
        #
        self._setup_theme_menu()

        #app config
        top = self.master.winfo_toplevel()
        try:
            top.wm_iconname('pygubu')
            top.tk.call('wm', 'iconphoto', '.', StockImage.get('pygubu'))
        except StockImageException as e:
            pass

        self.set_title(_('Pygubu a GUI builder for tkinter'))
        self.set_size('640x480')
654170
protected function buildForm()
    {
        $this->form = Yii::createObject(array_merge([
            'scenario' => $this->scenario,
            'parent_id' => $this->parent_id,
            'parentTariff' => $this->parentTariff,
            'tariff' => $this->tariff,
        ], $this->getFormOptions()));
    }
1331876
protected function InitForm()
    {
        $this->html = $this->LoadElement();
        $name = 'Html';
        $this->AddRichTextField($name, $this->html->GetHtml());
        $this->AddCssClassField();
        $this->AddCssIDField();
        $this->AddCacheLifetimeField();
        $this->AddSubmit();
    }
1246576
public void addSubFileFilter()
    {
        ContactType recContactType = (ContactType)((ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_TYPE_ID)).getReference();
        Record recHeader = this.getHeaderRecord();
        if (recHeader != null)
        {
            recContactType = recContactType.getContactType(recHeader);
            this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_TYPE_ID).moveFieldToThis(recContactType.getField(ContactType.ID));   // Display the field
            if ((recHeader.getEditMode() == DBConstants.EDIT_CURRENT) || (recHeader.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
                this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_ID).moveFieldToThis(recHeader.getField(VirtualRecord.ID));   // Display the field
        }
        Record recMessageDetail = this.getMainRecord();
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.CONTACT_TYPE_ID), this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_TYPE_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_TYPE_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.CONTACT_ID), this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_ID), DBConstants.EQUALS, null, true));
        FieldListener listener = null;
        this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_ID).addListener(listener = new FieldListener(null)
        {
            public int fieldChanged(boolean bDisplayOption, int iMoveMode)
            {
                String iKeyOrder = MessageLog.CONTACT_TYPE_ID_KEY;
                if (this.getOwner().isNull())
                    iKeyOrder = MessageLog.MESSAGE_TIME_KEY;
                getMainRecord().setKeyArea(iKeyOrder);
                return super.fieldChanged(bDisplayOption, iMoveMode);
            }
        });
        listener.fieldChanged(true, DBConstants.INIT_MOVE); // Initialize EY order.
        this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_ID).addListener(new FieldReSelectHandler(this));
    }
22191
public function actionContact()
    {
        $model = new ContactForm();
        if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {
            Yii::$app->session->setFlash('contactFormSubmitted');

            return $this->refresh();
        }

        return $this->render('contact', compact('model'));
    }
752796
def create_contact(self, *args, **kwargs):
        """"""
        url = 'contacts.json'
        contact_data = {
            'active': True,
            'helpdesk_agent': False,
            'description': 'Freshdesk Contact'
        }
        contact_data.update(kwargs)
        payload = {
            'user': contact_data
        }

        return Contact(**self._api._post(url, data=payload)['user'])
1171884
def render_addPersonForm(self, ctx, data):
        
        addPersonForm = liveform.LiveForm(
            self.addPerson, self._baseParameters, description='Add Person')
        addPersonForm.compact()
        addPersonForm.jsClass = u'Mantissa.People.AddPersonForm'
        addPersonForm.setFragmentParent(self)
        return addPersonForm
963391
private void addNewContact() {
		String name = newNameField.getText();
		if (name != null && !"".equals(name)) {
			List list = new ArrayList(repeater.getBeanList());
			list.add(new ContactDetails(name, null, new String[0]));
			repeater.setBeanList(list);
		}
		newNameField.setText("");
	}
376262
def create_contact(self, *args, **kwargs):
        """"""
        url = 'contacts'
        data = {
            'view_all_tickets': False,
            'description': 'Freshdesk Contact'
        }
        data.update(kwargs)
        return Contact(**self._api._post(url, data=json.dumps(data)))
1155255
def make_ui(self, path='hgwebdir.config'):
    
    #propagated from mercurial documentation
    sections = [
                'alias',
                'auth',
                'decode/encode',
                'defaults',
                'diff',
                'email',
                'extensions',
                'format',
                'merge-patterns',
                'merge-tools',
                'hooks',
                'http_proxy',
                'smtp',
                'patch',
                'paths',
                'profiling',
                'server',
                'trusted',
                'ui',
                'web',
                ]

    repos = path
    baseui = ui.ui()
    cfg = config.config()
    cfg.read(repos)
    self.paths = cfg.items('paths')
    self.base_path = self.paths[0][1].replace('*', '')
    self.check_repo_dir(self.paths)
    self.set_statics(cfg)

    for section in sections:
        for k, v in cfg.items(section):
            baseui.setconfig(section, k, v)

    return baseui
539184
def add_view(self, request, form_url='', extra_context=None):
        """"""
        extra_context = {
            'language': get_language_from_request(request),
            'page_languages': settings.PAGE_LANGUAGES,
        }
        return super(PageAdmin, self).add_view(request, form_url,
                                               extra_context)
1156625
def create_ui_structure(cls, username, napp_name, ui_templates_path,
                            context):
        """"""
        for section in ['k-info-panel', 'k-toolbar', 'k-action-menu']:
            os.makedirs(os.path.join(username, napp_name, 'ui', section))

        templates = os.listdir(ui_templates_path)

        for tmp in templates:
            fname = os.path.join(username, napp_name, 'ui',
                                 tmp.rsplit('.template')[0])

            with open(fname, 'w') as file:
                content = cls.render_template(ui_templates_path, tmp,
                                              context)
                file.write(content)
1263928
def add_fields(self, form, index):
        
        super(ColumnFormSet, self).add_fields(form, index)
        form.fields['column'].choices = self.get_choices()
409916
def add_ui(self, klass, *args, **kwargs):
        '''

        '''
        ui = klass(self.widget, *args, **kwargs)
        self.widget.uis.append(ui)
        return ui
414185
def setup_ui(self, ):
        
        self.main_vbox = QtGui.QVBoxLayout(self)
        self.import_all_references_cb = QtGui.QCheckBox("Import references")
        self.main_vbox.addWidget(self.import_all_references_cb)
555549
protected function InitForm()
    {
        $this->block = $this->LoadElement();
        $this->AddTagNameField();
        $this->AddCssClassField();
        $this->AddCssIDField();
        $this->AddSubmit();
    }