当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminTab::displayForm方法代码示例

本文整理汇总了PHP中AdminTab::displayForm方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminTab::displayForm方法的具体用法?PHP AdminTab::displayForm怎么用?PHP AdminTab::displayForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AdminTab的用法示例。


在下文中一共展示了AdminTab::displayForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        $output = '
		<h2>' . $this->l('Print PDF invoices') . '</h2>
		<fieldset class="width2">
			<form action="' . $currentIndex . '&submitPrint=1&token=' . $this->token . '" method="post">
				<label>' . $this->l('From:') . ' </label>
				<div class="margin-form">
					<input type="text" size="4" maxlength="10" name="date_from" value="' . date('Y-m-d') . '" style="width: 120px;" /> <sup>*</sup>
					<p class="clear">' . $this->l('Format: 2007-12-31 (inclusive)') . '</p>
				</div>
				<label>' . $this->l('To:') . ' </label>
				<div class="margin-form">
					<input type="text" size="4" maxlength="10" name="date_to" value="' . date('Y-m-d') . '" style="width: 120px;" /> <sup>*</sup>
					<p class="clear">' . $this->l('Format: 2008-12-31 (inclusive)') . '</p>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('Generate PDF file') . '" name="submitPrint" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required fields') . '</div>
			</form>
		</fieldset>';
        echo $output;
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:26,代码来源:AdminInvoices.php

示例2: displayForm

    function displayForm($isMainTab = true)
    {
        $this->loadJS_CSS();
        $home = __PS_BASE_URI__ . substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__));
        global $currentIndex;
        parent::displayForm();
        $this->displayErrors();
        $obj = $this->loadObject(true);
        $row = $obj->getCommentById();
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post" enctype="multipart/form-data">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend>' . $this->l('Comment') . '</legend>';
        // parent
        $this->displaySelection($this->l('Post title'), 'id_pl_blog_post', $row['id_pl_blog_post'], $obj->getPostNames(), 'id_pl_blog_post', 'post_title', 200, null);
        // comment_status
        $this->displaySelection($this->l('Status'), 'comment_status', $row['comment_status'], $obj->getCommentStatus(), 'id_pl_blog_comment_status', 'name', 200, null);
        // comment_author_name
        $this->displayRow($this->l('Author\'s name'), 'comment_author_name', 'text', htmlentities($row['comment_author_name']), null, null, null, true, '<>;=#{}');
        // comment_author_email
        $this->displayRow($this->l("Author\\'s email"), 'comment_author_email', 'text', htmlentities($row['comment_author_email']), null, null, null, true, '<>;=#{}');
        // comment_content
        $this->displayRowMultiLang($this->l('Content'), 'comment_content', 'textarea', $obj, null, 90, 10, true);
        // comment_date_create
        $this->displayDate('comment_date_create', $row['comment_date_create']);
        // buton submit
        echo '
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small">' . $this->l('') . '</div>
				';
        echo '</fieldset>
		</form>';
    }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:35,代码来源:AdminPlComment.php

示例3: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex, $cookie;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        $dl = 'name';
        echo '<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '&addstock_mvt_reason" method="post">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/search.gif" />' . $this->l('Stock Movement') . '</legend>
				<label>' . $this->l('Name:') . '</label>
				<div class="margin-form">';
        foreach ($this->_languages as $language) {
            echo '<div id="name_' . $language['id_lang'] . '" style="display: ' . ($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none') . '; float: left;">
						<input size="40" type="text" name="name_' . $language['id_lang'] . '" value="' . htmlentities($this->getFieldValue($obj, 'name', (int) $language['id_lang']), ENT_COMPAT, 'UTF-8') . '" /><sup> *</sup>
					</div>';
        }
        $this->displayFlags($this->_languages, $this->_defaultFormLanguage, $dl, 'name');
        echo '</div>
				<div class="clear space">&nbsp;</div>
				<label>' . $this->l('Action:') . '</label>
				<div class="margin-form">
					<select name="sign">
						<option value="1">' . $this->l('Increase stock') . '</option>
						<option value="-1">' . $this->l('Decrease stock') . '</option>
					</select>
				</div>
				<div class="clear space">&nbsp;</div>';
        echo '<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
			</fieldset>
		</form>';
    }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:35,代码来源:AdminStockMvt.php

示例4: displayForm

    public function displayForm($isMainTab = true)
    {
        global $cookie, $currentIndex;
        parent::displayForm();
        $currentProfile = (int) $this->getCurrentProfileId();
        $tabs = Tab::getTabs($cookie->id_lang);
        $profiles = Profile::getProfiles((int) $cookie->id_lang);
        $accesses = Profile::getProfileAccesses((int) $currentProfile);
        echo '
		<script type="text/javascript">
			setLang(Array(\'' . $this->l('Profile updated') . '\', \'' . $this->l('Request failed!') . '\', \'' . $this->l('Update in progress. Please wait.') . '\', \'' . $this->l('Server connection failed!') . '\'));
		</script>
		<div id="ajax_confirmation"></div>
		<table class="table" cellspacing="0">
			<tr>
				<th ' . ($currentProfile == (int) _PS_ADMIN_PROFILE_ ? 'colspan="6"' : '') . '>
					<select name="profile" onchange="redirect(\'' . Tools::getHttpHost(true, true) . $currentIndex . '&token=' . $this->token . '&profile=\'+this.options[this.selectedIndex].value)">';
        if ($profiles) {
            foreach ($profiles as $profile) {
                echo '<option value="' . (int) $profile['id_profile'] . '" ' . ((int) $profile['id_profile'] == $currentProfile ? 'selected="selected"' : '') . '>' . $profile['name'] . '</option>';
            }
        }
        $tabsize = sizeof($tabs);
        foreach ($tabs as $tab) {
            if ($tab['id_tab'] > $tabsize) {
                $tabsize = $tab['id_tab'];
            }
        }
        echo '
					</select>
				</th>';
        if ($currentProfile != (int) _PS_ADMIN_PROFILE_) {
            echo '
				<th class="center">' . $this->l('View') . '<br /><input type="checkbox" name="1" id="viewall" onclick="ajax_power(this, \'view\', -1, ' . $currentProfile . ', \'' . $this->token . '\', \'' . $tabsize . '\', \'' . sizeof($tabs) . '\')" /></th>
				<th class="center">' . $this->l('Add') . '<br /><input type="checkbox" name="1" id="addall" onclick="ajax_power(this, \'add\', -1, ' . $currentProfile . ', \'' . $this->token . '\', \'' . $tabsize . '\', \'' . sizeof($tabs) . '\')" /></th>
				<th class="center">' . $this->l('Edit') . '<br /><input type="checkbox" name="1" id="editall" onclick="ajax_power(this, \'edit\', -1, ' . $currentProfile . ', \'' . $this->token . '\', \'' . $tabsize . '\', \'' . sizeof($tabs) . '\')" /></th>
				<th class="center">' . $this->l('Delete') . '<br /><input type="checkbox" name="1" id="deleteall" onclick="ajax_power(this, \'delete\', -1, ' . $currentProfile . ', \'' . $this->token . '\', \'' . $tabsize . '\', \'' . sizeof($tabs) . '\')" /></th>
				<th class="center">' . $this->l('All') . '<br /><input type="checkbox" name="1" id="allall" onclick="ajax_power(this, \'all\', -1, ' . $currentProfile . ', \'' . $this->token . '\', \'' . $tabsize . '\', \'' . sizeof($tabs) . '\')" /></th>
			</tr>';
        }
        if (!sizeof($tabs)) {
            echo '<tr><td colspan="5">' . $this->l('No tab') . '</td></tr>';
        } elseif ($currentProfile == (int) _PS_ADMIN_PROFILE_) {
            echo '<tr><td colspan="5">' . $this->l('Administrator permissions cannot be modified.') . '</td></tr>';
        } else {
            foreach ($tabs as $tab) {
                if (!$tab['id_parent'] or (int) $tab['id_parent'] == -1) {
                    $this->printTabAccess((int) $currentProfile, $tab, $accesses[$tab['id_tab']], false, $tabsize, sizeof($tabs));
                    foreach ($tabs as $child) {
                        if ($child['id_parent'] === $tab['id_tab']) {
                            if (isset($accesses[$child['id_tab']])) {
                                $this->printTabAccess($currentProfile, $child, $accesses[$child['id_tab']], true, $tabsize, sizeof($tabs));
                            }
                        }
                    }
                }
            }
        }
        echo '</table>';
    }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:60,代码来源:AdminAccess.php

示例5: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post" enctype="multipart/form-data">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/time.gif" />' . $this->l('Order statuses') . '</legend>
				<label>' . $this->l('Status name:') . ' </label>
				<div class="margin-form">';
        foreach ($this->_languages as $language) {
            echo '
					<div id="name_' . $language['id_lang'] . '" style="display: ' . ($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none') . '; float: left;">
						<input size="40" type="text" name="name_' . $language['id_lang'] . '" value="' . htmlentities($this->getFieldValue($obj, 'name', (int) $language['id_lang']), ENT_COMPAT, 'UTF-8') . '" /><sup> *</sup>
						<span class="hint" name="help_box">' . $this->l('Invalid characters: numbers and') . ' !<>,;?=+()@#"�{}_$%:<span class="hint-pointer">&nbsp;</span></span>
						</div>';
        }
        $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
        echo '		<p style="clear: both">' . $this->l('Order return status name') . '</p>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:hecbuma,项目名称:quali-fisioterapia,代码行数:30,代码来源:AdminReturnStates.php

示例6: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post">
			' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/profiles.png" />' . $this->l('Profiles') . '</legend>
				<label>' . $this->l('Name:') . ' </label>
				<div class="margin-form">';
        foreach ($this->_languages as $language) {
            echo '
					<div id="name_' . $language['id_lang'] . '" style="display: ' . ($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none') . '; float: left;">
						<input size="33" type="text" name="name_' . $language['id_lang'] . '" value="' . htmlentities($this->getFieldValue($obj, 'name', (int) $language['id_lang']), ENT_COMPAT, 'UTF-8') . '" /><sup> *</sup>
					</div>';
        }
        $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
        echo '		<div class="clear"></div>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:29,代码来源:AdminProfiles.php

示例7: displayForm

    function displayForm($isMainTab = true)
    {
        $this->loadJS_CSS();
        $home = __PS_BASE_URI__ . substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__));
        global $currentIndex;
        parent::displayForm();
        $obj = $this->loadObject(true);
        $row = $obj->getTagsById();
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post" enctype="multipart/form-data">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend>' . $this->l('Category') . '</legend>';
        // tags_name
        $this->displayRowMultiLang($this->l('Tag Name'), 'tags_name', 'text', $obj, null, null, null, false, '<>;=#{}');
        // tags_description
        $this->displayRowMultiLang($this->l('Description'), 'tags_description', 'textarea', $obj, null, 90, 10, false);
        // tags_date_create
        $this->displayDate('tags_date_create', $row['tags_date_create']);
        // buton submit
        echo '
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small">' . $this->l('') . '</div>
				';
        echo '</fieldset>
		</form>';
    }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:28,代码来源:AdminPlTags.php

示例8: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        if (!($banner = $this->loadObject(true))) {
            return;
        }
        //echo '<pre>'; print_r( $banner ); exit;
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post" enctype="multipart/form-data">
		' . ($banner->id_banner ? '<input type="hidden" name="id_' . $this->table . '" value="' . $banner->id_banner . '" />' : '') . '
			<fieldset>
                            <legend><img src="../img/admin/suppliers.gif" />' . $this->l('Banners') . '</legend>
                                
				<label>' . $this->l('Title:') . ' </label>
				<div class="margin-form">
					<input type="text" size="40" name="title" value="' . htmlentities(Tools::getValue('title', $banner->title), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
					<span class="hint" name="help_box">' . $this->l('Invalid characters:') . ' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
				</div>
                                
				<label>' . $this->l('URL:') . ' </label>
				<div class="margin-form">
					<input type="text" size="40" name="url" value="' . htmlentities(Tools::getValue('url', $banner->url), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
					<span class="hint" name="help_box">' . $this->l('Invalid characters:') . ' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
				</div>
                                
				<label>' . $this->l('Image Path:') . ' </label>
				<div class="margin-form">
					<input type="hidden" name="image_path" value="' . htmlentities(Tools::getValue('image_path', $banner->image_path), ENT_COMPAT, 'UTF-8') . '" />
					<input type="file" size="40" name="banner_image"/>';
        $image_path = Tools::getValue('image_path', $banner->image_path);
        if (!empty($image_path)) {
            echo '<a href="http://' . _MEDIA_SERVER_1_ . $this->image_dir . Tools::getValue('image_path', $banner->image_path) . '" target="__blank">';
            echo '	<img src="http://' . _MEDIA_SERVER_1_ . $this->image_dir . Tools::getValue('image_path', $banner->image_path) . '" width="200px" />';
            echo '</a>';
        }
        echo '</div>

				<label>' . $this->l('Display Order:') . ' </label>
				<div class="margin-form">
					<input type="text" size="40" name="display_order" value="' . htmlentities(Tools::getValue('display_order', $banner->display_order), ENT_COMPAT, 'UTF-8') . '" />
					<span class="hint" name="help_box">' . $this->l('Invalid characters:') . ' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
				</div>

                                
                                <label>' . $this->l('Enable:') . ' </label>
                                <div class="margin-form">
                                        <input type="radio" name="is_active" id="active_on" value="1" ' . ($this->getFieldValue($banner, 'is_active') ? 'checked="checked" ' : '') . '/>
                                        <label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="' . $this->l('Enabled') . '" title="' . $this->l('Enabled') . '" /></label>
                                        <input type="radio" name="is_active" id="active_off" value="0" ' . (!$this->getFieldValue($banner, 'is_active') ? 'checked="checked" ' : '') . '/>
                                        <label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="' . $this->l('Disabled') . '" title="' . $this->l('Disabled') . '" /></label>
                                </div>

				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:60,代码来源:AdminBanners.php

