编辑内容类型的选定字段的灵活表单。

collective.fieldedit的Python项目详细描述


https://travis-ci.org/collective/collective.fieldedit.svg?branch=masterhttps://coveralls.io/repos/github/collective/collective.fieldedit/badge.svg?branch=master

collective.fieldedit

编辑内容类型的选定字段的视图。

功能

  • 只需调用带有要编辑的字段的视图作为查询字符串参数即可使用
  • 选择一个或多个要编辑的字段
  • 对于每个字段,您可以在“输入”、“显示”和“隐藏”之间进行选择
  • 使用与默认编辑表单相同的小部件和验证器
  • 尊重模式提示,如字段权限、不变量和小部件
  • 在modals/popups中使用很好,可以编辑一个或多个字段(但不是全部)

通过添加到视图@@field_edit_form的链接来使用它,并将要编辑的字段作为查询字符串传递,每个字段最多有三个由“:”分隔的参数。

示例

编辑文档文本:

http://localhost:8080/Plone/front-page/@@field_edit_form?fields=IRichText.text

编辑字段标题和主题:

http://localhost:8080/Plone/front-page/@@field_edit_form?fields=IDublinCore.subjects&fields=IDublinCore.title

显示文本并编辑发布日期:

http://localhost:8080/Plone/front-page/@@field_edit_form?fields=IRichText.text:display:0&fields=IRelatedItems.relatedItems

呈现一个链接以在模式中编辑标题:

<a href="${python:context.absolute_url()}/field_edit_form?fields=IBasic.title"
   class="pat-plone-modal"
   data-pat-plone-modal='{"actionOptions": {"reloadWindowOnClose": false, "redirectOnResponse": true},
                          "buttons": ".formControls > button",
                          "content": "#content-core"}'>
    Edit the Title in a modal
</a>

编辑多个字段:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1&amp;fields=field2&amp;fields=field3"
    Edit some fields.
</a>

显示一个字段,编辑另一个“

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1:display&amp;fields=field2"
    Edit one field, display another.
</a>

隐藏标签:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1::0"
    Edit one field, display another.
</a>

添加隐藏字段:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1:hidden&amp;fields=field2"
    Edit one field, display another.
</a>

行为字段需要以行为作为前缀:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=IBasic.title"
    Edit one field, display another.
</a>

安装

通过将collective.fieldedit添加到构建中来安装它:

[buildout]

...

eggs =
    collective.fieldedit

然后运行bin/buildout

许可证

该项目是根据gplv2授权的。

贡献者

更改日志

1.0a2(2018-08-04)

  • 修复取消时的重定向和剩余WebDAV锁定(1) [PBAUER]

1.0a1(2017-10-10)

  • 初次发布。 [PBAUER]

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java IntelliJ找不到依赖项选项卡   java向字符串数组string[]添加元素并在Junit中测试结果   如何在eclipse中获取活动java项目的名称   如何使用java在mysql中插入时间   java ArrayList更新了插入一行,但Jtable仍然没有刷新   如何在JavaSwing中命名坐标(点)   java Matcher/模式不打印   java错误地设置了arraylist   使用UsernamePasswordCredential提供程序的java列表Azure AD   java在HTTP请求中设置UTC时间   未加载事件:jquery完整日历Java集成   java Maven插件依赖项无法从内部repo解析依赖项   Maven更新重置Java版本   java如何向中添加图片。带有Apache POI XWPF的docx,但不指定其大小   Java最大函数递归