Commit a6fd8984 authored by Jeroen's avatar Jeroen

Part 2 of overhaul of addon settings page (featured). See issue #22.

parent a057a7c0
......@@ -10,6 +10,6 @@ float: left;
margin-top: 10px;
}
#dwpost-submit {
#dwpost-submit, #settings-dreamwidth-wrapper {
margin-top: 15px;
}
......@@ -69,7 +69,9 @@ function dwpost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('Dreamwidth Post Settings') . '</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-dreamwidth-wrapper" data-toggle="collapse" type="button">' . t('Dreamwidth Post Settings') . '</button>';
$s .= '<div id="settings-dreamwidth-wrapper" class="collapse well">';
$s .= '<div id="dwpost-enable-wrapper">';
$s .= '<label id="dwpost-enable-label" for="dwpost-checkbox">' . t('Enable dreamwidth Post Plugin') . '</label>';
$s .= '<input id="dwpost-checkbox" type="checkbox" name="dwpost" value="1" ' . $checked . '/>';
......@@ -92,7 +94,7 @@ function dwpost_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="dwpost-submit" name="dwpost-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="dwpost-submit" name="dwpost-submit" class="settings-submit" value="' . t('Submit Dreamwidth Post Settings') . '" /></div></div></div>';
}
......
......@@ -97,7 +97,9 @@ function flattrwidget_settings(&$a,&$s) {
$enable_checked = (($enable) ? ' checked="checked" ' : '');
$s .= '<div class="settings-block">';
$s .= '<h3>Flattr Widget '.t('Settings').'</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-flattrwidget-wrapper" data-toggle="collapse" type="button">' . t('Flattr Widget Settings') . '</button>';
$s .= '<div id="settings-flattrwidget-wrapper" class="collapse well">';
$s .= '<div id="flattrwidget-settings-wrapper">';
$s .= '<label id="flattrwidget-user-label" for="flattrwidget-user">' . t('flattr user'). '</label>';
$s .= '<input id="flattrwidget-user" type="text" name="flattrwidget-user" value="'.$user.'" />';
......@@ -135,6 +137,6 @@ function flattrwidget_settings(&$a,&$s) {
$s .= '<div class="clear"></div>';
$s .= '</div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="flattrwidget-settings-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
$s .= '</div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="flattrwidget-settings-submit" class="settings-submit" value="' . t('Submit Flattr Widget Settings') . '" /></div>';
$s .= '</div></div>';
}
......@@ -7,3 +7,7 @@
text-align: center;
margin: 25px;
}
#settings-flattrwidget-wrapper {
margin-top: 15px;
}
\ No newline at end of file
......@@ -10,6 +10,6 @@ float: left;
margin-top: 10px;
}
#ijpost-submit {
#ijpost-submit, #settings-insanejournal-wrapper {
margin-top: 15px;
}
}
\ No newline at end of file
......@@ -69,7 +69,9 @@ function ijpost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('InsaneJournal Post Settings') . '</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-insanejournal-wrapper" data-toggle="collapse" type="button">' . t('InsaneJournal Post Settings') . '</button>';
$s .= '<div id="settings-insanejournal-wrapper" class="collapse well">';
$s .= '<div id="ijpost-enable-wrapper">';
$s .= '<label id="ijpost-enable-label" for="ijpost-checkbox">' . t('Enable InsaneJournal Post Plugin') . '</label>';
$s .= '<input id="ijpost-checkbox" type="checkbox" name="ijpost" value="1" ' . $checked . '/>';
......@@ -92,7 +94,7 @@ function ijpost_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ijpost-submit" name="ijpost-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ijpost-submit" name="ijpost-submit" class="settings-submit" value="' . t('Submit InsaneJournal Post Settings') . '" /></div></div></div>';
}
......
#settings_jappixmini_expanded > label {
#settings-jappixmini-wrapper > label {
clear: both;
float: left;
width: 200px;
margin-bottom: 15px;
}
#settings_jappixmini_expanded > input[type="text"],
#settings_jappixmini_expanded > input[type="password"],
#settings_jappixmini_expanded > input[type="checkbox"] {
#settings-jappixmini-wrapper > input[type="text"],
#settings-jappixmini-wrapper > input[type="password"],
#settings-jappixmini-wrapper > input[type="checkbox"] {
float: left;
}
#settings_jappixmini_expanded > input[type="text"],
#settings_jappixmini_expanded > input[type="password"] {
#settings-jappixmini-wrapper > input[type="text"],
#settings-jappixmini-wrapper > input[type="password"] {
width: 200px;
}
#settings-jappixmini-wrapper > input[type="button"] {
background-color: #333;
font-weight: bold;
color: #FFF;
text-decoration: none;
padding: 6px 12px;
margin-left: 15px;
}
#settings-jappixmini-wrapper > input[type="button"]:hover {
text-decoration: underline;
}
#settings-jappixmini-wrapper {
margin-top: 15px;
}
......@@ -298,13 +298,9 @@ function jappixmini_settings(&$a, &$s) {
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>'."\r\n";
}
$s .= '<span id="settings_jappixmini_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
$s .= '<h3>'.t('Jappix Mini').'</h3>';
$s .= '</span>';
$s .= '<div id="settings_jappixmini_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
$s .= '<h3>'.t('Jappix Mini').'</h3>';
$s .= '</span>';
$s .= '<div class="settings-block">';
$s .= '<button class="btn btn-default" data-target="#settings-jappixmini-wrapper" data-toggle="collapse" type="button">' . t('Jappix Mini Settings') . '</button>';
$s .= '<div id="settings-jappixmini-wrapper" class="collapse well">';
$s .= '<label for="jappixmini-activate">'.t('Activate addon').'</label>';
$s .= ' <input id="jappixmini-activate" type="checkbox" name="jappixmini-activate" value="1"'.$activate.' />';
......@@ -325,7 +321,6 @@ function jappixmini_settings(&$a, &$s) {
$s .= '<br />';
}
$s .= '<label for="jappixmini-password">'.t('Jabber password').'</label>';
$s .= ' <input type="hidden" id="jappixmini-password" name="jappixmini-encrypted-password" value="'.$password.'" />';
$s .= ' <input id="jappixmini-clear-password" type="password" value="" onchange="jappixmini_set_password();" />';
......@@ -348,10 +343,10 @@ function jappixmini_settings(&$a, &$s) {
$s .= '<br /><div class="clear"></div>';
if ($info_text) $s .= '<br />Configuration help:<p style="margin-left:2em;">'.$info_text.'</p>';
$s .= '<br />Status:<p style="margin-left:2em;">Addon knows '.$address_cnt.' Jabber addresses of '.$contact_cnt.' RedMatrix contacts (takes some time, usually 10 minutes, to update).</p>';
$s .= '<input type="submit" name="jappixmini-submit" value="' . t('Save Settings') . '" />';
$s .= '<input type="submit" name="jappixmini-submit" value="' . t('Submit Jappix Mini Settings') . '" />';
$s .= ' <input type="button" value="'.t('Add contact').'" onclick="jappixmini_addon_subscribe();" />';
$s .= '</div>';
$s .= '</div></div>';
$a->page['htmlhead'] .= "<script type=\"text/javascript\">
function jappixmini_set_password() {
......
......@@ -10,7 +10,7 @@
margin-top: 10px;
}
#ljpost-submit {
#ljpost-submit, #settings-livejournal-wrapper {
margin-top: 15px;
}
......@@ -69,7 +69,9 @@ function ljpost_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('LiveJournal Post Settings') . '</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-livejournal-wrapper" data-toggle="collapse" type="button">' . t('LiveJournal Post Settings') . '</button>';
$s .= '<div id="settings-livejournal-wrapper" class="collapse well">';
$s .= '<div id="ljpost-enable-wrapper">';
$s .= '<label id="ljpost-enable-label" for="ljpost-checkbox">' . t('Enable LiveJournal Post Plugin') . '</label>';
$s .= '<input id="ljpost-checkbox" type="checkbox" name="ljpost" value="1" ' . $checked . '/>';
......@@ -92,7 +94,7 @@ function ljpost_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ljpost-submit" name="ljpost-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ljpost-submit" name="ljpost-submit" class="settings-submit" value="' . t('Submit LiveJournal Post Settings') . '" /></div></div></div>';
}
......
#nsabait-enable-label {
float: left;
width: 200px;
......@@ -11,4 +8,6 @@
float: left;
}
#settings-nsabait-wrapper {
margin-top: 15px;
}
......@@ -154,7 +154,9 @@ function nsabait_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('NSAbait Settings') . '</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-nsabait-wrapper" data-toggle="collapse" type="button">' . t('NSAbait Settings') . '</button>';
$s .= '<div id="settings-nsabait-wrapper" class="collapse well">';
$s .= '<div id="nsabait-enable-wrapper">';
$s .= '<label id="nsabait-enable-label" for="nsabait-checkbox">' . t('Enable NSAbait Plugin') . '</label>';
$s .= '<input id="nsabait-checkbox" type="checkbox" name="nsabait" value="1" ' . $checked . '/>';
......@@ -162,6 +164,6 @@ function nsabait_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="nsabait-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="nsabait-submit" class="settings-submit" value="' . t('Submit NSAbait Settings') . '" /></div></div></div>';
}
#planets-enable-label {
float: left;
width: 200px;
......@@ -11,4 +8,6 @@
float: left;
}
#settings-planets-wrapper {
margin-top: 15px;
}
\ No newline at end of file
......@@ -149,7 +149,9 @@ function planets_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('Planets Settings') . '</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-planets-wrapper" data-toggle="collapse" type="button">' . t('Planets Settings') . '</button>';
$s .= '<div id="settings-planets-wrapper" class="collapse well">';
$s .= '<div id="planets-enable-wrapper">';
$s .= '<label id="planets-enable-label" for="planets-checkbox">' . t('Enable Planets Plugin') . '</label>';
$s .= '<input id="planets-checkbox" type="checkbox" name="planets" value="1" ' . $checked . '/>';
......@@ -157,6 +159,6 @@ function planets_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="planets-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="planets-submit" class="settings-submit" value="' . t('Submit Planets Settings') . '" /></div></div></div>';
}
......@@ -10,7 +10,7 @@
margin-top: 10px;
}
#pumpio-submit {
#pumpio-submit, #settings-pumpio-wrapper {
margin-top: 15px;
}
......@@ -166,8 +166,7 @@ function pumpio_jot_nets(&$a,&$b) {
if(intval($pumpio_post) == 1) {
$pumpio_defpost = get_pconfig(local_user(),'pumpio','post_by_default');
$selected = ((intval($pumpio_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="pumpio_enable"' . $selected . ' value="1" /> '
. '<img src="addon/pumpio/pumpio.png" title="' . t('Post to Pump.io') . '" />' . '</div>';
$b .= '<div class="profile-jot-net"><input type="checkbox" name="pumpio_enable"' . $selected . ' value="1" /> <img src="addon/pumpio/pumpio.png" /> ' . t('Post to Pump.io') . '</div>';
}
}
......@@ -202,8 +201,9 @@ function pumpio_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>' . t('Pump.io Post Settings') . '</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-pumpio-wrapper" data-toggle="collapse" type="button"><img src="addon/pumpio/pumpio.png" /> ' . t('Pump.io Post Settings') . '</button>';
$s .= '<div id="settings-pumpio-wrapper" class="collapse well">';
$s .= '<div id="pumpio-servername-wrapper">';
$s .= '<label id="pumpio-servername-label" for="pumpio-servername">'.t('pump.io servername (without "http://" or "https://" )').'</label>';
$s .= '<input id="pumpio-servername" type="text" name="pumpio_host" value="'.$servername.'" />';
......@@ -251,7 +251,7 @@ function pumpio_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="pumpio-submit" name="pumpio-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="pumpio-submit" name="pumpio-submit" class="settings-submit" value="' . t('Submit Pump.io Post Settings') . '" /></div></div></div>';
}
......
......@@ -23,4 +23,8 @@ table.smiley-preview {
float: left;
}
#settings-smileybutton-wrapper {
margin-top: 15px;
}
......@@ -272,10 +272,10 @@ function smileybutton_settings(&$a,&$s) {
/* Add some HTML to the existing form */
$s .= '<div class="settings-block">';
$s .= '<h3>'.t('Smileybutton settings').'</h3>';
$s .= '<button class="btn btn-default" data-target="#settings-smileybutton-wrapper" data-toggle="collapse" type="button">' . t('Smileybutton Settings') . '</button>';
$s .= '<div id="settings-smileybutton-wrapper" class="collapse well">';
$s .= '<div id="smileybutton-enable-wrapper">';
$s .= '<label id="smileybutton-deactivated-label" for="smileybutton-deactivated-checkbox">'.t('Deactivate the feature').'</label>';
$s .= '<input id="smileybutton-deactivated-checkbox" type="checkbox" name="deactivated" value="1" ' . $checked['deactivated'] . '/>';
$s .= '</div><div class="clear"></div>';
......@@ -286,6 +286,6 @@ function smileybutton_settings(&$a,&$s) {
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="smileybutton-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="smileybutton-submit" class="settings-submit" value="' . t('Submit Smileybutton Settings') . '" /></div></div></div>';
}
......@@ -245,7 +245,7 @@ function twitter_settings(&$a,&$s) {
$s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . t('Submit Twitter Settings') . '" /></div>';
}
}
$s .= '</div><div class="clear"></div></div>';
$s .= '</div><div class="clear"></div></div></div>';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment