Skip to content

Commit

Permalink
Merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
djtarazona committed Dec 3, 2011
2 parents a08effe + 25ce1f9 commit b423f99
Show file tree
Hide file tree
Showing 30 changed files with 2,355 additions and 1,112 deletions.
Empty file added .htaccess
Empty file.
10 changes: 5 additions & 5 deletions admin/manage/ad_cdfields.php
Expand Up @@ -188,7 +188,7 @@ private function add_field($error='')
<div id='opts_textarea' style='display:none'>{lang.columns} ". $this->trellis->skin->textfield( 'opts_cols', '', '', 0, 4 ) ."&nbsp;&nbsp;{lang.rows} ". $this->trellis->skin->textfield( 'opts_rows', '', '', 0, 4 ) ."</div>
<div id='opts_dcr' style='display:none'>
<input type='hidden' name='opts_num' id='opts_num' value='1' />
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='' size='28' /> <img src='<! IMG_DIR !>/icon_circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='' size='28' /> <img src='<! IMG_DIR !>/icons/circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
</div>";

$depart_perms_html = "<table width='100%' cellpadding='0' cellspacing='0'>";
Expand Down Expand Up @@ -241,7 +241,7 @@ function addDCRopt() {
var next_opt = parseInt( $('#opts_num').val() ) + 1;
$('#opts_num').val(next_opt);
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icon_minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icons/minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr_'+ next_opt).show('blind');
}
Expand Down Expand Up @@ -345,7 +345,7 @@ private function edit_field($error='')
}
else
{
$opts_rows_html .= "<div id='opts_dcr_{$opts_count}'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_{$opts_count}' value='{$key}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_{$opts_count}' value='{$name}' size='28' /> <img src='<! IMG_DIR !>/icon_minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt({$opts_count})' /></div>";
$opts_rows_html .= "<div id='opts_dcr_{$opts_count}'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_{$opts_count}' value='{$key}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_{$opts_count}' value='{$name}' size='28' /> <img src='<! IMG_DIR !>/icons/minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt({$opts_count})' /></div>";
}
}
}
Expand All @@ -354,7 +354,7 @@ private function edit_field($error='')
<div id='opts_textarea' style='{$opts_show_textarea}'>{lang.columns} ". $this->trellis->skin->textfield( 'opts_cols', $opts_cols, '', 0, 4 ) ."&nbsp;&nbsp;{lang.rows} ". $this->trellis->skin->textfield( 'opts_rows', $opts_rows, '', 0, 4 ) ."</div>
<div id='opts_dcr' style='{$opts_show_dcr}'>
<input type='hidden' name='opts_num' id='opts_num' value='{$opts_count}' />
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='{$opts_key_1}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='{$opts_name_1}' size='28' /> <img src='<! IMG_DIR !>/icon_circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='{$opts_key_1}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='{$opts_name_1}' size='28' /> <img src='<! IMG_DIR !>/icons/circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
{$opts_rows_html}
</div>";

Expand Down Expand Up @@ -410,7 +410,7 @@ function addDCRopt() {
var next_opt = parseInt( $('#opts_num').val() ) + 1;
$('#opts_num').val(next_opt);
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icon_minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icons/minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr_'+ next_opt).show('blind');
}
Expand Down
10 changes: 5 additions & 5 deletions admin/manage/ad_cpfields.php
Expand Up @@ -188,7 +188,7 @@ private function add_field($error='')
<div id='opts_textarea' style='display:none'>{lang.columns} ". $this->trellis->skin->textfield( 'opts_cols', '', '', 0, 4 ) ."&nbsp;&nbsp;{lang.rows} ". $this->trellis->skin->textfield( 'opts_rows', '', '', 0, 4 ) ."</div>
<div id='opts_dcr' style='display:none'>
<input type='hidden' name='opts_num' id='opts_num' value='1' />
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='' size='28' /> <img src='<! IMG_DIR !>/icon_circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='' size='28' /> <img src='<! IMG_DIR !>/icons/circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
</div>";

$group_perms_html = "<table width='100%' cellpadding='0' cellspacing='0'>";
Expand Down Expand Up @@ -241,7 +241,7 @@ function addDCRopt() {
var next_opt = parseInt( $('#opts_num').val() ) + 1;
$('#opts_num').val(next_opt);
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icon_minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icons/minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr_'+ next_opt).show('blind');
}
Expand Down Expand Up @@ -348,7 +348,7 @@ private function edit_field($error='')
}
else
{
$opts_rows_html .= "<div id='opts_dcr_{$opts_count}'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_{$opts_count}' value='{$key}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_{$opts_count}' value='{$name}' size='28' /> <img src='<! IMG_DIR !>/icon_minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt({$opts_count})' /></div>";
$opts_rows_html .= "<div id='opts_dcr_{$opts_count}'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_{$opts_count}' value='{$key}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_{$opts_count}' value='{$name}' size='28' /> <img src='<! IMG_DIR !>/icons/minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt({$opts_count})' /></div>";
}
}
}
Expand All @@ -357,7 +357,7 @@ private function edit_field($error='')
<div id='opts_textarea' style='{$opts_show_textarea}'>{lang.columns} ". $this->trellis->skin->textfield( 'opts_cols', $opts_cols, '', 0, 4 ) ."&nbsp;&nbsp;{lang.rows} ". $this->trellis->skin->textfield( 'opts_rows', $opts_rows, '', 0, 4 ) ."</div>
<div id='opts_dcr' style='{$opts_show_dcr}'>
<input type='hidden' name='opts_num' id='opts_num' value='{$opts_count}' />
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='{$opts_key_1}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='{$opts_name_1}' size='28' /> <img src='<! IMG_DIR !>/icon_circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
<div id='opts_dcr_1'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_1' value='{$opts_key_1}' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_1' value='{$opts_name_1}' size='28' /> <img src='<! IMG_DIR !>/icons/circle_plus.png' alt='+' style='vertical-align:middle;cursor:pointer' onclick='addDCRopt()' /></div>
{$opts_rows_html}
</div>";

Expand Down Expand Up @@ -413,7 +413,7 @@ function addDCRopt() {
var next_opt = parseInt( $('#opts_num').val() ) + 1;
$('#opts_num').val(next_opt);
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icon_minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr').append(\"<div id='opts_dcr_\"+ next_opt +\"' style='padding-top:4px;display:none'>{lang.key} <input type='text' name='opts_dcr_keys[]' id='opts_dcr_keys_\"+ next_opt +\"' value='' size='8' />&nbsp;&nbsp;{lang.name} <input type='text' name='opts_dcr_names[]' id='opts_dcr_names_\"+ next_opt +\"' value='' size='28' /> <img src='<! IMG_DIR !>/icons/minus_circle.png' alt='-' style='vertical-align:middle;cursor:pointer' onclick='removeDCRopt(\"+ next_opt +\")' />\");
$('#opts_dcr_'+ next_opt).show('blind');
}
Expand Down
9 changes: 8 additions & 1 deletion admin/manage/ad_users.php
Expand Up @@ -1015,6 +1015,7 @@ private function do_add()

$this->trellis->load_functions('cpfields');

if (!empty($this->trellis->cache->data['pfields'])){
if( ! $fdata = $this->trellis->func->cpfields->process_input() )
{
if ( $this->trellis->func->cpfields->required_field ) $this->add_user( 'no_field', $this->trellis->func->cpfields->required_field );
Expand All @@ -1025,6 +1026,10 @@ private function do_add()

$this->trellis->func->cpfields->set_data( $fdata, $user_id, 1 );
}
}
else {
$user_id = $this->trellis->func->users->add( $db_array, array( 'staff' => $staff, 'bypass_val' => 1 ) );
}

$this->trellis->log( array( 'msg' => array( 'user_added', $this->trellis->input['name'] ), 'type' => 'user', 'content_type' => 'user', 'content_id' => $user_id ) );

Expand Down Expand Up @@ -1175,7 +1180,7 @@ private function do_edit()
if ( $this->trellis->check_perm( 'manage', 'users', 'staff', 0 ) ) $db_array['ugroup_sub_acp'] = $this->trellis->input['ugroup_sub_acp'];

$this->trellis->load_functions('cpfields');

if (!empty($this->trellis->cache->data['pfields'])){
if( ! $fdata = $this->trellis->func->cpfields->process_input() )
{
if ( $this->trellis->func->cpfields->required_field ) $this->edit_user( 'no_field', $this->trellis->func->cpfields->required_field );
Expand All @@ -1186,6 +1191,8 @@ private function do_edit()

$this->trellis->func->cpfields->set_data( $fdata, $u['id'] );
}
}
else {$this->trellis->func->users->edit( $db_array, $u['id'], array( 'staff' => $staff ) );}

$this->trellis->log( array( 'msg' => array( 'user_edited', $this->trellis->input['name'] ), 'type' => 'user', 'content_type' => 'user', 'content_id' => $u['id'] ) );

Expand Down

0 comments on commit b423f99

Please sign in to comment.