summaryrefslogtreecommitdiff
path: root/script/feedback/feedback.js
diff options
context:
space:
mode:
Diffstat (limited to 'script/feedback/feedback.js')
-rw-r--r--script/feedback/feedback.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/script/feedback/feedback.js b/script/feedback/feedback.js
index a151f3b..da94efc 100644
--- a/script/feedback/feedback.js
+++ b/script/feedback/feedback.js
@@ -80,11 +80,20 @@ jQuery(document).ready(function($) {
$( '.postman-reason-input' ).hide();
if ( $( this ).hasClass( 'postman-custom-input' ) ) {
- $( '#postman-deactivate-reasons' ).next( '.postman-reason-input' ).show();
+ var reason = $(this).find('input').data('reason');
+ var wrap = $( '#postman-deactivate-reasons' ).next( '.postman-reason-input' );
+ var input = wrap.find('input');
+ console.log(input);
+
+ if ( reason ) {
+ input.attr('placeholder',reason);
+ } else {
+ input.attr('placeholder','Do you mind help and give more detailes?');
+ }
+ wrap.show();
}
if ( $( this ).hasClass( 'postman-support-input' ) ) {
- console.log($(this));
$( this ).find( '.postman-reason-input' ).show();
}
});