pitaj / nodebb-plugin-calendar

Fully-featured calendar plugin for NodeBB
42 stars 34 forks source link

Reminders don't work #98

Closed Terra-F closed 5 years ago

Terra-F commented 6 years ago

Hi there!

Thank you for this awesome and absolutely indispensable plugin. One thing, though, when I create an event and add one or more reminders, I can't save (nothing happens when I press the button). Without reminders, it works fine. We are using NodeBB 1.7.0.

Please let me know if you need more information.

pitaj commented 6 years ago

Any errors server side?

Terra-F commented 6 years ago

Nothing in my logs/output.log, no output to the terminal while running ./nodebb dev and no error logs in the browser console (Firefox).

What I did notice was the reminder-div getting the class has-error when I add a reminder.

<div class="form-group plugin-calendar-event-reminders has-error">
        <label for="plugin-calendar-event-editor-reminders">
          <i class="fa fa-bell" aria-hidden="true"></i> Reminders
        </label>
        <br>
        <ul id="plugin-calendar-event-editor-reminders"><li class="plugin-calendar-event-editor-reminder" data-value="600000">
      10 minuten
      <a class="remove" href="#">
        <i class="fa fa-times"></i>
      </a>
    </li>
          <div class="dropdown dropup" id="plugin-calendar-event-editor-reminders-add">
            <a class="dropdown-toggle" href="#" id="plugin-calendar-event-editor-reminders-add-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Add a reminder
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu" aria-labelledby="plugin-calendar-event-editor-reminders-add-button">
              <li data-value="600000">
                <a href="#">10 minuten</a>
              </li>
              <li data-value="1800000">
                <a href="#">30 minuten</a>
              </li>
              <li data-value="3600000">
                <a href="#">1 uur</a>
              </li>
              <li role="separator" class="divider"></li>
              <li data-value="custom">
                <a href="#">Custom...</a>
                <div class="well well-sm" id="plugin-calendar-event-editor-reminder-custom" style="display: none;">

    <div class="form-group">
      <label for="plugin-calendar-event-editor-reminder-custom-number">
        Custom Reminder
      </label>
      <input class="form-control" value="2" id="plugin-calendar-event-editor-reminder-custom-number" type="tel">
    </div>
    <div class="form-group" id="plugin-calendar-event-editor-reminder-custom-unit">
      <div class="btn-group" data-toggle="buttons">
        <label class="btn btn-sm btn-default active">
          <input value="mm" name="reminder-custom-unit" class="active" type="radio">
           minuten
        </label>
        <label class="btn btn-sm btn-default">
          <input value="hh" name="reminder-custom-unit" checked="" type="radio">
           uur
        </label>
        <label class="btn btn-sm btn-default">
          <input value="dd" name="reminder-custom-unit" class="active" type="radio">
           dagen
        </label>
      </div>
    </div>
    <button type="button" class="btn btn-sm btn-primary">
      <span class="sr-only">Verzenden</span>
      <i class="fa fa-check"></i>
    </button>

</div>
              </li>
            </ul>
          </div>
        </ul>
      </div>

Does this help? Should I do something to find out for what reasons has-error appears?

Terra-F commented 6 years ago

I find this warning upon upgrading NodeBB to v1.7.2. Might it be related?

npm WARN eonasdan-bootstrap-datetimepicker@4.17.47 requires a peer of moment-timezone@^0.4.0 but none was installed.
pitaj commented 5 years ago

Try nodebb-plugin-calendar@1.0.0-alpha.45