• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Golang element.LongText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/corestoreio/csfw/config/element.LongText函数的典型用法代码示例。如果您正苦于以下问题:Golang LongText函数的具体用法?Golang LongText怎么用?Golang LongText使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LongText函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "webapi",
			Label:     `Otnegam Web API`,
			SortOrder: 102,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Webapi::config_webapi
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "soap",
					Label:     `SOAP Settings`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: webapi/soap/charset
							ID:        "charset",
							Label:     `Default Response Charset`,
							Comment:   element.LongText(`If empty, UTF-8 will be used.`),
							Type:      element.TypeText,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:32,代码来源:config_webapi.go


示例2: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "vault",
					Label:     `Vault Provider`,
					SortOrder: 2,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/vault/vault_payment
							ID:      "vault_payment",
							Label:   `Vault Provider`,
							Comment: element.LongText(`Specified provider should be enabled.`),
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Vault\Model\Adminhtml\Source\VaultProvidersMap
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "vault",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/vault/debug
							ID:      `debug`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/vault/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Vault\Model\VaultPaymentInterface`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:55,代码来源:config_vault.go


示例3: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "dev",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "js",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: dev/js/session_storage_logging
							ID:        "session_storage_logging",
							Label:     `Log JS Errors to Session Storage`,
							Comment:   element.LongText(`If enabled, can be used by functional tests for extended reporting`),
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: dev/js/session_storage_key
							ID:        "session_storage_key",
							Label:     `Log JS Errors to Session Storage Key`,
							Comment:   element.LongText(`Use this key to retrieve collected js errors`),
							Type:      element.TypeText,
							SortOrder: 110,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `collected_errors`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:39,代码来源:config_ui.go


示例4: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "system",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "cron",
					Label:     `Cron (Scheduled Tasks) - all the times are in minutes`,
					Comment:   element.LongText(`For correct URLs generated during cron runs please make sure that Web > Secure and Unsecure Base URLs are explicitly set.`),
					SortOrder: 15,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields:    element.NewFieldSlice(),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:18,代码来源:config_cron.go


示例5: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "cataloginventory",
			Label:     `Inventory`,
			SortOrder: 50,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_CatalogInventory::cataloginventory
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "options",
					Label:     `Stock Options`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: cataloginventory/options/can_subtract
							ID:        "can_subtract",
							Label:     `Decrease Stock When Order is Placed`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/options/can_back_in_stock
							ID:        "can_back_in_stock",
							Label:     `Set Items' Status to be In Stock When Order is Cancelled`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/options/show_out_of_stock
							ID:        "show_out_of_stock",
							Label:     `Display Out of Stock Products`,
							Comment:   element.LongText(`Products will still be shown by direct product URLs.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// BackendModel: Otnegam\CatalogInventory\Model\Config\Backend\ShowOutOfStock
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/options/stock_threshold_qty
							ID:        "stock_threshold_qty",
							Label:     `Only X left Threshold`,
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: cataloginventory/options/display_product_stock_status
							ID:        "display_product_stock_status",
							Label:     `Display Products Availability in Stock on Storefront`,
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "item_options",
					Label:     `Product Stock Options`,
					Comment:   element.LongText(`Please note that these settings apply to individual items in the cart, not to the entire cart.`),
					SortOrder: 10,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: cataloginventory/item_options/manage_stock
							ID:        "manage_stock",
							Label:     `Manage Stock`,
							Comment:   element.LongText(`Changing can take some time due to processing whole catalog.`),
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
							// BackendModel: Otnegam\CatalogInventory\Model\Config\Backend\Managestock
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/item_options/backorders
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:config_cataloginventory.go


示例6: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "sales",
			Label:     `Sales`,
			SortOrder: 300,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Sales::config_sales
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "general",
					Label:     `General`,
					SortOrder: 5,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/general/hide_customer_ip
							ID:      "hide_customer_ip",
							Label:   `Hide Customer IP`,
							Comment: element.LongText(`Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.`),
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "totals_sort",
					Label:     `Checkout Totals Sort Order`,
					SortOrder: 10,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/totals_sort/discount
							ID:        "discount",
							Label:     `Discount`,
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   20,
						},

						&element.Field{
							// Path: sales/totals_sort/grand_total
							ID:        "grand_total",
							Label:     `Grand Total`,
							Type:      element.TypeText,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   100,
						},

						&element.Field{
							// Path: sales/totals_sort/shipping
							ID:        "shipping",
							Label:     `Shipping`,
							Type:      element.TypeText,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   30,
						},

						&element.Field{
							// Path: sales/totals_sort/subtotal
							ID:        "subtotal",
							Label:     `Subtotal`,
							Type:      element.TypeText,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   10,
						},

						&element.Field{
							// Path: sales/totals_sort/tax
							ID:        "tax",
							Label:     `Tax`,
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   40,
						},
					),
				},

				&element.Group{
					ID:        "reorder",
					Label:     `Reorder`,
					SortOrder: 20,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/reorder/allow
							ID:        "allow",
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:config_sales.go


示例7: init


//.........这里部分代码省略.........
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `LBS`,
							// SourceModel: Otnegam\Ups\Model\Config\Source\Unitofmeasure
						},

						&element.Field{
							// Path: carriers/ups/username
							ID:        "username",
							Label:     `User ID`,
							Type:      element.TypeObscure,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/ups/negotiated_active
							ID:        "negotiated_active",
							Label:     `Enable Negotiated Rates`,
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/ups/shipper_number
							ID:        "shipper_number",
							Label:     `Shipper Number`,
							Comment:   element.LongText(`Required for negotiated rates; 6-character UPS`),
							Type:      element.TypeText,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: carriers/ups/sallowspecific
							ID:        "sallowspecific",
							Label:     `Ship to Applicable Countries`,
							Type:      element.TypeSelect,
							SortOrder: 900,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Shipping\Model\Config\Source\Allspecificcountries
						},

						&element.Field{
							// Path: carriers/ups/specificcountry
							ID:         "specificcountry",
							Label:      `Ship to Specific Countries`,
							Type:       element.TypeMultiselect,
							SortOrder:  910,
							Visible:    element.VisibleYes,
							Scope:      scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							CanBeEmpty: true,
							// SourceModel: Otnegam\Directory\Model\Config\Source\Country
						},

						&element.Field{
							// Path: carriers/ups/showmethod
开发者ID:joao-parana,项目名称:csfw,代码行数:67,代码来源:config_ups.go


示例8:

// test package names are different.
var configStructure = element.MustNewConfiguration(
	&element.Section{
		ID: "web",
		Groups: element.NewGroupSlice(
			&element.Group{
				ID:        "cors",
				Label:     `CORS Cross Origin Resource Sharing`,
				SortOrder: 150,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: element.NewFieldSlice(
					&element.Field{
						// Path: `web/cors/exposed_headers`,
						ID:        "exposed_headers",
						Label:     `Exposed Headers`,
						Comment:   element.LongText(`Indicates which headers are safe to expose to the API of a CORS API specification. Separate via line break`),
						Type:      element.TypeTextarea,
						SortOrder: 10,
						Visible:   element.VisibleYes,
						Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:   "Content-Type,X-CoreStore-ID",
					},
					&element.Field{
						// Path: `web/cors/allowed_origins`,
						ID:        "allowed_origins",
						Label:     `Allowed Origins`,
						Comment:   element.LongText(`Is a list of origins a cross-domain request can be executed from.`),
						Type:      element.TypeTextarea,
						SortOrder: 20,
						Visible:   element.VisibleYes,
						Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
开发者ID:joao-parana,项目名称:csfw,代码行数:31,代码来源:primitives_test.go


示例9: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "recently_products",
					Label:     `Recently Viewed/Compared Products`,
					SortOrder: 350,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/recently_products/scope
							ID:        "scope",
							Label:     `Show for Current`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `website`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Reports\Scope
						},

						&element.Field{
							// Path: catalog/recently_products/viewed_count
							ID:        "viewed_count",
							Label:     `Default Recently Viewed Products Count`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   5,
						},

						&element.Field{
							// Path: catalog/recently_products/compared_count
							ID:        "compared_count",
							Label:     `Default Recently Compared Products Count`,
							Type:      element.TypeText,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   5,
						},
					),
				},
			),
		},
		&element.Section{
			ID:        "reports",
			Label:     `Reports`,
			SortOrder: 1000,
			Scope:     scope.NewPerm(scope.DefaultID),
			Resource:  0, // Otnegam_Reports::reports
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "dashboard",
					Label:     `Dashboard`,
					SortOrder: 1,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: reports/dashboard/ytd_start
							ID:        "ytd_start",
							Label:     `Year-To-Date Starts`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `1,1`,
						},

						&element.Field{
							// Path: reports/dashboard/mtd_start
							ID:        "mtd_start",
							Label:     `Current Month Starts`,
							Comment:   element.LongText(`Select day of the month.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:90,代码来源:config_reports.go


示例10: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "wishlist",
			Label:     `Wish List`,
			SortOrder: 140,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Wishlist::config_wishlist
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "email",
					Label:     `Share Options`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: wishlist/email/email_identity
							ID:        "email_identity",
							Label:     `Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `general`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: wishlist/email/email_template
							ID:        "email_template",
							Label:     `Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `wishlist_email_email_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: wishlist/email/number_limit
							ID:        "number_limit",
							Label:     `Max Emails Allowed to be Sent`,
							Comment:   element.LongText(`10 by default. Max - 10000`),
							Type:      element.TypeText,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   10,
						},

						&element.Field{
							// Path: wishlist/email/text_limit
							ID:        "text_limit",
							Label:     `Email Text Length Limit`,
							Comment:   element.LongText(`255 by default`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   255,
						},
					),
				},

				&element.Group{
					ID:        "general",
					Label:     `General Options`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: wishlist/general/active
							ID:        "active",
							Label:     `Enabled`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "wishlist_link",
					Label:     `My Wish List Link`,
					SortOrder: 3,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: wishlist/wishlist_link/use_qty
							ID:        "use_qty",
							Label:     `Display Wish List Summary`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:config_wishlist.go


示例11: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "carriers",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "fedex",
					Label:     `FedEx`,
					SortOrder: 120,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: carriers/fedex/active
							ID:        "active",
							Label:     `Enabled for Checkout`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/fedex/active_rma
							ID:        "active_rma",
							Label:     `Enabled for RMA`,
							Type:      element.TypeSelect,
							SortOrder: 15,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/fedex/title
							ID:        "title",
							Label:     `Title`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `Federal Express`,
						},

						&element.Field{
							// Path: carriers/fedex/account
							ID:        "account",
							Label:     `Account ID`,
							Comment:   element.LongText(`Please make sure to use only digits here. No dashes are allowed.`),
							Type:      element.TypeObscure,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/fedex/meter_number
							ID:        "meter_number",
							Label:     `Meter Number`,
							Type:      element.TypeObscure,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/fedex/key
							ID:        "key",
							Label:     `Key`,
							Type:      element.TypeObscure,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/fedex/password
							ID:        "password",
							Label:     `Password`,
							Type:      element.TypeObscure,
							SortOrder: 70,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/fedex/sandbox_mode
							ID:        "sandbox_mode",
							Label:     `Sandbox Mode`,
							Type:      element.TypeSelect,
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:config_fedex.go


示例12: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "sitemap",
			Label:     `XML Sitemap`,
			SortOrder: 70,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Sitemap::config_sitemap
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "category",
					Label:     `Categories Options`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/category/changefreq
							ID:        "changefreq",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `daily`,
							// SourceModel: Otnegam\Sitemap\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: sitemap/category/priority
							ID:        "priority",
							Label:     `Priority`,
							Comment:   element.LongText(`Valid values range from 0.0 to 1.0.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   0.5,
							// BackendModel: Otnegam\Sitemap\Model\Config\Backend\Priority
						},
					),
				},

				&element.Group{
					ID:        "product",
					Label:     `Products Options`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/product/changefreq
							ID:        "changefreq",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `daily`,
							// SourceModel: Otnegam\Sitemap\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: sitemap/product/priority
							ID:        "priority",
							Label:     `Priority`,
							Comment:   element.LongText(`Valid values range from 0.0 to 1.0.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   1,
							// BackendModel: Otnegam\Sitemap\Model\Config\Backend\Priority
						},

						&element.Field{
							// Path: sitemap/product/image_include
							ID:        "image_include",
							Label:     `Add Images into Sitemap`,
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `all`,
							// SourceModel: Otnegam\Sitemap\Model\Source\Product\Image\IncludeImage
						},
					),
				},

				&element.Group{
					ID:        "page",
					Label:     `CMS Pages Options`,
					SortOrder: 3,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/page/changefreq
							ID:        "changefreq",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:config_sitemap.go


示例13: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "catalog",
			Label:     `Catalog`,
			SortOrder: 40,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Catalog::config_catalog
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "fields_masks",
					Label:     `Product Fields Auto-Generation`,
					SortOrder: 90,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/fields_masks/sku
							ID:        "sku",
							Label:     `Mask for SKU`,
							Comment:   element.LongText(`Use {{name}} as Product Name placeholder`),
							Type:      element.TypeText,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}}`,
						},

						&element.Field{
							// Path: catalog/fields_masks/meta_title
							ID:        "meta_title",
							Label:     `Mask for Meta Title`,
							Comment:   element.LongText(`Use {{name}} as Product Name placeholder`),
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}}`,
						},

						&element.Field{
							// Path: catalog/fields_masks/meta_keyword
							ID:        "meta_keyword",
							Label:     `Mask for Meta Keywords`,
							Comment:   element.LongText(`Use {{name}} as Product Name or {{sku}} as Product SKU placeholders`),
							Type:      element.TypeText,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}}`,
						},

						&element.Field{
							// Path: catalog/fields_masks/meta_description
							ID:        "meta_description",
							Label:     `Mask for Meta Description`,
							Comment:   element.LongText(`Use {{name}} and {{description}} as Product Name and Product Description placeholders`),
							Type:      element.TypeText,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}} {{description}}`,
						},
					),
				},

				&element.Group{
					ID:        "frontend",
					Label:     `Storefront`,
					SortOrder: 100,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/frontend/list_mode
							ID:        "list_mode",
							Label:     `List Mode`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `grid-list`,
							// SourceModel: Otnegam\Catalog\Model\Config\Source\ListMode
						},

						&element.Field{
							// Path: catalog/frontend/grid_per_page_values
							ID:        "grid_per_page_values",
							Label:     `Products per Page on Grid Allowed Values`,
							Comment:   element.LongText(`Comma-separated.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `9,15,30`,
						},

						&element.Field{
							// Path: catalog/frontend/grid_per_page
							ID:        "grid_per_page",
							Label:     `Products per Page on Grid Default Value`,
							Comment:   element.LongText(`Must be in the allowed values list`),
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:structure.go


示例14: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "sales",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "msrp",
					Label:     `Minimum Advertised Price`,
					SortOrder: 110,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/msrp/enabled
							ID:        "enabled",
							Label:     `Enable MAP`,
							Comment:   element.LongText(`<strong style="color:red">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.`),
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales/msrp/display_price_type
							ID:        "display_price_type",
							Label:     `Display Actual Price`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Msrp\Model\Product\Attribute\Source\Type
						},

						&element.Field{
							// Path: sales/msrp/explanation_message
							ID:        "explanation_message",
							Label:     `Default Popup Text Message`,
							Type:      element.TypeTextarea,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `Our price is lower than the manufacturer's "minimum advertised price." As a result, we cannot show you the price in catalog or the product page. <br /><br /> You have no obligation to purchase the product once you know the price. You can simply remove the item from your cart.`,
						},

						&element.Field{
							// Path: sales/msrp/explanation_message_whats_this
							ID:        "explanation_message_whats_this",
							Label:     `Default "What's This" Text Message`,
							Type:      element.TypeTextarea,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `Our price is lower than the manufacturer's "minimum advertised price." As a result, we cannot show you the price in catalog or the product page. <br /><br /> You have no obligation to purchase the product once you know the price. You can simply remove the item from your cart.`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:64,代码来源:config_msrp.go


示例15: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "currency",
			Label:     `Currency Setup`,
			SortOrder: 60,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Backend::currency
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "options",
					Label:     `Currency Options`,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: currency/options/base
							ID:        "base",
							Label:     `Base Currency`,
							Comment:   element.LongText(`Base currency is used for all online payment transactions. If you have more than one store view, the base currency scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").`),
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `USD`,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Currency\Base
							// SourceModel: Otnegam\Config\Model\Config\Source\Locale\Currency
						},

						&element.Field{
							// Path: currency/options/default
							ID:        "default",
							Label:     `Default Display Currency`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `USD`,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Currency\DefaultCurrency
							// SourceModel: Otnegam\Config\Model\Config\Source\Locale\Currency
						},

						&element.Field{
							// Path: currency/options/allow
							ID:         "allow",
							Label:      `Allowed Currencies`,
							Type:       element.TypeMultiselect,
							SortOrder:  3,
							Visible:    element.VisibleYes,
							Scope:      scope.PermAll,
							CanBeEmpty: true,
							Default:    `USD,EUR`,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Currency\Allow
							// SourceModel: Otnegam\Config\Model\Config\Source\Locale\Currency
						},
					),
				},

				&element.Group{
					ID:        "webservicex",
					Label:     `Webservicex`,
					SortOrder: 40,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: currency/webservicex/timeout
							ID:      "timeout",
							Label:   `Connection Timeout in Seconds`,
							Type:    element.TypeText,
							Visible: element.VisibleYes,
							Scope:   scope.NewPerm(scope.DefaultID),
							Default: 100,
						},
					),
				},

				&element.Group{
					ID:        "import",
					Label:     `Scheduled Import Settings`,
					SortOrder: 50,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: currency/import/enabled
							ID:        "enabled",
							Label:     `Enabled`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: currency/import/error_email
							ID:        "error_email",
							Label:     `Error Email Recipient`,
							Type:      element.TypeText,
							SortOrder: 5,
//.........这里部分代码省略.........
开发者ID:joao-parana,项目名称:csfw,代码行数:101,代码来源:config_directory.go


示例16: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "system",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "backup",
					Label:     `Scheduled Backup Settings`,
					SortOrder: 500,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/backup/enabled
							ID:        "enabled",
							Label:     `Enable Scheduled Backup`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: system/backup/type
							ID:        "type",
							Label:     `Backup Type`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Backup\Model\Config\Source\Type
						},

						&element.Field{
							// Path: system/backup/time
							ID:        "time",
							Label:     `Start Time`,
							Type:      element.TypeTime,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
						},

						&element.Field{
							// Path: system/backup/frequency
							ID:        "frequency",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// BackendModel: Otnegam\Backup\Model\Config\Backend\Cron
							// SourceModel: Otnegam\Cron\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: system/backup/maintenance
							ID:        "maintenance",
							Label:     `Maintenance Mode`,
							Comment:   element.LongText(`Please put your store into maintenance mode during backup.`),
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
开发者ID:joao-parana,项目名称:csfw,代码行数:73,代码来源:config_backup.go


示例17: init

func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "contact",
			Label:     `Contacts`,
			SortOrder: 100,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Contact::contact
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "contact",
					Label:     `Contact Us`,
					SortOrder: 10,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: contact/contact/enabled
							ID:        "enabled",
							Label:     `Enable Contact Us`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
			 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang element.MustNewConfiguration函数代码示例发布时间:2022-05-23
下一篇:
Golang config.SectionSlice类代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap