Force Users to post reason for editing

View previous topic View next topic Go down

Force Users to post reason for editing

Post by _Twisted_Mods_ on 1/24/2015, 7:29 pm

avatar
_Twisted_Mods_
Founder
Founder

Posts : 101
Reputation : 2
Birthday : 1986-08-05
Join date : 2014-10-03
Age : 30
Location : USA

View user profile
phpbb3 

acp>modules>javascript management

turn on javascript then save

create a new javascript

set to in all pages


Code:
$(function() {
  var rsmsg = '*You Must Enter A Reason To Send';
if($('input[name="edit_reason"]').val() == ""){
        $('input[name="post"]').attr('disabled','disabled');
 
       $('input[name="edit_reason"]').after(' <br><span
id="edrmsg"
style="color:red;font-weight:bolder;">'+rsmsg+'</span>');
    }
    else{
        $('input[name="post"]').removeAttr('disabled');
        $('#edrmsg').remove();
    }
$('input[name="edit_reason"]').keyup(function(){
  if($('input[name="edit_reason"]').val() == ""){
        $('input[name="post"]').attr('disabled','disabled');
 
       $('input[name="edit_reason"]').after(' <br><span
id="edrmsg"
style="color:red;font-weight:bolder;">'+rsmsg+'</span>');
    }
    else{
        $('input[name="post"]').removeAttr('disabled');
        $('#edrmsg').remove();
    }
}) 
});

submit

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum