mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Moderize forms on Settings.
Summary: Adds mobile support, new forms. Test Plan: Clicked on each page after converting. Tested mobile menu Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5863
This commit is contained in:
parent
1c8d045ea0
commit
b39698eabf
14 changed files with 71 additions and 69 deletions
|
@ -922,7 +922,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'conpherence-message-pane-css' =>
|
||||
array(
|
||||
'uri' => '/res/6b49a2d9/rsrc/css/application/conpherence/message-pane.css',
|
||||
'uri' => '/res/52cf7ca3/rsrc/css/application/conpherence/message-pane.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
|
|
@ -30,6 +30,8 @@ final class PhabricatorSettingsMainController
|
|||
$nav,
|
||||
array(
|
||||
'title' => $panel->getPanelName(),
|
||||
'device' => true,
|
||||
'dust' => true,
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -85,4 +87,9 @@ final class PhabricatorSettingsMainController
|
|||
return $nav;
|
||||
}
|
||||
|
||||
public function buildApplicationMenu() {
|
||||
$panels = $this->buildPanels();
|
||||
return $this->renderSideNav($panels)->getMenu();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -89,14 +89,13 @@ final class PhabricatorSettingsPanelAccount
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Account Settings'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Account Settings'));
|
||||
|
||||
return array(
|
||||
$notice,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,10 +78,8 @@ final class PhabricatorSettingsPanelConduit
|
|||
->setHeight(AphrontFormTextAreaControl::HEIGHT_SHORT)
|
||||
->setValue($user->getConduitCertificate()));
|
||||
|
||||
$cert = new AphrontPanelView();
|
||||
$cert->setHeader(pht('Arcanist Certificate'));
|
||||
$cert->appendChild($cert_form);
|
||||
$cert->setNoBackground();
|
||||
$header1 = new PhabricatorHeaderView();
|
||||
$header1->setHeader(pht('Arcanist Certificate'));
|
||||
|
||||
$regen_instruction = pht('You can regenerate this certificate, which '.
|
||||
'will invalidate the old certificate and create a new one.');
|
||||
|
@ -97,15 +95,15 @@ final class PhabricatorSettingsPanelConduit
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Regenerate Certificate')));
|
||||
|
||||
$regen = new AphrontPanelView();
|
||||
$regen->setHeader(pht('Regenerate Certificate'));
|
||||
$regen->appendChild($regen_form);
|
||||
$regen->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Regenerate Certificate'));
|
||||
|
||||
return array(
|
||||
$notice,
|
||||
$cert,
|
||||
$regen,
|
||||
$header1,
|
||||
$cert_form,
|
||||
$header,
|
||||
$regen_form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,10 +56,8 @@ final class PhabricatorSettingsPanelConpherencePreferences
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save Preferences')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Conpherence Preferences'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Conpherence Preferences'));
|
||||
|
||||
$error_view = null;
|
||||
if ($request->getBool('saved')) {
|
||||
|
@ -71,7 +69,8 @@ final class PhabricatorSettingsPanelConpherencePreferences
|
|||
|
||||
return array(
|
||||
$error_view,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,10 +58,8 @@ final class PhabricatorSettingsPanelDiffPreferences
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save Preferences')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Diff Preferences'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Diff Preferences'));
|
||||
|
||||
$error_view = null;
|
||||
if ($request->getBool('saved')) {
|
||||
|
@ -73,7 +71,8 @@ final class PhabricatorSettingsPanelDiffPreferences
|
|||
|
||||
return array(
|
||||
$error_view,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,10 +157,8 @@ EXAMPLE;
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save Preferences')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Display Preferences'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Display Preferences'));
|
||||
|
||||
$error_view = null;
|
||||
if ($request->getStr('saved') === 'true') {
|
||||
|
@ -172,7 +170,8 @@ EXAMPLE;
|
|||
|
||||
return array(
|
||||
$error_view,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,16 +203,15 @@ final class PhabricatorSettingsPanelEmailPreferences
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save Preferences')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Email Preferences'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Email Preferences'));
|
||||
|
||||
return id(new AphrontNullView())
|
||||
->appendChild(
|
||||
array(
|
||||
$notice,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -69,19 +69,22 @@ final class PhabricatorSettingsPanelLDAP
|
|||
$forms['Unlink Account'] = $unlink_form;
|
||||
}
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('LDAP Account Settings'));
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('LDAP Account Settings'));
|
||||
|
||||
$formbox = new PHUIBoxView();
|
||||
foreach ($forms as $name => $form) {
|
||||
if ($name) {
|
||||
$panel->appendChild(hsprintf('<br /><h1>%s</h1><br />', $name));
|
||||
$head = new PhabricatorHeaderView();
|
||||
$head->setHeader($name);
|
||||
$formbox->appendChild($head);
|
||||
}
|
||||
$panel->appendChild($form);
|
||||
$formbox->appendChild($form);
|
||||
}
|
||||
|
||||
return array(
|
||||
$panel,
|
||||
$header,
|
||||
$formbox,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ final class PhabricatorSettingsPanelOAuth
|
|||
}
|
||||
|
||||
if (!$provider->isProviderLinkPermanent()) {
|
||||
$unlink = pht('Unlink %s Account');
|
||||
$unlink = pht('Unlink %s Account', $provider_name);
|
||||
$unlink_form = new AphrontFormView();
|
||||
$unlink_form
|
||||
->setUser($user)
|
||||
|
@ -208,22 +208,25 @@ final class PhabricatorSettingsPanelOAuth
|
|||
$forms['Account Token Information'] = $token_form;
|
||||
}
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('%s Account Settings', $provider_name));
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('%s Account Settings', $provider_name));
|
||||
|
||||
$formbox = new PHUIBoxView();
|
||||
foreach ($forms as $name => $form) {
|
||||
if ($name) {
|
||||
$panel->appendChild(hsprintf('<br /><h1>%s</h1><br />', $name));
|
||||
$head = new PhabricatorHeaderView();
|
||||
$head->setHeader($name);
|
||||
$formbox->appendChild($head);
|
||||
}
|
||||
$panel->appendChild($form);
|
||||
$formbox->appendChild($form);
|
||||
}
|
||||
|
||||
return id(new AphrontNullView())
|
||||
->appendChild(
|
||||
array(
|
||||
$notice,
|
||||
$panel,
|
||||
$header,
|
||||
$formbox,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -159,14 +159,13 @@ final class PhabricatorSettingsPanelPassword
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Change Password'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Change Password'));
|
||||
|
||||
return array(
|
||||
$notice,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,14 +217,13 @@ final class PhabricatorSettingsPanelProfile
|
|||
->setValue(pht('Save'))
|
||||
->addCancelButton('/p/'.$user->getUsername().'/'));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Edit Profile Details'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Edit Profile Details'));
|
||||
|
||||
return array(
|
||||
$error_view,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -152,16 +152,15 @@ final class PhabricatorSettingsPanelSSHKeys
|
|||
->addCancelButton($this->getPanelURI())
|
||||
->setValue($save));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader($header);
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header_title = new PhabricatorHeaderView();
|
||||
$header_title->setHeader($header);
|
||||
|
||||
return id(new AphrontNullView())
|
||||
->appendChild(
|
||||
array(
|
||||
$error_view,
|
||||
$panel,
|
||||
$header_title,
|
||||
$form,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -50,10 +50,8 @@ final class PhabricatorSettingsPanelSearchPreferences
|
|||
id(new AphrontFormSubmitControl())
|
||||
->setValue(pht('Save')));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader(pht('Search Preferences'));
|
||||
$panel->appendChild($form);
|
||||
$panel->setNoBackground();
|
||||
$header = new PhabricatorHeaderView();
|
||||
$header->setHeader(pht('Search Preferences'));
|
||||
|
||||
$error_view = null;
|
||||
if ($request->getStr('saved') === 'true') {
|
||||
|
@ -65,7 +63,8 @@ final class PhabricatorSettingsPanelSearchPreferences
|
|||
|
||||
return array(
|
||||
$error_view,
|
||||
$panel,
|
||||
$header,
|
||||
$form,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue