Reason For Editing Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
2 posters

    Reason For Editing

    smejker
    smejker
    Forumember


    Male Posts : 167
    Reputation : 4
    Language : serbo-croatian/english/macedonian/bulgarian

    Reason For Editing Empty Reason For Editing

    Post by smejker January 27th 2015, 9:47 am

    In this post:


    Code:
    http://help.forumotion.com/t138033-how-to-force-users-to-fill-in-reason-for-editing?highlight=reason

    I find this script:

    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();
        }
    }) 
    });

    It's work perfectly, but i have queston... When is first edited we must to write reason for editing... but when we open it for second, or third time there is no option to must write reason for editing...

    So i wonder how to fix this?

    Thanks in Advance...

    Regards & Respect!
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Reason For Editing Empty Re: Reason For Editing

    Post by _Twisted_Mods_ January 27th 2015, 3:35 pm

    yea first time i wrote that i made it check to see if the reason box was empty so i redone it and now it gets the text of the reason box and doesn't let you submit until the reason has been changed


    Code:
        $(function() {
          var rsmsg = '*You Must Enter A Reason To Send';
             var oldmsg = input[name="edit_reason"]').val();
        if($('input[name="edit_reason"]').val() == oldmsg){
                $('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() == oldmsg){
                $('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();
            }
        })
          });
    smejker
    smejker
    Forumember


    Male Posts : 167
    Reputation : 4
    Language : serbo-croatian/english/macedonian/bulgarian

    Reason For Editing Empty Re: Reason For Editing

    Post by smejker January 30th 2015, 10:46 am

    Hmm, That is not what I looking for... Anyway Thanks _Twisted_Mods_
    smejker
    smejker
    Forumember


    Male Posts : 167
    Reputation : 4
    Language : serbo-croatian/english/macedonian/bulgarian

    Reason For Editing Empty Re: Reason For Editing

    Post by smejker February 2nd 2015, 3:52 pm

    BUUUUUUMMMMPPPPP!!! Very Happy
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Reason For Editing Empty Re: Reason For Editing

    Post by _Twisted_Mods_ February 15th 2015, 8:40 pm

    not really sure what your asking the code i provided should do what you asked