Jump to content
Andreas Augustin

Deactivate renaming and image editing function in admin panel

Recommended Posts

Hello!

Can I deactivate the renaming feature of images and the editing (croping, rotating etc) in the processwire admin panel?

 

Share this post


Link to post
Share on other sites

I found, that Ican skip fields in the ProcessPageEditImageSelect Config... but when I add the field... nothing happens. I still can crop the image

Bildschirmfoto 2018-03-08 um 14.02.38.png

Share this post


Link to post
Share on other sites
7 hours ago, Andreas Augustin said:

I solved it with AdminOnSteroids and Custom CSS/JS

Glad you sorted out a solution. Any chance you'd like to share in case someone else wants to achieve this as well? Thanks!

Share this post


Link to post
Share on other sites

Sure - I added 2 files with adminonsteroids:

  • site/template/admin/admin.css
  • site/template/admin/admin.js
     

With these codes I hide following features:

  • Image Cropping
  • Image Variations
  • Image Title change
  • Image Actions
  • Image Change on Drag & Drop
/* added ot admin panel sites */

.InputfieldFileActionSelect,
.InputfieldImageEdit__info,
.InputfieldImageEdit__buttons button {
  display: none !important;
}

.InputfieldImageEdit__buttons button.InputfieldImageButtonFocus {
  display: inline-block !important;
}

.InputfieldImageEdit__name span {
  cursor: default;
}

.InputfieldImageEdit__imagewrapper .detail-upload {
  visibility: hidden !important;
}
// added ot admin panel sites

$(document).ready(function() {
  $('.InputfieldImageEdit__name span').removeAttr('contenteditable');
});

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By codevark
      The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
      I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
      Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.
      --Pete
    • By vwatson
      I don't have any fontawesome icons in the admin section. Not sure what's wrong. They used to appear. I've tried all the user profiles and they're gone in all of them.
      Using the browser inspector tool, I see this message:
      Access to font at 'https://www.domain.com/wire/templates-admin/styles/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0' from origin 'http://domain.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
      I'm not sure why this is occurring or how to fix it. Any help would be greatly appreciated. 
    • By horst
      Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations.
      EDIT:
      A good solution for protecting original images can be found a bit down in this thread:
       
      Old content of this initial post:
       
    • By Guy Incognito
      I seem to be running into a repeated fatal error in a fresh PW install version 3.0.148. I can't quite put my finger on the pattern but it seems to be around deleting image fields or removing images from certain image fields.
      This is the trace from the log generated by trying to save a page and delete an image from an image field:
      Fatal Error: Uncaught Error: Cannot access protected property Pageimage::$original in /wire/core/PageimageVariations.php:256 Stack trace: 1. /wire/core/Pageimage.php(1327): PageimageVariations->getInfo() 2. /wire/core/Wire.php(386): Pageimage->___isVariation() 3. /wire/core/WireHooks.php(823): Wire->_callMethod() 4. /wire/core/Wire.php(450): WireHooks->runHooks() 5. /wire/core/Pageimage.php(1369): Wire->__call() 6. /wire/core/Pageimage.php(399): Pageimage->getOriginal() 7. /wire/core/WireData.php(333): Pageimage->get() 8. /wire/core/PageimageVariations.php(256): Pro Line 256 of /wire/core/PageimageVariations.php Earlier in the day I was experimenting with custom fields for images for the first time and kept running into this error, thinking it was me using this feature wrong and not having time to read up I deleted the custom image fields template and went about my business. So now I don't know if I triggered an issue or whether it was never related to the custom image fields in the first place?
      Any ideas?
    • By humanafterall
      I'm using some Custom fields for images: 
      https://processwire.com/blog/posts/pw-3.0.142/#custom-fields-for-files-images

      When I save the page, and return the fields are blank. When I re-add the text to the fields and save again then the fields save as expected.

      I know this is stated as being quite experimental but it's super useful feature I'd love to get working correctly.
      I have fields that are CKEditor fields but have overidden this on the image specific template. I've also tried it with regular text fields and I get the same bug.
      (currently using Processwire 3.0.155)
      **UPDATE**
      I've found this issue is specific to editing on pages using the PageTable fieldtype. The fields are not saving when I save the page in the PageTable.
×
×
  • Create New...