如何从“添加输入”中删除详细信息字段

时间:2019-10-17 21:39:36

标签: omeka

我想从“添加输入”中删除特定字段,我的意思是,我只想从覆盖范围和文本中删除按钮“添加输入”,我发现了.php文件,我猜想它可以控制这些代码行,但是我试图编写一些东西,但是没有用,我正在弄清楚如何限制这条指令,如果有人可以帮助我的话

以下代码位于application / views / helpers / ElementForm

///原始代码

//过滤元素形式显示的组件         $labelComponent = $this->_getLabelComponent(); $inputsComponent = $this->_getInputsComponent($extraFieldCount); $descriptionComponent = $this->_getDescriptionComponent(); $commentComponent = $this->_getCommentComponent(); $addInputComponent = $this->view->formButton('add_element_' . $this->_element['id'], __('Add Input'), array('class' => 'add-element')); $components = array( 'label' => $labelComponent, 'inputs' => $inputsComponent, 'description' => $descriptionComponent, 'comment' => $commentComponent, 'add_input' => $addInputComponent, 'html' => null );

//////我添加的代码

//过滤元素形式显示的组件        $labelComponent = $this->_getLabelComponent(); if ( $labelComponent = 'coverage'){ $inputsComponent = 0 } else{ $inputsComponent = $this->_getInputsComponent($extraFieldCount);} $descriptionComponent = $this->_getDescriptionComponent(); $commentComponent = $this->_getCommentComponent(); $addInputComponent = $this->view->formButton('add_element_' . $this->_element['id'], __('Add Input'), array('class' => 'add-element')); $components = array( 'label' => $labelComponent, 'inputs' => $inputsComponent, 'description' => $descriptionComponent, 'comment' => $commentComponent, 'add_input' => $addInputComponent, 'html' => null );

我还没有修复它,我不知道我是否必须从定义这些“元素”或诸如此类的东西的全局变量中修改一个函数

0 个答案:

没有答案