nodebb-plugin-simple-contact 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-simple-contact",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "description": "תוסף טופס צור קשר עם התראות למנהלים וניהול פניות",
5
5
  "main": "library.js",
6
6
  "nbbpm": {
@@ -19,7 +19,6 @@
19
19
  <label for="username" style="font-weight:600; display:block; margin-bottom:6px;">שם משתמש בפורום</label>
20
20
  <input type="text" class="form-control" id="username" name="username" style="border-radius:10px; padding:10px;">
21
21
  </div>
22
-
23
22
  <div class="form-group" style="margin-bottom:16px;">
24
23
  <label for="email" style="font-weight:600; display:block; margin-bottom:6px;">כתובת מייל *</label>
25
24
  <input type="email" class="form-control" id="email" name="email" required style="border-radius:10px; padding:10px;">
@@ -58,7 +57,7 @@
58
57
 
59
58
  var formData = {
60
59
  fullName: form.find('#fullName').val(),
61
- username: form.find('#username').val(),
60
+ username: (app.user && app.user.uid > 0) ? app.user.username : form.find('#username').val(),
62
61
  email: form.find('#email').val(),
63
62
  content: form.find('#content').val(),
64
63
  _csrf: config.csrf_token
@@ -91,7 +90,6 @@
91
90
  }
92
91
  var $ = jQuery;
93
92
  initContactForm($);
94
-
95
93
  $(window).off('action:ajaxify.end.contact').on('action:ajaxify.end.contact', function(ev, data) {
96
94
  if (data.url === 'contact') {
97
95
  initContactForm($);
@@ -101,4 +99,4 @@
101
99
 
102
100
  safeBoot();
103
101
  })();
104
- </script>
102
+ </script>