mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
commit
c92f7f3520
@ -34,7 +34,7 @@
|
||||
</label>
|
||||
<select id="android-config-notifier" class="form-control" data-default="0">
|
||||
<option value="1">Local Polling</option>
|
||||
<option value="2">Google Cloud Messaging ( GCM )</option>
|
||||
<option value="2">Firebase Cloud Messaging ( FCM )</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -62,16 +62,6 @@
|
||||
</label>
|
||||
<input id="android-config-gcm-api-key" type="text" class="form-control" >
|
||||
</div>
|
||||
|
||||
<div class="wr-input-control">
|
||||
<label class="wr-input-label" for="android-config-gcm-sender-id">
|
||||
Sender ID*
|
||||
<span class="helper" title="GCM Sender ID">
|
||||
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
|
||||
</span>
|
||||
</label>
|
||||
<input id="android-config-gcm-sender-id" type="text" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<h4>
|
||||
End User License Agreement ( EULA )
|
||||
|
||||
@ -124,8 +124,6 @@ $(document).ready(function () {
|
||||
$("input#android-config-notifier-frequency").val(config.value / 1000);
|
||||
} else if (config.name == configParams["GCM_API_KEY"]) {
|
||||
$("input#android-config-gcm-api-key").val(config.value);
|
||||
} else if (config.name == configParams["GCM_SENDER_ID"]) {
|
||||
$("input#android-config-gcm-sender-id").val(config.value);
|
||||
} else if (config.name == configParams["ANDROID_EULA"]) {
|
||||
$("#android-eula").val(config.value);
|
||||
}
|
||||
@ -159,7 +157,7 @@ $(document).ready(function () {
|
||||
var notifierType = $("#android-config-notifier").find("option:selected").attr("value");
|
||||
var notifierFrequency = $("input#android-config-notifier-frequency").val();
|
||||
var gcmAPIKey = $("input#android-config-gcm-api-key").val();
|
||||
var gcmSenderId = $("input#android-config-gcm-sender-id").val();
|
||||
var gcmSenderId = "sender_id";
|
||||
var androidLicense = tinyMCE.activeEditor.getContent();
|
||||
var errorMsgWrapper = "#android-config-error-msg";
|
||||
var errorMsg = "#android-config-error-msg span";
|
||||
@ -170,10 +168,7 @@ $(document).ready(function () {
|
||||
$(errorMsg).text("Provided notifier frequency is invalid. ");
|
||||
$(errorMsgWrapper).removeClass("hidden");
|
||||
} else if (notifierType == notifierTypeConstants["GCM"] && !gcmAPIKey) {
|
||||
$(errorMsg).text("GCM API Key is a required field. It cannot be empty.");
|
||||
$(errorMsgWrapper).removeClass("hidden");
|
||||
} else if (notifierType == notifierTypeConstants["GCM"] && !gcmSenderId) {
|
||||
$(errorMsg).text("GCM Sender ID is a required field. It cannot be empty.");
|
||||
$(errorMsg).text("FCM API Key is a required field. It cannot be empty.");
|
||||
$(errorMsgWrapper).removeClass("hidden");
|
||||
} else {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user