|
|
@@ -237,13 +237,44 @@
|
|
|
</fieldset>
|
|
|
</form>
|
|
|
|
|
|
+ <form action="/_api/admin/settings/plugin" method="post" class="form-horizontal" id="pluginSettingForm" role="form">
|
|
|
+ <fieldset>
|
|
|
+ <legend>プラグイン設定</legend>
|
|
|
+ <p class="well">プラグインの読み込みを有効にします。</p>
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="settingForm[plugin:isEnabledPlugins]" class="col-xs-3 control-label">プラグインを読み込む</label>
|
|
|
+ <div class="col-xs-6">
|
|
|
+ <div class="btn-group btn-toggle" data-toggle="buttons">
|
|
|
+ <label class="btn {% if settingForm['plugin:isEnabledPlugins'] %}btn-primary active{% else %}btn-default{% endif %}">
|
|
|
+ <input name="settingForm[plugin:isEnabledPlugins]" value="true" type="radio"
|
|
|
+ {% if true === settingForm['plugin:isEnabledPlugins'] %}checked{% endif %}> 有効
|
|
|
+ </label>
|
|
|
+ <label class="btn {% if !settingForm['plugin:isEnabledPlugins'] %}btn-primary active{% else %}btn-default{% endif %}">
|
|
|
+ <input name="settingForm[plugin:isEnabledPlugins]" value="false" type="radio"
|
|
|
+ {% if !settingForm['plugin:isEnabledPlugins'] %}checked{% endif %}> 無効
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="form-group">
|
|
|
+ <div class="col-xs-offset-3 col-xs-6">
|
|
|
+ <input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
+ <button type="submit" class="btn btn-primary">更新</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </fieldset>
|
|
|
+ </form>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
$(function()
|
|
|
{
|
|
|
- $('#appSettingForm, #secSettingForm, #mailSettingForm, #awsSettingForm, #googleSettingForm').each(function() {
|
|
|
+ $('#appSettingForm, #secSettingForm, #mailSettingForm, #awsSettingForm, #googleSettingForm, #pluginSettingForm').each(function() {
|
|
|
$(this).submit(function()
|
|
|
{
|
|
|
function showMessage(formId, msg, status) {
|
|
|
@@ -291,6 +322,27 @@
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ // Bootstrap 3 Toggle Switch Snippet
|
|
|
+ // http://www.bootply.com/92189
|
|
|
+ $('.btn-toggle').click(function() {
|
|
|
+ $(this).find('.btn').toggleClass('active');
|
|
|
+
|
|
|
+ if ($(this).find('.btn-primary').size()>0) {
|
|
|
+ $(this).find('.btn').toggleClass('btn-primary');
|
|
|
+ }
|
|
|
+ if ($(this).find('.btn-danger').size()>0) {
|
|
|
+ $(this).find('.btn').toggleClass('btn-danger');
|
|
|
+ }
|
|
|
+ if ($(this).find('.btn-success').size()>0) {
|
|
|
+ $(this).find('.btn').toggleClass('btn-success');
|
|
|
+ }
|
|
|
+ if ($(this).find('.btn-info').size()>0) {
|
|
|
+ $(this).find('.btn').toggleClass('btn-info');
|
|
|
+ }
|
|
|
+
|
|
|
+ $(this).find('.btn').toggleClass('btn-default');
|
|
|
+ });
|
|
|
+
|
|
|
});
|
|
|
</script>
|
|
|
|