msgid "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
msgstr "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
+
+msgid "Create new resource"
+msgstr "Create new resource"
+
+msgid "The resource has been created successfully."
+msgstr "The resource has been created successfully."
msgid "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
msgstr "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
+
+msgid "Create new resource"
+msgstr "Create new resource"
+
+msgid "The resource has been created successfully."
+msgstr "The resource has been created successfully."
msgid "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
msgstr "Uwaga: jeśli wybierzesz kopię przyrostową lub różnicową, w następnym kroku będą również załadowane wszystkie pliki i katalogi ze starszych kopii wymaganych do przywrócenia zadania. Innymi słowy, wybrana kopia zapasowa określa punkt czasowy z którego będzie załadowana wybrana kopia i inne starsze kopie (przyrostowe, różnicowe) aż do najbliższej kopii pełnej."
+
+msgid "Create new resource"
+msgstr "Tworzenie nowego zasobu"
+
+msgid "The resource has been created successfully."
+msgstr "Zasób został utworzony pomyślnie."
msgid "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
msgstr "Note: if you select incremental or differential backup, on the next step will be also loaded all directories and files from older backups required to do the job restore. In other words, the selected backup determines time point from which will be loaded the selected backup and other older backups (incremental, differential) backups up till closest full backup."
+
+msgid "Create new resource"
+msgstr "Create new resource"
+
+msgid "The resource has been created successfully."
+msgstr "The resource has been created successfully."
</div>
<div id="fileset_save_ok" class="w3-panel w3-green w3-display-container" style="display: none">
<span onclick="this.parentElement.style.display='none'" class="w3-button w3-green w3-large w3-display-topright">x</span>
- <p><%[ Resource has been saved successfully. ]%></p>
+ <p><%[ The resource has been created successfully. ]%></p>
</div>
<div id="job_wizard_new_fileset" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
<h3><%[ New FileSet ]%></h3>
</div>
<div id="pool_save_ok" class="w3-panel w3-green w3-display-container" style="display: none">
<span onclick="this.parentElement.style.display='none'" class="w3-button w3-green w3-large w3-display-topright">x</span>
- <p><%[ Resource has been saved successfully. ]%></p>
+ <p><%[ The resource has been created successfully. ]%></p>
</div>
<div id="job_wizard_new_pool" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
<h3><%[ New Pool ]%></h3>
</div>
<div id="schedule_save_ok" class="w3-panel w3-green w3-display-container" style="display: none">
<span onclick="this.parentElement.style.display='none'" class="w3-button w3-green w3-large w3-display-topright">x</span>
- <p><%[ Resource has been saved successfully. ]%></p>
+ <p><%[ The resource has been created successfully. ]%></p>
</div>
<div id="job_wizard_new_schedule" class="w3-card-4 w3-padding w3-margin-top" style="display: none">
<h3><%[ New Schedule ]%></h3>
<button type="button" class="w3-button w3-green w3-margin-left w3-margin-bottom" onclick="document.getElementById('new_resource').style.display = 'block'">
<i class="fa fa-plus"></i> <%=Prado::localize('Add new resource')%>
</button>
- <div id="resource_save_ok" class="w3-panel w3-green w3-display-container" style="display: none">
- <span onclick="this.parentElement.style.display='none'" class="w3-button w3-green w3-large w3-display-topright">x</span>
- <p><%[ Resource has been saved successfully. ]%></p>
+ <div id="resource_save_ok_box" class="w3-modal" style="display: none">
+ <div class="w3-modal-content w3-card-4 w3-animate-zoom" style="width: 600px">
+ <header class="w3-container w3-green">
+ <span onclick="$('#resource_save_ok_box').hide();" class="w3-button w3-display-topright">×</span>
+ <h2><%[ Create new resource ]%></h2>
+ </header>
+ <div class="w3-panel w3-padding">
+ <p><%[ The resource has been created successfully. ]%></p>
+ </div>
+ <footer class="w3-container w3-center w3-border-top">
+ <button type="button" class="w3-button w3-section w3-green" onclick="$('#resource_save_ok_box').hide(); save_directive_post_action();"><i class="fa fa-check"></i> <%[ OK ]%></button>
+ </footer>
+ </div>
</div>
<div id="new_resource" class="w3-modal">
<div class="w3-modal-content w3-animate-top w3-card-4 w3-padding">
<div id="resource_config" class="w3-container">
<com:Application.Web.Portlets.BaculaConfigDirectives
ID="NewResource"
- SaveDirectiveActionOk="$('#resource_config').slideUp(); $('#resource_save_ok').show();"
+ SaveDirectiveActionOk="save_directive_action_ok();"
ShowRemoveButton="false"
ShowCancelButton="false"
/>
</div>
<script>
+ function save_directive_action_ok() {
+ $('#resource_config').slideUp();
+ $('#resource_save_ok_box').show();
+ }
+ function save_directive_post_action() {
+ var origin_url = '<%=$this->getOriginUrl()%>';
+ if (origin_url) {
+ document.location.href = origin_url;
+ }
+ }
oBaculaConfigSection.show_sections(true);
</script>
</com:TContent>
const COMPONENT_TYPE = 'ComponentType';
const COMPONENT_NAME = 'ComponentName';
const RESOURCE_TYPE = 'ResourceType';
+ const ORIGIN_URL = 'OriginUrl';
public function onPreRender($param) {
parent::onPreRender($param);
$this->NewResource->raiseEvent('OnDirectiveListLoad', $this, null);
$this->setHosts();
}
+ if (key_exists('HTTP_REFERER', $_SERVER)) {
+ $this->setOriginUrl($_SERVER['HTTP_REFERER']);
+ }
}
public function setHosts() {
$this->setViewState(self::RESOURCE_TYPE, $type);
}
+ public function getOriginUrl() {
+ return $this->getViewState(self::ORIGIN_URL);
+ }
+
+ public function setOriginUrl($url) {
+ $this->setViewState(self::ORIGIN_URL, $url);
+ }
+
public function createResource() {
if ($this->Host->SelectedIndex > 0 && $this->Component->SelectedIndex > 0 && $this->Resource->SelectedValue) {
$host = $this->Host->SelectedValue;
</prop:ItemTemplate>
</com:TActiveRepeater>
</div>
- <com:TActiveLabel ID="ErrorMsg" Display="None" />
+<com:TActiveLabel ID="ErrorMsg" Display="None" />
<div class="config_directives new_resource" rel="<%=$this->getHost()%>new_resource" style="display: none">
+ <!-- New resource -->
<h2 rel="<%[ Add new %resource_type resource on %component_name (%component_type) ]%>"></h2>
<hr />
- <com:Application.Web.Portlets.BaculaConfigDirectives ID="NewResource" LoadValues="<%=false%>" />
+ <com:Application.Web.Portlets.BaculaConfigDirectives
+ ID="NewResource"
+ LoadValues="<%=false%>"
+ SaveDirectiveActionOk="$('#<%=$this->ResourceCreatedOk->ClientID%>').show();"
+ />
</div>
+<!-- Resource created successfully - confirm -->
+<com:TPanel ID="ResourceCreatedOk" CssClass="w3-modal" Style="display: none">
+ <div class="w3-modal-content w3-card-4 w3-animate-zoom" style="width: 600px">
+ <header class="w3-container w3-green">
+ <span onclick="$('#<%=$this->ResourceCreatedOk->ClientID%>').hide();" class="w3-button w3-display-topright">×</span>
+ <h2><%[ Create new resource ]%></h2>
+ </header>
+ <div class="w3-panel w3-padding">
+ <p><%[ The resource has been created successfully. ]%></p>
+ </div>
+ <footer class="w3-container w3-center w3-border-top">
+ <button type="button" class="w3-button w3-section w3-green" onclick="$('#<%=$this->ResourceCreatedOk->ClientID%>').hide(); $('#<%=$this->NewResource->Cancel->ClientID%>').click();"><i class="fa fa-check"></i> <%[ OK ]%></button>
+ </footer>
+ </div>
+</com:TPanel>