示例9: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/search.gif" />' . $this->l('Aliases') . '</legend>
				<label>' . $this->l('Alias:') . ' </label>
				<div class="margin-form">
					<input type="text" size="40" name="alias" value="' . Tools::getValue('alias', htmlentities($obj->getAliases(), ENT_COMPAT, 'UTF-8')) . '" /> <sup>*</sup>
					<p class="clear">' . $this->l('Enter each alias separated by a comma (\',\')') . ' ' . $this->l('(e.g., \'prestshop,preztashop,prestasohp\')') . '<br />
					' . $this->l('Forbidden characters:') . ' <>;=#{}</p>
				</div>
				<label>' . $this->l('Result:') . ' </label>
				<div class="margin-form">
					<input type="text" size="15" name="search" value="' . htmlentities($this->getFieldValue($obj, 'search'), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
					<p class="clear">' . $this->l('Search this word instead.') . '</p>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:nicolasjeol,项目名称:hec-ecommerce,代码行数:29,代码来源:AdminAliases.php

示例10: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        $obj = $this->loadObject(true);
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post" enctype="multipart/form-data" class="width2">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/world.gif" />' . $this->l('Zones') . '</legend>
				<label>' . $this->l('Name:') . '</label>
				<div class="margin-form">
					<input type="text" size="33" name="name" value="' . htmlentities(Tools::getValue('name', $obj->name), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
					<span class="hint" name="help_box">' . $this->l('Allowed characters: letters, spaces and') . ' (-)<span class="hint-pointer">&nbsp;</span></span>
					<p class="clear">' . $this->l('Zone name, e.g., Africa, West Coast, Neighboring Countries') . '</p>
				</div>
				<label>' . $this->l('Status:') . ' </label>
				<div class="margin-form">
					<input type="radio" name="active" id="active_on" value="1" ' . ((!$obj->id or Tools::getValue('active', $obj->active)) ? 'checked="checked" ' : '') . '/>
					<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="' . $this->l('Enabled') . '" title="' . $this->l('Enabled') . '" /></label>
					<input type="radio" name="active" id="active_off" value="0" ' . ((!Tools::getValue('active', $obj->active) and $obj->id) ? 'checked="checked" ' : '') . '/>
					<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="' . $this->l('Disabled') . '" title="' . $this->l('Disabled') . '" /></label>
					<p>' . $this->l('Allow or disallow shipping to this zone') . '</p>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:30,代码来源:AdminZones.php

示例11: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend>' . $this->l('Referrer') . '</legend>
				<label>' . $this->l('Server') . ' </label>
				<div class="margin-form">
					<input type="text" size="20" name="server" value="' . htmlentities($this->getFieldValue($obj, 'server'), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
				</div>
				<label>' . $this->l('$_GET variable') . ' </label>
				<div class="margin-form">
					<input type="text" size="40" name="getvar" value="' . htmlentities($this->getFieldValue($obj, 'getvar'), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:26,代码来源:AdminSearchEngines.php

示例12: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex, $cookie;
        parent::displayForm();
        $obj = $this->loadObject(true);
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post" enctype="multipart/form-data" class="width2">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
		' . ($obj->position ? '<input type="hidden" name="position" value="' . $obj->position . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/tab.gif" />' . $this->l('Tabs') . '</legend>
				<label>' . $this->l('Name:') . ' </label>
				<div class="margin-form">';
        foreach ($this->_languages as $language) {
            echo '
					<div id="name_' . $language['id_lang'] . '" style="display: ' . ($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none') . '; float: left;">
						<input size="33" type="text" name="name_' . $language['id_lang'] . '" value="' . htmlentities($this->getFieldValue($obj, 'name', intval($language['id_lang'])), ENT_COMPAT, 'UTF-8') . '" /><sup> *</sup>
						<span class="hint" name="help_box">' . $this->l('Invalid characters:') . ' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
					</div>';
        }
        $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name');
        echo '
				</div>
				<div class="clear">&nbsp;</div>
				<label>' . $this->l('Class:') . ' </label>
				<div class="margin-form">
					<input type="text" name="class_name" value="' . htmlentities($this->getFieldValue($obj, 'class_name'), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
				</div>
				<div class="clear">&nbsp;</div>
				<label>' . $this->l('Module:') . ' </label>
				<div class="margin-form">
					<input type="text" name="module" value="' . htmlentities($this->getFieldValue($obj, 'module'), ENT_COMPAT, 'UTF-8') . '" />
				</div>
				<div class="clear">&nbsp;</div>
				<label>' . $this->l('Icon:') . '</label>
				<div class="margin-form">
					' . ($obj->id ? '<img src="../img/t/' . $obj->class_name . '.gif" />&nbsp;/img/t/' . $obj->class_name . '.gif' : '') . '
					<p><input type="file" name="icon" /></p>
					<p>' . $this->l('Upload logo from your computer') . ' (.gif, .jpg, .jpeg ' . $this->l('or') . ' .png)</p>
				</div>
				<div class="clear">&nbsp;</div>
				<label>' . $this->l('Parent:') . '</label>
				<div class="margin-form">
					<select name="id_parent">
						<option value="-1" ' . ($this->getFieldValue($obj, 'id_parent') == -1 ? 'selected="selected"' : '') . '>' . $this->l('None') . '</option>
						<option value="0" ' . ($this->getFieldValue($obj, 'id_parent') == 0 ? 'selected="selected"' : '') . '>' . $this->l('Home') . '</option>';
        foreach (Tab::getTabs(intval($cookie->id_lang), 0) as $tab) {
            echo '		<option value="' . $tab['id_tab'] . '" ' . ($tab['id_tab'] == $this->getFieldValue($obj, 'id_parent') ? 'selected="selected"' : '') . '>' . $tab['name'] . '</option>';
        }
        echo '		</select>
				</div>
				<div class="clear">&nbsp;</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:vincent,项目名称:theinvertebrates,代码行数:58,代码来源:AdminTabs.php

