Commit cff5f4ea authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5833-management-tab-footer-should-be-in-a-smarty-template' into '1.4-dev'

Resolve "Management tab footer should be in a smarty template"

See merge request fusiondirectory/fd!269
Showing with 19 additions and 20 deletions
+19 -20
{if $readOnly}
<p class="plugbottom">
<input type="submit" name="edit_cancel" value="{msgPool type=cancelButton}"/>
</p>
{else}
<p class="plugbottom">
<input type="submit" name="edit_finish" value="{msgPool type=okButton}"/>
&nbsp;
{if $showApply}
<input type="submit" name="edit_apply" value="{msgPool type=applyButton}"/>
&nbsp;
{/if}
<input type="submit" name="edit_cancel" value="{msgPool type=cancelButton}"/>
</p>
{/if}
...@@ -556,26 +556,10 @@ class management ...@@ -556,26 +556,10 @@ class management
return ''; return '';
} }
// TODO move to smarty template $smarty = get_smarty();
// In case an of locked entry, we may have opened a read-only tab. $smarty->assign('readOnly', $this->tabObject->readOnly());
$str = ''; $smarty->assign('showApply', ($this->currentDn != 'new'));
if ($this->tabObject->readOnly()) { return $smarty->fetch(get_template_path('tabfooter.tpl'));
$str .= '<p class="plugbottom">'."\n".
'<input type="submit" name="edit_cancel" value="'.msgPool::cancelButton().'">'."\n".
'</p>';
} else {
// Display ok, (apply) and cancel buttons
$str .= '<p class="plugbottom">'."\n";
$str .= '<input type="submit" name="edit_finish" value="'.msgPool::okButton().'"/>'."\n";
$str .= "&nbsp;\n";
if ($this->currentDn != 'new') {
$str .= '<input type="submit" name="edit_apply" value="'.msgPool::applyButton().'"/>'."\n";
$str .= "&nbsp;\n";
}
$str .= '<input type="submit" name="edit_cancel" value="'.msgPool::cancelButton().'"/>'."\n";
$str .= '</p>';
}
return $str;
} }
function handleTemplateApply ($cancel = FALSE) function handleTemplateApply ($cancel = FALSE)
......
  • SonarQube analysis indicates that quality gate is failed.

    • Security Rating on New Code is passed: Actual value 1
    • Reliability Rating on New Code is passed: Actual value 1
    • Maintainability Rating on New Code is passed: Actual value 1
    • Duplicated Lines on New Code (%) is failed: Actual value 10.912906610703043 > 3

    SonarQube analysis reported no issues.

    By Ghost User on 2018-05-09T14:35:40 (imported from GitLab)

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment