/** * Add a disabled button with a "not allowed" notice * @param item * @param buttonName * @param buttonLabel * @throws WingException * @throws SQLException */ private void addNotAllowedButton(org.dspace.app.xmlui.wing.element.Item item, String buttonName, Message buttonLabel) throws WingException, SQLException { Button button = item.addButton(buttonName); button.setValue(buttonLabel); button.setDisabled(); item.addHighlight("fade").addContent(T_not_allowed); }
private void addAdministratorOnlyButton(Cell cell, String buttonName, Message buttonLabel) throws WingException, SQLException { Button button = cell.addButton(buttonName); button.setValue(buttonLabel); if (!AuthorizeManager.isAdmin(context)) { // Only admins can create or delete button.setDisabled(); cell.addHighlight("fade").addContent(T_sysadmins_only); } } }
private void addCollectionAdminOnlyButton(org.dspace.app.xmlui.wing.element.Item item, Collection collection, String buttonName, Message buttonLabel) throws WingException, SQLException { Button button = item.addButton(buttonName); button.setValue(buttonLabel); if (!AuthorizeManager.isAdmin(context, collection)) { // Only admins can create or delete button.setDisabled(); item.addHighlight("fade").addContent(T_collectionadmins_only); } }
private void addAdministratorOnlyButton(Cell cell, String buttonName, Message buttonLabel) throws WingException, SQLException { Button button = cell.addButton(buttonName); button.setValue(buttonLabel); if (!AuthorizeManager.isAdmin(context)) { // Only admins can create or delete button.setDisabled(); cell.addHighlight("fade").addContent(T_sysadmins_only); } } }
button.setValue(T_submit_upload); if (bundleCount == 0) { button.setDisabled();
if (!ConfigurationManager.getBooleanProperty("xmlui.user.assumelogin", false)) submitLoginAs.setDisabled(); submitDelete.setDisabled();
Button upButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_up", ((bitstreamIndex == 0) ? "disabled" : "") + " icon-button arrowUp "); if((bitstreamIndex == 0)){ upButton.setDisabled(); Button downButton = cell.addButton("submit_order_" + bundle.getID() + "_" + bitstream.getID() + "_down", (bitstreamIndex == (bitstreams.length - 1) ? "disabled" : "") + " icon-button arrowDown "); if(bitstreamIndex == (bitstreams.length - 1)){ downButton.setDisabled(); button.setDisabled();
Button button = actions.addButton("submit_unmap"); button.setValue(T_submit_unmap); button.setDisabled(); actions.addButton("submit_return").setValue(T_submit_return); Button button = actions.addButton("submit_unmap"); button.setValue(T_submit_unmap); button.setDisabled(); actions.addButton("submit_return").setValue(T_submit_return);
button.setDisabled(); queryItem.addHighlight("fade").addContent(T_no_add);
accept.setValue(isRepeating ? T_add : T_accept); Button more = buttItem.addButton("more", "choices-lookup"); more.setDisabled(); more.setValue(T_more); Button cancel = buttItem.addButton("cancel", "choices-lookup");