version dialog header
这个提交包含在:
父节点
06db0bb955
当前提交
f27d4863e5
共有 3 个文件被更改,包括 39 次插入 和 10 次删除
|
|
@ -410,14 +410,17 @@ class Options extends CI_Controller {
|
|||
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
|
||||
$version_dialog_mode = $this->optionslib->update('version_dialog', $this->input->post('version_dialog_mode'), 'yes');
|
||||
if($version_dialog_mode == TRUE) {
|
||||
$this->session->set_flashdata('success', $this->lang->line('options_version_dialog_mode_changed_to')." "."'".$this->input->post('version_dialog_mode')."'");
|
||||
$version_dialog_header_update = $this->optionslib->update('version_dialog_header', $this->input->post('version_dialog_header'), 'yes');
|
||||
if($version_dialog_header_update == TRUE) {
|
||||
$this->session->set_flashdata('success0', $this->lang->line('options_version_dialog_header_changed_to')." "."'".$this->input->post('version_dialog_header')."'");
|
||||
}
|
||||
$version_dialog_mode_update = $this->optionslib->update('version_dialog', $this->input->post('version_dialog_mode'), 'yes');
|
||||
if($version_dialog_mode_update == TRUE) {
|
||||
$this->session->set_flashdata('success1', $this->lang->line('options_version_dialog_mode_changed_to')." "."'".$this->input->post('version_dialog_mode')."'");
|
||||
}
|
||||
if ($this->input->post('version_dialog_mode') == "both" || $this->input->post('version_dialog_mode') == "custom_text" ) {
|
||||
$version_dialog_custom_text = $this->optionslib->update('version_dialog_text', $this->input->post('version_dialog_custom_text'), 'yes');
|
||||
if($version_dialog_custom_text == TRUE) {
|
||||
$version_dialog_custom_text_update = $this->optionslib->update('version_dialog_text', $this->input->post('version_dialog_custom_text'), 'yes');
|
||||
if($version_dialog_custom_text_update == TRUE) {
|
||||
$this->session->set_flashdata('success2', $this->lang->line('options_version_dialog_custom_text_saved'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@ function load_was_map() {
|
|||
<?php
|
||||
if($this->session->userdata('user_id') != null) {
|
||||
$versionDialog = $this->optionslib->get_option('version_dialog');
|
||||
$versionDialogHeader = $this->optionslib->get_option('version_dialog_header');
|
||||
if (empty($versionDialogHeader)) {
|
||||
$this->optionslib->update('version_dialog_header', $this->lang->line('options_version_dialog'), 'yes');
|
||||
}
|
||||
if($versionDialog != "disabled") {
|
||||
$confirmed = $this->user_options_model->get_options('version_dialog', array('option_name'=>'confirmed'))->result();
|
||||
$confirmation_value = (isset($confirmed[0]->option_value))?$confirmed[0]->option_value:'false';
|
||||
|
|
|
|||
|
|
@ -11,10 +11,17 @@
|
|||
<div class="card-header"><h2><?php echo $page_title; ?> - <?php echo $sub_heading; ?></h2></div>
|
||||
|
||||
<div class="card-body">
|
||||
<?php if($this->session->flashdata('success')) { ?>
|
||||
<?php if($this->session->flashdata('success0')) { ?>
|
||||
<!-- Display Success Message -->
|
||||
<div class="alert alert-success">
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
<?php echo $this->session->flashdata('success0'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->session->flashdata('success1')) { ?>
|
||||
<!-- Display Success Message -->
|
||||
<div class="alert alert-success">
|
||||
<?php echo $this->session->flashdata('success1'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -34,6 +41,12 @@
|
|||
|
||||
<?php echo form_open('options/version_dialog_save'); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="version_dialog_header"><?php echo lang('options_version_dialog_header'); ?></label>
|
||||
<input type="text" name="version_dialog_header" class="form-control" id="version_dialog_header" aria-describedby="version_dialog_header" value="<?php echo htmlspecialchars($this->optionslib->get_option('version_dialog_header') ?? ''); ?>">
|
||||
<small id="version_dialog_header_hint" class="form-text text-muted"><?php echo lang('options_version_dialog_header_hint'); ?></small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="version_dialog_mode"><?php echo lang('options_version_dialog_mode'); ?></label>
|
||||
<select name="version_dialog_mode" class="form-select" id="version_dialog_mode">
|
||||
|
|
@ -42,19 +55,28 @@
|
|||
<option value="both" <?php if($this->optionslib->get_option('version_dialog') == "both") { echo "selected=\"selected\""; } ?>><?php echo lang('options_version_dialog_mode_both'); ?></option>
|
||||
<option value="disabled" <?php if($this->optionslib->get_option('version_dialog') == "disabled") { echo "selected=\"selected\""; } ?>><?php echo lang('options_version_dialog_mode_disabled'); ?></option>
|
||||
</select>
|
||||
<small id="version_dialog_mode_help" class="form-text text-muted"><?php echo lang('options_version_dialog_mode_hint'); ?></small>
|
||||
<small id="version_dialog_mode_hint" class="form-text text-muted"><?php echo lang('options_version_dialog_mode_hint'); ?></small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3" id="version_dialog_custom_textarea" style="display: none" role="alert">
|
||||
<label for="version_dialog_custom_text"><?php echo lang('options_version_dialog_custom_text'); ?></label>
|
||||
<textarea type="text" rows="6" name="version_dialog_custom_text" class="form-control" id="version_dialog_custom_text" aria-describedby="version_dialog_custom_text"><?php echo htmlspecialchars($this->optionslib->get_option('version_dialog_text') ?? ''); ?></textarea>
|
||||
<small id="version_dialog_custom_text" class="form-text text-muted"><?php echo lang('options_version_dialog_custom_text_hint'); ?></small>
|
||||
<small id="version_dialog_custom_text_hint" class="form-text text-muted"><?php echo lang('options_version_dialog_custom_text_hint'); ?></small>
|
||||
</div>
|
||||
|
||||
<!-- Save the Form -->
|
||||
<input class="btn btn-primary" type="submit" value="<?php echo lang('options_save'); ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<h5>Trigger Dialog for users</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<button class="btn btn-primary m-2">TEST 1</button>
|
||||
<button class="btn btn-primary m-2">TEST 2</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
正在加载…
在新工单中引用