kopia lustrzana https://github.com/magicbug/Cloudlog
Added inputs and table columns to start supporting Clublog uploading
rodzic
294e126d7d
commit
45a809c331
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 17;
|
||||
$config['migration_version'] = 18;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Controller to interact with the Clublog API
|
||||
*/
|
||||
|
||||
class Clublog extends CI_Controller {
|
||||
|
||||
// Show frontend if there is one
|
||||
public function index() {
|
||||
|
||||
}
|
||||
|
||||
// Upload ADIF to Clublog
|
||||
public function upload() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -195,7 +195,25 @@ class User extends CI_Controller {
|
|||
} else {
|
||||
$data['user_lotw_name'] = $q->user_lotw_name;
|
||||
}
|
||||
|
||||
if($this->input->post('user_clublog_name')) {
|
||||
$data['user_clublog_name'] = $this->input->post('user_clublog_name');
|
||||
} else {
|
||||
$data['user_clublog_name'] = $q->user_clublog_name;
|
||||
}
|
||||
|
||||
if($this->input->post('user_clublog_password')) {
|
||||
$data['user_clublog_password'] = $this->input->post('user_clublog_password');
|
||||
} else {
|
||||
$data['user_clublog_password'] = $q->user_clublog_password;
|
||||
}
|
||||
|
||||
if($this->input->post('user_clublog_callsign')) {
|
||||
$data['user_clublog_callsign'] = $this->input->post('user_clublog_callsign');
|
||||
} else {
|
||||
$data['user_clublog_callsign'] = $q->user_clublog_callsign;
|
||||
}
|
||||
|
||||
if($this->input->post('user_lotw_password')) {
|
||||
$data['user_lotw_password'] = $this->input->post('user_lotw_password');
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Migration_clubloguserfields extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
$user_fields = array(
|
||||
'user_clublog_name VARCHAR(255) DEFAULT NULL',
|
||||
'user_clublog_password VARCHAR(255) DEFAULT NULL',
|
||||
'user_clublog_callsign VARCHAR(255) DEFAULT NULL'
|
||||
);
|
||||
$this->dbforge->add_column('users', $user_fields);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'user_clublog_name');
|
||||
$this->dbforge->drop_column('users', 'user_clublog_password');
|
||||
$this->dbforge->drop_column('users', 'user_clublog_callsign');
|
||||
}
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
<?php echo validation_errors(); ?>
|
||||
<?php $this->load->helper('form'); ?>
|
||||
|
||||
<form method="post" action="<?php echo site_url('user/edit')."/".$this->uri->segment(3); ?>" name="users">
|
||||
<form method="post" action="<?php echo site_url('user/edit')."/".$this->uri->segment(3); ?>" name="users" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label>Username</label>
|
||||
<input class="form-control" type="text" name="user_name" value="<?php if(isset($user_name)) { echo $user_name; } ?>" />
|
||||
|
@ -126,6 +126,27 @@
|
|||
<input class="form-control" type="text" name="user_eqsl_qth_nickname" value="<?php if(isset($user_eqsl_qth_nickname)) { echo $user_eqsl_qth_nickname; } ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label>Clublog Username</label>
|
||||
<input class="form-control" type="text" name="user_clublog_name" value="<?php if(isset($user_clublog_name)) { echo $user_clublog_name; } ?>" />
|
||||
<?php if(isset($userclublogname_error)) { echo "<div class=\"small error\">".$userclublogname_error."</div>"; } ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Clublog Password</label>
|
||||
<input class="form-control" type="password" name="user_clublog_password" />
|
||||
<?php if(isset($clublogpassword_error)) { echo "<div class=\"small error\">".$clublogpassword_error."</div>"; } else { ?>
|
||||
<div class="small">Leave blank to keep existing password</div></td>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Clublog Callsign</label>
|
||||
<input class="form-control" type="text" name="user_clublog_callsign" value="<?php if(isset($user_clublog_callsign)) { echo $user_clublog_callsign; } ?>" />
|
||||
<?php if(isset($userclublogcallsign_error)) { echo "<div class=\"small error\">".$userclublogcallsign_error."</div>"; } ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
|
||||
<button type="submit" class="btn btn-primary">Update Account</button>
|
||||
</form>
|
||||
|
|
Ładowanie…
Reference in New Issue