示例13: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex, $cookie;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset><legend><img src="../img/admin/world.gif" />' . $this->l('States') . '</legend>
				<label>' . $this->l('Name:') . ' </label>
				<div class="margin-form">
					<input type="text" size="30" maxlength="32" name="name" value="' . htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8') . '" /> <sup>*</sup>
					<p class="clear">' . $this->l('State name to display in addresses and on invoices') . '</p>
				</div>
				<label>' . $this->l('ISO code:') . ' </label>
				<div class="margin-form">
					<input type="text" size="5" maxlength="4" name="iso_code" value="' . htmlentities($this->getFieldValue($obj, 'iso_code'), ENT_COMPAT, 'UTF-8') . '" style="text-transform: uppercase;" /> <sup>*</sup>
					<p>' . $this->l('1 to 4 letter ISO code (search on Wikipedia if you don\'t know)') . '</p>
				</div>
				<label>' . $this->l('Country:') . ' </label>
				<div class="margin-form">
					<select name="id_country">';
        foreach (Country::getCountries((int) $cookie->id_lang, false, true, false) as $country) {
            echo '<option value="' . (int) $country['id_country'] . '"' . ($this->getFieldValue($obj, 'id_country') == $country['id_country'] ? ' selected="selected"' : '') . '>' . $country['name'] . '</option>';
        }
        echo '
					</select>
					<p>' . $this->l('Country where state, region or city is located') . '</p>
				</div>
				<label>' . $this->l('Zone:') . ' </label>
				<div class="margin-form">
					<select name="id_zone">';
        $zones = Zone::getZones();
        foreach ($zones as $zone) {
            echo '<option value="' . (int) $zone['id_zone'] . '"' . ($this->getFieldValue($obj, 'id_zone') == $zone['id_zone'] ? ' selected="selected"' : '') . '>' . $zone['name'] . '</option>';
        }
        echo '
					</select>
					<p>' . $this->l('Geographical region where this state is located') . '<br />' . $this->l('Used for shipping') . '</p>
				</div>
				<label>' . $this->l('Status:') . ' </label>
				<div class="margin-form">
					<input type="radio" name="active" id="active_on" value="1" ' . ((!$obj->id or $this->getFieldValue($obj, 'active')) ? 'checked="checked" ' : '') . '/>
					<label class="t" for="active_on"> <img src="../img/admin/enabled.gif" alt="' . $this->l('Enabled') . '" title="' . $this->l('Enabled') . '" /></label>
					<input type="radio" name="active" id="active_off" value="0" ' . ((!$this->getFieldValue($obj, 'active') and $obj->id) ? 'checked="checked" ' : '') . '/>
					<label class="t" for="active_off"> <img src="../img/admin/disabled.gif" alt="' . $this->l('Disabled') . '" title="' . $this->l('Disabled') . '" /></label>
					<p>' . $this->l('Enabled or disabled') . '</p>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:57,代码来源:AdminStates.php

示例14: displayForm

    public function displayForm($isMainTab = true)
    {
        global $cookie, $currentIndex;
        parent::displayForm();
        $currentProfile = (int) Tools::getValue('id_profile');
        if (!$currentProfile) {
            $currentProfile = 1;
        }
        $tabs = Tab::getTabs((int) $cookie->id_lang);
        $profiles = Profile::getProfiles((int) $cookie->id_lang);
        $permissions = Profile::getProfileAccesses((int) $currentProfile);
        echo '
		<form action="' . $currentIndex . '&submitAddPermissions=1&token=' . $this->token . '" id="form_permissions" method="post">
			<input type="hidden" name="id_profile" value="' . (int) $currentProfile . '" />
			<table class="table" cellspacing="0">
				<tr>
					<th ' . ($currentProfile == (int) _PS_ADMIN_PROFILE_ ? 'colspan="6"' : '') . '>' . $this->l('Profile') . '&nbsp;
						<select name="id_profile" onchange="window.location = \'' . Tools::getHttpHost(true, true) . $currentIndex . '&token=' . $this->token . '&id_profile=\'+this.options[this.selectedIndex].value;">';
        if ($profiles) {
            foreach ($profiles as $profile) {
                echo '<option value="' . (int) $profile['id_profile'] . '" ' . ((int) $profile['id_profile'] == $currentProfile ? 'selected="selected"' : '') . '>' . Tools::safeOutput($profile['name']) . '</option>';
            }
        }
        echo '
					</select>
				</th>';
        if ($currentProfile != (int) _PS_ADMIN_PROFILE_) {
            echo '
				<th class="center">' . $this->l('View') . '<br /><input type="checkbox" name="1" id="viewall" /></th>
				<th class="center">' . $this->l('Add') . '<br /><input type="checkbox" name="1" id="addall" /></th>
				<th class="center">' . $this->l('Edit') . '<br /><input type="checkbox" name="1" id="editall" /></th>
				<th class="center">' . $this->l('Delete') . '<br /><input type="checkbox" name="1" id="deleteall" /></th>
				<th class="center">' . $this->l('All') . '<br /><input type="checkbox" name="1" id="allall" /></th>
			</tr>';
        }
        if (!count($tabs)) {
            echo '<tr><td colspan="5">' . $this->l('No tab') . '</td></tr>';
        } elseif ($currentProfile == (int) _PS_ADMIN_PROFILE_) {
            echo '<tr><td colspan="5">' . $this->l('Administrator permissions cannot be modified.') . '</td></tr>';
        } else {
            foreach ($tabs as $tab) {
                if (!$tab['id_parent'] || (int) $tab['id_parent'] == -1) {
                    echo $this->printTabAccess((int) $currentProfile, $tab, isset($permissions[(int) $tab['id_tab']]) ? $permissions[(int) $tab['id_tab']] : 0, false);
                    foreach ($tabs as $child) {
                        if ($child['id_parent'] === $tab['id_tab']) {
                            echo $this->printTabAccess($currentProfile, $child, isset($permissions[(int) $child['id_tab']]) ? $permissions[(int) $child['id_tab']] : 0, true);
                        }
                    }
                }
            }
        }
        echo '</table>
			<p><input type="submit" value="' . $this->l('   Save   ') . '" name="submitAddPermissions" class="button" /></p>
		</form>
		<script type="text/javascript">managePermissions();</script>';
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:56,代码来源:AdminAccess.php

示例15: displayForm

    public function displayForm($isMainTab = true)
    {
        global $currentIndex;
        parent::displayForm();
        if (!($obj = $this->loadObject(true))) {
            return;
        }
        echo '
		<form action="' . $currentIndex . '&submitAdd' . $this->table . '=1&token=' . $this->token . '" method="post">
		' . ($obj->id ? '<input type="hidden" name="id_' . $this->table . '" value="' . $obj->id . '" />' : '') . '
			<fieldset class="width3">
				<legend><img src="../img/admin/contact.gif" alt="" />' . $this->l('Contacts') . '</legend>
				<label>' . $this->l('Title:') . ' </label>
				<div class="margin-form">';
        foreach ($this->_languages as $language) {
            echo '
					<div id="name_' . $language['id_lang'] . '" style="display: ' . ($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none') . '; float: left;">
						<input size="33" type="text" name="name_' . $language['id_lang'] . '" value="' . htmlentities($this->getFieldValue($obj, 'name', (int) $language['id_lang']), ENT_COMPAT, 'UTF-8') . '" /><sup> *</sup>
						</div>';
        }
        $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name¤description', 'name');
        echo '		<p style="clear: both">' . $this->l('Contact name, e.g., Technical Support') . '</p>
				</div>
				<label>' . $this->l('E-mail address') . '</label>
				<div class="margin-form">
					<input type="text" size="33" name="email" value="' . htmlentities($this->getFieldValue($obj, 'email'), ENT_COMPAT, 'UTF-8') . '" /><sup> *</sup>
					<p style="clear: both">' . $this->l('E-mails will be sent to this address') . '</p>
				</div>
				<label>' . $this->l('Connect to Customer Service section') . '</label>
				<div class="margin-form">
					<input type="radio" name="customer_service" id="customer_service_on" value="1" ' . ($this->getFieldValue($obj, 'customer_service') ? 'checked="checked" ' : '') . '/>
					<label class="t" for="customer_service_on"> <img src="../img/admin/enabled.gif" alt="' . $this->l('Enabled') . '" title="' . $this->l('Enabled') . '" /></label>
					<input type="radio" name="customer_service" id="customer_service_off" value="0" ' . (!$this->getFieldValue($obj, 'customer_service') ? 'checked="checked" ' : '') . '/>
					<label class="t" for="customer_service_off"> <img src="../img/admin/disabled.gif" alt="' . $this->l('Disabled') . '" title="' . $this->l('Disabled') . '" /></label>
					<p>' . $this->l('The messages will be saved in the Customer Service tab') . '</p>
				</div><div class="clear">&nbsp;</div>
				<label>' . $this->l('Description') . '</label>
				<div class="margin-form">';
        foreach ($this->_languages as $language) {
            echo '
					<div id="description_' . $language['id_lang'] . '" style="display: ' . ($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none') . '; float: left;">
						<textarea name="description_' . $language['id_lang'] . '" cols="36" rows="5">' . htmlentities($this->getFieldValue($obj, 'description', (int) $language['id_lang']), ENT_COMPAT, 'UTF-8') . '</textarea>
					</div>';
        }
        $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name¤description', 'description');
        echo '
					<p style="clear: both">' . $this->l('Further information regarding this contact') . '</p>
				</div>
				<div class="margin-form">
					<input type="submit" value="' . $this->l('   Save   ') . '" name="submitAdd' . $this->table . '" class="button" />
				</div>
				<div class="small"><sup>*</sup> ' . $this->l('Required field') . '</div>
			</fieldset>
		</form>';
    }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:55,代码来源:AdminContacts.php


注:本文中的AdminTab::displayForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。